Terry,
Regarding the 'factors are only occasionally useful' comment,
what are the situations where factors are _actually_ useful?
Do not (most?) modelling functions that require factors usually
coerce character values as required?
Thanks, DaveT.
*************************************
Silviculture Data Analyst
Ontario Forest Research Institute
Ontario Ministry of Natural Resources
david.john.thompson@ontario.ca
http://ofri.mnr.gov.on.ca
*************************************
>-----Original Message-----
>From: s-news-owner@lists.biostat.wustl.edu
>[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of
>Terry Therneau
>Sent: March 5, 2008 09:05 AM
>To: s-news@lists.biostat.wustl.edu; Mark.Hearnden@nt.gov.au
>Subject: Re: [S] Removing levels from a factor
>
> The easiest thing is to turn off factors:
>
> > options(stringsAsFactors=F)
> > data$Treatment <- as.character(data$Treatment)
>
> Now you can subset the data frame and things will work as you would
anticipate.
>
> Comment: factors are occassionaly useful, but only occasionally. Much
grief
>can be avoided by turning them off by default. Our biostat group (>100
people,
>over 1200 projects a year) has had the above option as a part of our
global
>defaults for many years, and has not yet seen a downside to the
decision.
>
> Terry Therneau
> Mayo Clinic
>--------------------------------------------------------------------
>This message was distributed by s-news@lists.biostat.wustl.edu. To
>unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
>the BODY of the message: unsubscribe s-news
|