data.table
Subsetting a data frame with top-n rows for each group, and ordered by a variable
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:[详细]
2023-03-07 03:28 分类:问答Most efficient list to data.frame method?
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[详细]
2023-03-05 03:38 分类:问答subsetting in data.table
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[详细]
2023-02-20 15:10 分类:问答Fastest Tall-Wide pivoting in R
I am dealing with a simple table of the form datevariablevalue 1970-01-01V10.434 1970-01-01V212.12 1970-01-01V3921.1[详细]
2023-02-17 00:34 分类:问答R: When using data.table how do I get columns of y when I do x[y]?
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[详细]
2023-02-05 21:00 分类:问答R: how to rbind two huge data-frames without running out of memory
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[详细]
2023-02-05 19:44 分类:问答idata.frame: Why error "is.data.frame(df) is not TRUE"?
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[详细]
2023-01-20 21:02 分类:问答What's the higher-performance alternative to for-loops for subsetting data by group-id?
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[详细]
2022-12-24 15:38 分类:问答How to do a data.table merge operation
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[详细]
2022-12-19 12:56 分类:问答Find columns with different values in duplicate rows
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.[详细]
2022-12-07 22:02 分类:问答
加载中,请稍侯......