Re: [R] operations on columns when data frames are in a list

2015-04-13 Thread Adams, Jean
If you write a function that takes a data frame as an argument and returns a data frame, you can use lapply to carry out the tasks that you want. For example, if your list of data frames is called mydat ... mon2date <- function(df) { if ("Month" %in% names(df)) { df$Month<- as.POSIXct(df$Mo

[R] operations on columns when data frames are in a list

2015-04-13 Thread Steve E.
Hello R folks, I have recently discovered the power of working with multiple data frames in lists. However, I am having trouble understanding how to perform operations on individual columns of data frames in the list. For example, I have a water quality data set (sample data included below) that c