[R] Parse error in xtabs

Andrew Perrin aperrin at socrates.berkeley.edu
Tue Apr 3 22:08:06 CEST 2001


Using R 1.2.2 under linux, I get the following:
> l.agg<-xtabs(cbind(r.logic.interests, r.logic.morality,
+                    r.logic.enlightened, r.logic.capacity,
+              ~ grouptype,
+              data=gt)
Error in parse(file, n, text, prompt) : parse error

I know the data are structured fine, as I can use all the elements in
individual xtabs() calls such as the one below:

> l.agg<-xtabs(cbind(r.logic.morality,r.logic.capacity) ~ grouptype,
> summary(l.agg)
xtabs(formula = cbind(r.logic.morality, r.logic.capacity) ~ grouptype, 
    data = gt)
Number of cases in table: 693 
Number of factors: 2 
Test for independence of all factors:
        Chisq = 5.447, df = 4, p-value = 0.2444

Any advice?


Andrew J Perrin - Ph.D. Candidate, UC Berkeley, Dept. of Sociology  
(Soon: Asst Professor of Sociology, U of North Carolina, Chapel Hill)
andrew_perrin at unc.edu - http://www.unc.edu/~aperrin

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list