Displaying 2 results from an estimated 2 matches for "merged_data".
2010 Sep 08
2
dataframe selection using a multi-value key
...7, 2008, 2008, 2008,
2018, 2018, 2018, 2009, 2010),
UNIT_TYPE = c("E2", "E2", "E5", "T1", "E7", "E6", "E2", "E2", "E1",
"E3", "E7", "T1", "E7", "E5"))
merged_data = merge(incidents, responses, by=c("INC_NO", "INC_YEAR"))
relational_key = c("INC_NO", "INC_YEAR")
## following does not work, but I want DF of incidents that did not merge up
with responses
incidents[incidents[,relational_key] %in% responses[,relational_ke...
2010 Nov 24
5
Performance tuning tips when working with wide datasets
Does anyone have any performance tuning tips when working with datasets that are extremely wide (e.g. 20,000 columns)?
In particular, I am trying to perform a merge like below:
merged_data <- merge(data1, data2, by.x="date",by.y="date",all=TRUE,sort=TRUE);
This statement takes about 8 hours to execute on a pretty fast machine. The dataset data1 contains daily data going back to 1950 (20,000 rows) and has 25 columns. The dataset data2 contains annual data (on...