search for: listofdataframes

Displaying 4 results from an estimated 4 matches for "listofdataframes".

2011 Jan 12
2
syntax for extending a line in a script??
...here there is no friendly way to break a long line of code into two lines which still function as one command. Therefore, I need a nice way to be able to flag 'R' to know that the code is continuing on the next line. Let me explain via example: numericColumns <- names(listOfDataFrames[[myDF]][,columnsOI]) [sapply(listOfDataFrames[[myDF]][,columnsOI], is.numeric) ] As you can see in this case, I would *like* for these 2 lines of code to be read as 1 line, but since the "names(<blah>)" command is sufficiently a command on its own, 'R...
2011 May 17
4
subsetting a list of dataframes
Hello All, I have a list of dataframes, and I need to subset it by keeping only those dataframes in the list that meet a certain criterion. Specifically, I need to generate a second list which only includes those dataframes whose number of rows is > 1. Could someone suggest how to do this? I have come close to what I need with loops and such, but there must be a less clumsy way... Many
2003 Sep 22
1
Data frame from list of lists
...ly it to many inputs, resulting in a list of lists. I would like to turn this list of lists into a single data frame in which each row corresponds to one of the original sublists. Here is a toy example: myfunc=function(x) return(list(A=x,L=letters[x],T=Sys.time())) ListOfLists=lapply(1:4,myfunc) ListOfDataFrames=lapply(ListOfLists,as.data.frame) df=do.call("rbind",ListOfDataFrames) df Which gives: A L T 1 1 a 2003-09-22 02:08:44 11 2 b 2003-09-22 02:08:44 12 3 c 2003-09-22 02:08:44 13 4 d 2003-09-22 02:08:44 Which is what I want (bar the rownames). The problem is that t...
2004 Oct 28
3
Quick data-manipulation question
I have a list of data frames and I want to concatenate them into a single data frame, basically appending all of the data frames to each other (they are all the same shape, in terms of columns). I'm looking for a nice way to do that. I can of course just consecutively rbind them to a "master" dataframe, but I have 22,000 such data frames, each with a few hundred rows, so this