Skip to content

Instantly share code, notes, and snippets.

@JohnArchieMckown
Created August 20, 2014 13:36
Show Gist options
  • Save JohnArchieMckown/d0c0387383988b0a8e99 to your computer and use it in GitHub Desktop.
Save JohnArchieMckown/d0c0387383988b0a8e99 to your computer and use it in GitHub Desktop.
Using environments for multiple versions of data from RData
To load multiple RData files which have identical variables in them and keep all versions of the variable, put them each in a separate environment
AData <- new.env();
load("AData.RData",envir=AData);
BData <- new.env();
load("BData.RData",envir=BData);
and so on.
You can then reference individual variable by using something like:
AData$var.name
or maybe
AData$data.frame$var.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment