attach(database, 1) #this database takes precedence
store() #new objects to go under database in memory
#this doesn't work in R
f <- lm(y ~ x)
store(f) #store f under name "f" in .Data or .GlobalEnv
#uses assign() with immediate=T
store(f, "final.model") #immediately store f under "final.model" in .Data
store() #store future objects in .Data.tempnnnn
x <- runif(1000) #x will disappear at session end unless
store(x) #this statement appears -> store in .Data
stores(x, y, z) #store x,y,z in .Data under names x,y,z
storeTemp(x) #put x as name 'x' in frame 0
#for R, attach .GlobalTemp and store it there
storeTemp(x,'X') #same as previous but under the name X
Run the code above in your browser using DataCamp Workspace