Re: [R] assign factor levels based on list

2011-02-10 Thread Tim Howard
"2","3","4",..: 1 2 3 $ colTwo : Factor w/ 5 levels "apple","pear",..: 1 2 3 $ colThree: num 4 5 6 Thank you again! Best, Tim Howard >>> "William Dunlap" 2/9/2011 4:41 PM >>> > -----Original Message----- >

Re: [R] assign factor levels based on list

2011-02-09 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Tim Howard > Sent: Wednesday, February 09, 2011 12:44 PM > To: r-help@r-project.org > Subject: [R] assign factor levels based on list > > All, >

Re: [R] assign factor levels based on list

2011-02-09 Thread David Winsemius
On Feb 9, 2011, at 4:18 PM, David Winsemius wrote: On Feb 9, 2011, at 3:44 PM, Tim Howard wrote: All, Given a data frame and a list containing factor definitions for certain columns, how can I apply those definitions from the list, rather than doing it the standard way, as noted below.

Re: [R] assign factor levels based on list

2011-02-09 Thread David Winsemius
On Feb 9, 2011, at 3:44 PM, Tim Howard wrote: All, Given a data frame and a list containing factor definitions for certain columns, how can I apply those definitions from the list, rather than doing it the standard way, as noted below. I'm lost in the world of do.call, assign, paste, and

[R] assign factor levels based on list

2011-02-09 Thread Tim Howard
All, Given a data frame and a list containing factor definitions for certain columns, how can I apply those definitions from the list, rather than doing it the standard way, as noted below. I'm lost in the world of do.call, assign, paste, and can't find my way through. For example: #set up d