-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
project.org] On Behalf Of ya
Sent: Tuesday, May 08, 2012 12:01 PM
To: r-help
Subject: [R] convert 400 numeric variables to categorical together
Hi Jim and Michael,
Thank you very much for replying.
Here is the information about my data. I have a data frame, including
more than 800 variables(columns) and 30000 cases(rows).400 of those
variables are categorical variables. I used to use Rcmdr to convert
variables, however, when the number of variables I need to convert
getting more, I need to keep left clicking mouse to confirm the
conversion (400 times) because as.factor() can only convert 1 variable
at a time. So I am thinking if there is any faster way. Thank you very
much.
Best regards,
ya
ya
From: R. Michael Weylandt
Date: 2012-05-08 19:35
To: xinxi813
CC: r-help
Subject: Re: [R] convert 400 numeric variables to categorical together
How are they arranged currently? And should they be all one set of
levels or different factor sets?
Michael
On Tue, May 8, 2012 at 12:32 PM, ya <xinxi813 at 163.com> wrote:
Hi everyone,
Is there anyway I can convert more than 400 numeric variables to
categorical variables simultaneously?
as.factor() is really slow, and only one at a time.
Thank you very much.
ya
[[alternative HTML version deleted]]