[R] Concepts question: environment, frame, search path

From: Graham Wideman <gwlist_at_grahamwideman.com>
Date: Mon, 30 Apr 2007 21:29:47 -0700


Folks:

I'd appreciate if someone could straighten me out on a few concepts which are described a bit ambiguously in the docs.

  1. data.frame:
    Refan p84: 'A data frame is a list of variables of the same length with unique row names, given class "data.frame".'

I probably don't need to point out how opaque that is!

Anyhow, key question: Some places in the docs seem pretty firm that a data.frame is basically a 2-D array with: a) named rows and
b) columns whose items within a column be of uniform data type.

Elsewhere, it seems like a data.frame can be a collection of arbitrary variables.

2. environment



Refman p122: "Environments consist of a frame, or collection of named objects, and a pointer to an enclosing environment."

Is the "or" here explaining parenthetically that a frame is a collection of named objects, or is separating too alternative structures for an environment?

If the former, does this imply that a frame can contain arbitrary variables?

And "pointer"? Is that a type of thing in R?

3. R search path; attach()



The R search path appears to hold the list of "collections of data" (my term) that can be accessed by a users' commands. Refman p27 tells that search path can hold items that are data.frame, list, environment or R data file (on disk). Yet R-intro p28 describes attach() as taking a "directory
name" argument. What is the concept "directory" in this context?

Thanks,

Graham



R-help_at_stat.math.ethz.ch 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. Received on Tue 01 May 2007 - 12:55:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 May 2007 - 18:31:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.