flatten a data frame
问题 I have this nested data frame test <- structure(list(id = c(13, 27), seq = structure(list( `1` = c("1997", "1997", "1997", "2007"), `2` = c("2007", "2007", "2007", "2007", "2007", "2007", "2007")), .Names = c("1", "2"))), .Names = c("penr", "seq"), row.names = c("1", "2"), class = "data.frame") I want a list of all values in the second column, namely result <- c("1997", "1997", "1997", "2007", "2007", "2007", "2007", "2007", "2007", "2007", "2007") Is there an easy way to achieve this? 回答1: