restore: Restore S3 class properties.

Description Usage Arguments Examples

View source: R/restore.R

Description

When an S3 class is built on top of an atomic vector, it's often resonable compute directly on those underlying values. This generic allows you to restore important attributes from the original vector to the new vector, so that it continues to behave as expected.

Usage

1
restore(old, new)

Arguments

old

Old S3 vector

new

New S3 vector. Should be same typeof() as old.

Examples

1
2
3
4
5

hadley/ggstat documentation built on May 17, 2019, 10:40 a.m.