catalogToDataFrame: A utility to return a data.frame from a ShojiCatalog.

View source: R/shoji-catalog.R

catalogToDataFrameR Documentation

A utility to return a data.frame from a ShojiCatalog.

Description

This is an internal function called by the various as.data.frame methods. Use as.data.frame instead of calling this directly.

Usage

catalogToDataFrame(
  x,
  keys = TRUE,
  rownames = NULL,
  list_columns = c("subvariables", "subvariables_catalog"),
  ...
)

Arguments

x

ShojiCatalog or subclass

keys

character vector of attribute names from each catalog tuple to include in the result. Default is TRUE, which means all.

rownames

See base::data.frame() for the row.names argument. The difference here is that if rownames is explicitly set as NULL, the resulting object will not have row names set. By default, row names will be the URLs of the catalog tuples.

list_columns

A character vector of the names of the attributes that should be stored in a list-column. Currently ignored.

...

additional arguments passed to data.frame

Details

Some of the attributes of a ShojiCatalog will not naturally fit in a conventional data.frame. For example, an array variable contains a list of subvariables, and these subvariables will not easily fit in a single row of a data.frame. In this case, the list of subvariables are stored in a list-column in the resulting data.frame.

Value

a data.frame view of the catalog


Crunch-io/rcrunch documentation built on April 1, 2024, 1:14 a.m.