load.Object

0th

Percentile

Static method to load an Object from a file or a connection

Static method to load an Object from a file or a connection, which previously have been saved using save() of class Object.

Keywords
methods, internal, programming, IO
Usage
Object$load(file, path=NULL, ...)
Arguments
file
Filename or connection from where to read the Object.
path
The path where the file exists.
...
Not used.
Details

Please note that no constructors are called when an Object is loaded and neither is any static class code called.

Value

  • Returns a reference to the loaded Object.

synopsis

load.Object(static, file, path=NULL, ...)

Type control

Typically this static method is called as $load(...) where is any Object class. When an Object has been loaded, it is verified that it inherits from . If it does not, an exception is thrown. Thus, Object$load(...) will load any Object, but MyClass$load(...) will only load an Object that inherits from MyClass. If loaded object is not of correct class, an exception is thrown.

Troubleshooting

Due to a bug, likely in Ritself, one can not specify the file argument by its name, i.e. Object$load(file="foo.RData") will not work, but Object$load("foo.RData") work just fine.

See Also

*save() and save(), load(). For more information see Object.

Aliases
  • load.Object
  • Object.load
  • load.Object
  • load,Object-method
Examples
For a complete example see help(Object).
Documentation reproduced from package R.oo, version 1.11.7, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.