I'd like to make the distinction between the purpose of factors, i.e.,
what they are intended for, and how that purpose is accomplished.
Their purpose is for use in statistical models. The simplest example is
analysis of variance, where predictors are commonly referred to as
factors. Factors in R
David Winsemius comcast.net> writes:
>
>
> I think you need to understand indexing more than you need to
> understand factors.
>
> incomes [ which(statef == "act") ]
>
> If you want to understand how to programmatically access levels, then
> you only need to follow the "See also" links o
Sarah Goslee gmail.com> writes:
>
> Hi Julio,
>
> You can use a factor to index another object just as you'd use any other
> index:
> > incomes[statef == "act"]
> [1] 46 43
> Is there something specific you're trying to accomplish?
>
> Sarah
>
Thanks Sarah! I'm just learning R. Thanks agai
On Mar 30, 2012, at 12:50 PM, Julio Sergio wrote:
I'm trying to figure out about factors, however the on-line
documentation is
rather sparse. I guess, factors are intended for grouping arrays
members into
categories, which R names "Levels". And so we have:
* state <- c("tas", "sa", "qld
Hi Julio,
You can use a factor to index another object just as you'd use any other index:
> incomes[statef == "act"]
[1] 46 43
It looks like you're using the R intro guide, but there's a lot of
other material available. Try this one for starters:
http://www.stat.berkeley.edu/classes/s133/factors.
I'm trying to figure out about factors, however the on-line documentation is
rather sparse. I guess, factors are intended for grouping arrays members into
categories, which R names "Levels". And so we have:
* state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
"
6 matches
Mail list logo