> x = structure(list(time = structure(c(1020232904.818, 1020232904.818 ), class = c("POSIXt", "POSIXct"), tzone = ""), price = c(321, 323.5)), .Names = c("time", "price"), row.names = 1:2, class = "data.frame") > x1 = x[,c("price")] > dput(x1) c(321, 323.5)
Is there similar syntax that gets "price" as a (single-column) dataframe? (I know that I can use "subset(... select = ...)").. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Extracting-a-dataframe-column-as-a-dataframe-tp3163920p3163920.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.