Re: [R] List of Levels for all Factor variables

2012-10-17 Thread Lopez, Dan
ste0(levels(y), collapse=", "))), right=FALSE)} Thanks again. Dan -Original Message- From: David L Carlson [mailto:dcarl...@tamu.edu] Sent: Wednesday, October 17, 2012 8:29 AM To: 'arun'; Lopez, Dan Cc: 'R help' Subject: RE: [R] List of Levels for all Fac

Re: [R] List of Levels for all Factor variables

2012-10-17 Thread Lopez, Dan
Thanks. Dan -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Tuesday, October 16, 2012 10:09 AM To: Lopez, Dan Cc: R help; Rui Barradas Subject: Re: [R] List of Levels for all Factor variables HI, You can also try this: set.seed(1) dat1<-data.frame(col1=fac

Re: [R] List of Levels for all Factor variables

2012-10-17 Thread David L Carlson
t; > #[1] "col3 : 1 2 3 4 5" > #[1] "col1 : 2 6 7 10 15 16 17 23 24" "col2 : b c d e g h j" > #[3] "col3 : 1 2 3 4 5" > > A.K. > > > > > - Original Message - > From: "Lopez, Dan" > To: "R help (r-help@r-pro

Re: [R] List of Levels for all Factor variables

2012-10-16 Thread arun
t;   A.K.    - Original Message - From: "Lopez, Dan" To: "R help (r-help@r-project.org)" Cc: Sent: Tuesday, October 16, 2012 11:19 AM Subject: [R] List of Levels for all Factor variables Hi, I want to get a clean succinct list of all levels for all my factor va

Re: [R] List of Levels for all Factor variables

2012-10-16 Thread Lopez, Dan
Perfect! Thank you! Dan -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: Tuesday, October 16, 2012 9:03 AM To: Lopez, Dan Cc: R. Michael Weylandt; R help (r-help@r-project.org) Subject: Re: [R] List of Levels for all Factor variables Hello, The problem is with

Re: [R] List of Levels for all Factor variables

2012-10-16 Thread Rui Barradas
just tried to return each observation. unlist(x, recursive = TRUE, use.names = TRUE) Dan -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: Tuesday, October 16, 2012 8:28 AM To: Lopez, Dan Cc: R help (r-help@r-project.org) Subject: Re: [R] List of Levels f

Re: [R] List of Levels for all Factor variables

2012-10-16 Thread Lopez, Dan
[mailto:michael.weyla...@gmail.com] Sent: Tuesday, October 16, 2012 8:28 AM To: Lopez, Dan Cc: R help (r-help@r-project.org) Subject: Re: [R] List of Levels for all Factor variables On Tue, Oct 16, 2012 at 4:19 PM, Lopez, Dan wrote: > Hi, > > I want to get a clean succinct list of all levels for all

Re: [R] List of Levels for all Factor variables

2012-10-16 Thread R. Michael Weylandt
On Tue, Oct 16, 2012 at 4:19 PM, Lopez, Dan wrote: > Hi, > > I want to get a clean succinct list of all levels for all my factor variables. > > I have a dataframe that's something like #1 below. This is just an example > subset of my data and my actual dataset has 70 variables. I know how to > n

[R] List of Levels for all Factor variables

2012-10-16 Thread Lopez, Dan
Hi, I want to get a clean succinct list of all levels for all my factor variables. I have a dataframe that's something like #1 below. This is just an example subset of my data and my actual dataset has 70 variables. I know how to narrow down my list of variables to just my factor variables by u