- 1. Removing levels from a factor (score: 1)
- Author: Mark.Hearnden@nt.gov.au
- Date: Wed, 5 Mar 2008 15:21:17 +0930
- Quick question I hope. I have a factor variable ("Treatment") in a data frame ("data") and I want to extract rows for certain levels of Treatment and ignore the rest. eg. levels for Treatment are "A
- /archives/html/s-news/2008-03/msg00010.html (7,126 bytes)
- 2. Re: Removing levels from a factor (score: 1)
- Author: Terry Therneau <therneau@mayo.edu>
- Date: Wed, 5 Mar 2008 08:05:01 -0600 (CST)
- The easiest thing is to turn off factors: 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 c
- /archives/html/s-news/2008-03/msg00013.html (7,492 bytes)
- 3. Re: Removing levels from a factor (score: 1)
- Author: "Thompson, David (MNR)" <David.John.Thompson@ontario.ca>
- Date: Wed, 5 Mar 2008 10:07:02 -0500
- 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 char
- /archives/html/s-news/2008-03/msg00015.html (9,588 bytes)
- 4. Re: Removing levels from a factor (score: 1)
- Author: "Austin, Matt" <maustin@amgen.com>
- Date: Wed, 5 Mar 2008 09:01:21 -0800
- I'm not Terry, but I'll give my opinion. I find factors quite useful and very natural--but I started programming using S and didn't migrate from another language/application. When a modeling applicat
- /archives/html/s-news/2008-03/msg00016.html (11,760 bytes)
- 5. Re: Removing levels from a factor (score: 1)
- Author: Frank E Harrell Jr <f.harrell@vanderbilt.edu>
- Date: Wed, 05 Mar 2008 12:41:31 -0600
- When a modeling application implicitly coerces a vector from character to factor, how does it chose the reference level when using treatment style contrasts? It sorts alphabetically, which means in t
- /archives/html/s-news/2008-03/msg00019.html (13,576 bytes)
- 6. Re: Removing levels from a factor (score: 1)
- Author: "Douglas Bates" <bates@stat.wisc.edu>
- Date: Sat, 15 Mar 2008 15:30:02 -0500
- Yes. This tends to be a religious issue with fundamentalists in both camps. I believe that the "factors are beneficial" camp is larger than the "factors are the work of the devil" camp. However, as f
- /archives/html/s-news/2008-03/msg00034.html (14,930 bytes)
- 7. Re: Removing levels from a factor (score: 1)
- Author: Gregor Gorjanc <gregor.gorjanc@bfro.uni-lj.si>
- Date: Thu, 20 Mar 2008 20:04:51 +0000 (UTC)
- There is also drop.levels() function in gdata package for R - I am not sure if it is also in S-PLUS port. I use it often. Usually I import the data, check the structure with str(), occasionally I rem
- /archives/html/s-news/2008-03/msg00045.html (8,931 bytes)
This search system is powered by
Namazu