copy_rosv: Copy a {rosv} object

View source: R/utils.R

copy_rosvR Documentation

Copy a {rosv} object

Description

Create a copy of {rosv} R6 class objects to ensure original is not also updated with future changes.

Usage

copy_rosv(x, ...)

Arguments

x

Object to copy.

...

Additional parameters sent to R6's clone method.

Details

Since R6 classes have reference semantics, to escape updating original objects a clone can be made with this function.

Value

An R6 class object.

Examples

original_obj <- RosvQuery1$new(name = 'readxl', ecosystem = 'CRAN')
new_obj <- copy_rosv(original_obj)

rosv documentation built on May 29, 2024, 2:58 a.m.