Re: [R] create a vector from several data frames

2015-05-18 Thread Stefano Sofia
Thank you David. It is exactly what I was looking for and it works pefectly. Stefano Da: David L Carlson [dcarl...@tamu.edu] Inviato: giovedì 14 maggio 2015 17.18 A: Stefano Sofia; r-help@r-project.org Oggetto: RE: create a vector from several data frames

Re: [R] create a vector from several data frames

2015-05-14 Thread David L Carlson
If you combine all of the df's into a list, e.g. dfn <- paste0("df", 1:20) df <- lapply(dfn, get) names(df) <- dfn and if "target" is the day you want in the same date/time format as the day variable in the data frames: sapply(df, function(x) x[x$day==target, "tmax"]) will return a named vecto