[R] newbie question on str output

David Winsemius dwinsemius at comcast.net
Fri Dec 17 05:17:40 CET 2010


On Dec 16, 2010, at 11:10 PM, Laura Smith wrote:

> Hi!
>
> Here is some output from an str command:
>
>> str(CO2)
> Classes ‘nfnGroupedData’, ‘nfGroupedData’, ‘groupedData’ and
> 'data.frame':      84 obs. of  5 variables:
> $ Plant    : Ord.factor w/ 12 levels "Qn1"<"Qn2"<"Qn3"<..: 1 1 1 1 1  
> 1 1 2
> 2 2 ...
> $ Type     : Factor w/ 2 levels "Quebec","Mississippi": 1 1 1 1 1 1  
> 1 1 1 1
> ...
> $ Treatment: Factor w/ 2 levels "nonchilled","chilled": 1 1 1 1 1 1  
> 1 1 1 1
> ...
> $ conc     : num  95 175 250 350 500 675 1000 95 175 250 ...
> $ uptake   : num  16 30.4 34.8 37.2 35.3 39.2 39.7 13.6 27.3 37.1 ...
> - attr(*, "formula")=Class 'formula' length 3 uptake ~ conc | Plant
>  .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
> - attr(*, "outer")=Class 'formula' length 2 ~Treatment * Type
>  .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv>
> - attr(*, "labels")=List of 2
>  ..$ x: chr "Ambient carbon dioxide concentration"
>  ..$ y: chr "CO2 uptake rate"
> - attr(*, "units")=List of 2
>  ..$ x: chr "(uL/L)"
>  ..$ y: chr "(umol/m^2 s)"
>>
> What do the nfnGroupdata, nfGroupdata mean, please?
>
> Also, what do the attr with formula and outer mean, please?

Per its help page:

help(CO2, package=datasets)

... the answer is probably in Pinheiro, J. C. and Bates, D. M. (2000)  
Mixed-effects Models in S and S-PLUS, Springer. Some datasets and  
packages are really support material for textbooks, and this appears  
to be one such case.

>
> How would I find those things out without posting to the list.

Read the help page?

Do this:

??CO2


-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list