objcopy(names, where.new, new.names=names, where.old=1, overwrite=F)
Assignments by objcopy are committed only when the current top-level expression completes without error, or when synchronize is used.
This function is unrelated to the copy function in the S-PLUS library section external.
z <- z # find z somewhere and make a copy on the working database objcopy("x", 2) # copy x from database 1 to database 2 assign("x", get("x", where=1), where=2) # Same thing. assign("x", x, where=2) # Same thing, if x is found on database 1. objcopy("x", 2, "y") # copy x from d.b. 1 to d.b. 2 under name y assign("y", get("x", where=1), where=2) # Same thing. assign("y", x, where=2) # Same thing, if x is found on database 1. objcopy(c("X", "Y", "Z"), 2) # copy all three from d.b. 1 to d.b. 2 old.names <- c("X", "Y", "Z") objcopy(old.names, 1, paste(old.names, "backup", sep=".")) # make backup copies X.backup etc. on the same database, 1 objcopy("myfun", "S_stash") # S_stash is a directory of S-PLUS objects you want to keep. # It need not be currently attached.