Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Accessing Columns

When accessing a column name of a data frame with the $ notation you can directly use the column name. Using the [ notation you will need to quote the name.



> people[,"Age"]
> people$Age
> people[["Age"]]
> subset(people, select=Age)

This also illustrates a use of subset.



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.