I would like to subset a data frame for n rows, which are grouped by a variable and are sorted descending by another variable. This would be clear with an example:
Just had a conversation with coworkers about this, and we thought it\'d be worth seeing what people out in SO land had to say.Suppose I had a list with N elements, where开发者_JS百科 each element was
I am trying to subset a data.table ( from the package data.table ) in R (not a data.frame).I have a 4 digit year as a key.I would like to subset by taking a series of years.For example, I want to pull
I am dealing with a simple table of the form datevariablevalue 1970-01-01V10.434 1970-01-01V212.12 1970-01-01V3921.1
UPDATE: Old question ... it was resolved by data.table v1.5.3 in Feb 2011. I am trying to use the data.table package, and really like the speedups I am getting, but I am stumped by this error when I
I have two data-frames df1 and df2 that each have around 10 million rows and 4 columns. I read them into R using RODBC/sqlQuery with no problems, but when I try to rbind them, I get that most dreaded
I\'m working with a large data frame called exp (file here) in R.In the interests of performance, it was suggested that I check out the idata.frame() function from plyr. But I think I\'m using it wron
A recurring analysis paradigm I encounter in my research is the need to subset based on all different group id values, performing statistical analysis on each group in turn, and putting the results in
note: this question and the following answers refer to data.table versions < 1.5.3; v. 1.5.3 was released in Feb 2011 to resolve this issue. see more recent treatment (03-2012): Translating SQL joi
I have a data set that has some duplicate records. For those records, most of the column values are the same, but 开发者_StackOverflow社区a few ones are different.