![]()
|
You can link to the last RSS article here: SPSS' Hotfix for Windows Vista - Ed. R Techniques: Summarizing Data By Grouping VariablesBy Dr. Rich Herrington, Academic Computing and User Services, CITCIn
this article we examine a few different ways of summarizing data across
groups or what is referred to in as "factors" in the R language. R's model
for data types consist of several different
"modes" - numeric, logical, character, and factor (other data types
exist, but we concern ourselves here with the type called numeric and
factor. Factor variables are used in R to represent class information or
"nominal" data. Converting modes, for example character modes such as "M"
or "F" or "Single" or "Married", are accomplished by using the
"as." conversion functions. For
example, "as.factor(gender)" will
convert the variable which consists of numeric 1's and 0's to a factor
variable that can be used subset the data for summarization. Finally, we use
various combinations of looping techniques, indexing techniques, and the "split"
function to subset by groups and display the group statistics. Below we
present several ways of doing this. Several Methods for Summarizing on Factor Variables
Good luck and happy computing until next month. I'll leave you with
the following joke that my colleagues here in the office just absolutely
groaned at ..... I think they don't have a refined sense of humor.
|