Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

relist

Re-listing an unlist()ed object


Description

relist is a generic function with a few methods in order to allow easy inversion of unlist(x).

NOTE: This man page is for the relist S4 generic function defined in the BiocGenerics package. See ?utils::relist for the default method (defined in the utils package). Bioconductor packages can define specific methods for objects not supported by the default method.

Usage

relist(flesh, skeleton)

Arguments

flesh

A vector-like object.

skeleton

A list-like object. Only the "shape" (i.e. the lengths of the individual list elements) of skeleton matters. Its exact content is ignored.

Value

A list-like object with the same "shape" as skeleton and that would give flesh back if unlist()ed.

See Also

  • utils::relist for the default relist method.

  • showMethods for displaying a summary of the methods defined for a given generic function.

  • selectMethod for getting the definition of a specific method.

  • relist,ANY,List-method in the IRanges package for an example of a specific relist method (defined for when skeleton is a List object).

  • BiocGenerics for a summary of all the generics defined in the BiocGenerics package.

Examples

relist
showMethods("relist")
selectMethod("relist", c("ANY", "ANY"))  # the default method

BiocGenerics

S4 generic functions used in Bioconductor

v0.36.1
Artistic-2.0
Authors
The Bioconductor Dev Team
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.