I have a large list of data.frames that need to be paired in columns and then in rows before being fed into the predictive model. Since no values will be changed, I would like to have a final data.frame file pointing to the original data.frames in my list.
For example:
library(pryr)
The final data.frame will have this orientation (each unique data pair bound by columns, then pairs connected by rows):
df1, df2 df1, df3 df2, df3
I am currently implementing this as such:
#generate unique df combinations df_names <- names(dfs) pairs <- combn(df_names, 2, simplify=FALSE)
How can I avoid copying my data, but still achieve the same end result?
clone memory r dataframe pryr
alexvpickering
source share