Re: [R] error when extracting from a data frame

2012-01-17 Thread David Winsemius
On Jan 17, 2012, at 4:56 PM, Jean V Adams wrote: Read the help file on how to extract from a data frame: ?"[.data.frame" Then, try adding a comma inside the brackets. data.station1 <- data[data$Station==1, ] Before the comma, the data$Station==1 identifies what rows to select. After the comma,

Re: [R] error when extracting from a data frame

2012-01-17 Thread Jean V Adams
Read the help file on how to extract from a data frame: ?"[.data.frame" Then, try adding a comma inside the brackets. data.station1 <- data[data$Station==1, ] Before the comma, the data$Station==1 identifies what rows to select. After the comma, the lack of specification indicates that all column

[R] error when extracting from a data frame

2012-01-17 Thread Suzanne.mertens
(As a noob to R, this is my first posting - yes yes, groans all around...) I'm trying to extract certain rows from a data frame. I used the following to import data from a CSV txt file. data <- read.table(file="data.txt", header=TRUE) when I do this, my attempt to extract the data rows