[R] using subset() in data frame

Robert Walters pungo9nc at embarqmail.com
Sat Feb 23 14:24:49 CET 2008


Erin Hodgess wrote:
> Hi Robert!
> 
> Could you please check
> str(data.b)
> 
> and see what you have for porosity?  It needs to be a factor
> 
> Thanks,
> Erin
> 
> 
Erin,
Yes, porosity is a factor. See output below.

 > str(data.b)
'data.frame':   96 obs. of  7 variables:
  $ system  : Factor w/ 6 levels ...
  $ block   : int  ...
  $ position: Factor w/ 3 levels "inrow","interrow",..
  $ depth   : Factor w/ 2 levels "0-7.5cm","7-5-15cm": ...
  $ porosity: Factor w/ 2 levels "macro ","micro":...
  $ x       : num  1.41 1.5 1.3 1.53 ...
  $ y       : num  12.10 14.60 23.30 ...

Robert




>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 
>



More information about the R-help mailing list