Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

00Index

Documentation for package ‘R.cache’ version 0.15.0


Description

Loads an object from a file connection similar to load(), but without resetting file connections (to position zero).

WARNING: This is an internal function that should not be called by anything but the internal code of the R.cache package.

Usage

.baseLoad(con, envir=parent.frame())

Arguments

con

A connection.

envir

An environment where the loaded object will be stored.

Details

The reason why it is not possible to use load() is that that resets the file position of the connection before trying to load the object. The reason why that happens is because when you pass a regular file connection to load() it gets coerced via gzcon(), which is the function that resets the file position.

The workaround is to create a local copy of base::load() and modify it by dropping the gzcon() coercion. This is possible because this function, that is .baseLoad(), is always called with a gzfile() connection.

Value

Returns (invisible) a character vector of the names of objects loaded.

See Also

This function is used by loadCache() and readCacheHeader().


R.cache

Fast and Light-Weight Caching (Memoization) of Objects and Results to Speed Up Computations

v0.15.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.