[R] Parse error in xtabs

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


Greetings-

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,
r.logic.mediate)
+              ~ 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,
data=gt)
> summary(l.agg)
Call:
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?

Thanks.

----------------------------------------------------------------------
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