restructure: Restructure Old R Objects

View source: R/restructure.R

restructureR Documentation

Restructure Old R Objects

Description

restructure is a generic function used to restructure old R objects to work with newer versions of the package that generated them. Its original use is within the brms package, but new methods for use with objects from other packages can be registered to the same generic.

Usage

restructure(x, ...)

Arguments

x

An object to be restructured. The object's class will determine which method to apply

...

Additional arguments to pass to the specific methods

Details

Usually the version of the package that generated the object will be stored somewhere in the object and this information will be used by the specific method to determine what transformations to apply. See restructure.brmsfit for the default method applied for brms models. You can view the available methods by typing: methods(restructure)

Value

An object of the same class as x compatible with the latest version of the package that generated it.

See Also

restructure.brmsfit


brms documentation built on Sept. 23, 2024, 5:08 p.m.