uncollect2spct: Extract all members from a collection

View source: R/spct.utils.r

uncollect2spctR Documentation

Extract all members from a collection

Description

Extract all members from a collection into separate objects in the parent frame of the call.

Usage

uncollect2spct(x, ...)

## Default S3 method:
uncollect2spct(x, ...)

## S3 method for class 'generic_mspct'
uncollect2spct(
  x,
  name.tag = ".spct",
  ignore.case = FALSE,
  check.names = TRUE,
  check.overwrite = TRUE,
  ...
)

Arguments

x

An R object

...

additional named arguments passed down to f.

name.tag

character. A string used as tag for the names of the objects. If of length zero, names of members are used as named of objects. Otherwise the tag is appended, unless already present in the member name.

ignore.case

logical. If FALSE, the pattern matching used for name.tag is case sensitive and if TRUE, case is ignored during matching.

check.names

logical. If TRUE then the names of the objects created are checked to ensure that they are syntactically valid variable names and unique. If necessary they are adjusted (by make.names) so that they are, and if FALSE names are used as is.

check.overwrite

logical. If TRUE trigger an error if an exisitng object would be overwritten, and if FALSE silently overwrite objects.

Value

Utility used for its side effects, invisibly returns a character vector with the names of the objects created.

Methods (by class)

  • uncollect2spct(default): Default for generic function

  • uncollect2spct(generic_mspct):

See Also

Other experimental utility functions: collect2mspct(), drop_user_cols(), thin_wl()

Examples


my.mscpt <- source_mspct(list(sun1.spct = sun.spct, sun2.spct = sun.spct))
uncollect2spct(my.mscpt)
ls(pattern = "*.spct")


photobiology documentation built on Oct. 21, 2023, 1:06 a.m.