[R] Problem with Freq function {prettyR}

From: Udo <ukoenig_at_med.uni-marburg.de>
Date: Thu, 12 Jun 2008 17:58:24 +0200


Dear list,
I have a problem with freq from prettyR.

Please have a look at my syntax with a litte example:

library(prettyR)

#Version 1

test.df<-data.frame(q1=sample(1:4,8,TRUE), gender=sample(c("f","m"),8,TRUE)) test.df
freq(test.df) #No error message

#Version 2

test.df<-data.frame(gender=sample(c("f","m"),8,TRUE), q1=sample(1:4,8,TRUE)) test.df
freq(test.df)

Error message: "Error in vector("integer", length) : Vector size canīt be NA"

Can someone tell me, why an error message occurs in version two? I am helpless...

Thanks in advance!

Udo K ö n i g


Clinic for Child an Adolescent Psychiatry Philipps University of Marburg / Germany



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 12 Jun 2008 - 18:40:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jun 2008 - 14:30:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive