Description Usage Arguments Details Value Note Author(s) References See Also Examples
These utilities may be used to remove objects under delayed assignment from the disc permanently, where objects are respectively held in a local cache, a central data cache or central utilities cache.
| 1 2 3 4 5 | Remove(..., list = character(0),
       lib = Sys.getenv("R_LOCAL_CACHE", unset = ".R_Cache"),
       lib.loc = Sys.getenv("R_LOCAL_LIB_LOC", unset = "."))
RemoveData(...)
RemoveUtils(...)
 | 
| ... | items to be removed. Names are taken as objects to be removed. Character strings, or calls resulting in character strings, are taken as providing names of items to be removed as character strings. | 
| list | a character string vector providing the names of objects
to be removed.  An alternative to  | 
| lib | The name of the cache directory from which items are to be removed. May be given as a character string, or as a name, (i.e. without quotes) for convenience. The default is as follows: 
 | 
| lib.loc | The enclosing directory where the cache directory is to be found. The default is as follows: 
 | 
Linking the default values of lib and lib.loc to
environment variables allows the user to re-set the defaults, if need
be, either during startup or in the R session.
Nothing. Used only for side-effects.
If the cache is not presently attached to the search path, it is sliently attached at postion 2 before objects are removed from it.
Old caches made in pre-release versions of SOAR (known as
ASOR) will be converted to the present format with a
warning that this is happening.  After this conversion only the
current version of the package may be used to access the cached
objects.
Bill Venables
None
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## change default cache, keeping any previous setting
oldLC <- Sys.getenv("R_LOCAL_CACHE", unset = ".R_Cache")
Sys.setenv(R_LOCAL_CACHE=".R_Test")
## generate some dummy data
dummy <- rnorm(100)
mn <- mean(dummy)
va <- var(dummy)
## store it in the stored object cache
Store(dummy, mn, va)
Search()
Objects()
Remove(mn, va)
Objects()
Remove(Objects())                   # empty the cache
detach(".R_Test")                   # remove from search path
Sys.setenv(R_LOCAL_CACHE=oldLC)     # restore normal default
 | 
   name              lib.loc                      
01 .GlobalEnv                                     
02 .R_Test           .                            
03 package:SOAR      /usr/local/lib/R/site-library
04 package:stats     R_HOME/library               
05 package:graphics  R_HOME/library               
06 package:grDevices R_HOME/library               
07 package:utils     R_HOME/library               
08 package:datasets  R_HOME/library               
09 package:methods   R_HOME/library               
10 Autoloads                                      
11 package:base      R_HOME/library               
Warning message:
In normalizePath("~", winslash = "/") :
  path[1]="/home/anon": No such file or directory
[1] "dummy" "mn"    "va"   
[1] "dummy"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.