Re: [R] Summary of variables with NA, empty

2012-10-24 Thread David Winsemius
1, 2, 3, 4, 5 I find it good to put in counter-examples such as a column that is non-factor. I thought that a non-factor column would probably break your code, but happily it survived. You might think about writing two functions: one to pick the columns to be assessed and the other to return a str

Re: [R] Summary of variables with NA, empty

2012-10-24 Thread Lopez, Dan
els(y), collapse=", "))), right=FALSE)} > PrintLvls2(dat1) Lvls Names col1 92, 6, 7, 10, 15, 16, 17, 23, 24 col2 7b, c, d, e, g, h, j col3 51, 2, 3, 4, 5 Thanks. Dan -Original Message----- From: Bert Gunter [mailto:gunter.ber..

Re: [R] Summary of variables with NA, empty

2012-10-23 Thread Bert Gunter
To highlight: "Basically all Null values" is a meaningless phrase in R. ?Null ?NA ?NaN have **very specific meanings** in R and have nothing to do with the various sorts of whitespace characters that David mentions (spaces, tabs...). If you wish to use R, you **must** understand the distinctions (

Re: [R] Summary of variables with NA, empty

2012-10-23 Thread David Winsemius
On Oct 23, 2012, at 11:17 AM, Lopez, Dan wrote: > Hi, > > Is there a function I can use on my dataframe to give me a concise summary of > variables that are NA,blank,etc? Basically all Null values, Empty strings, > white space, blank values. Ideally it would look something like the below: > >

[R] Summary of variables with NA, empty

2012-10-23 Thread Lopez, Dan
Hi, Is there a function I can use on my dataframe to give me a concise summary of variables that are NA,blank,etc? Basically all Null values, Empty strings, white space, blank values. Ideally it would look something like the below: # it should only includes the fields with NAs, blanks, etc. Add