Re: [R] dput vs unclass to see what a factor really is composed of

2008-07-31 Thread Duncan Murdoch
On 31/07/2008 5:21 PM, Jacob Wegelin wrote: I used read.dta() to read in a Stata 9 dataset to R. The "Sex01" variable takes on two values in Stata: 0 and 1, and it is labeled "M" and "F" respectively, analogous to an R factor. Thus, read.dta reads it in as a factor. Now, I wanted to see what thi

Re: [R] dput vs unclass to see what a factor really is composed of

2008-07-31 Thread Prof Brian Ripley
See ?NumericConstants. On Thu, 31 Jul 2008, Jacob Wegelin wrote: I used read.dta() to read in a Stata 9 dataset to R. The "Sex01" variable takes on two values in Stata: 0 and 1, and it is labeled "M" and "F" respectively, analogous to an R factor. Thus, read.dta reads it in as a factor. Now, I

[R] dput vs unclass to see what a factor really is composed of

2008-07-31 Thread Jacob Wegelin
I used read.dta() to read in a Stata 9 dataset to R. The "Sex01" variable takes on two values in Stata: 0 and 1, and it is labeled "M" and "F" respectively, analogous to an R factor. Thus, read.dta reads it in as a factor. Now, I wanted to see what this variable *really* is, in R. For instance, so