galleryReader_df: Extract the data from a reader as a data frame

Description Usage Arguments Value Examples

Description

The value data in the reader is a list of rows. This function will convert that into an R data frame. Typically, you simply pass the python reader object to this function and it will call reader$values() and reader$colnames() to get that information. If you have a complicated reader (perhaps it holds more than one value list), then you may need to use other methods from your reader object and not the defaults. You can specify those methods with the values and colnames parameters respectively. If you do not specify the reader object, then you must provide those two other parameters.

Usage

1
galleryReader_df(reader, values, colnames)

Arguments

reader

The reader from which to extract the data frame. Unless overridden (see parameters below), reader$values() and reader$colnames() will be called to get that data.

values

The values (in the form of a python list of rows) to convert to a data frame. If not specified, then reader$values() will be used.

colnames

The column names that correspond to the values. These must be in the same order as the elements in a row. If not specified, then reader$colnames() will be used.

Value

A data frame

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
myReader %>% galleryReader_df

galleryReader_df(myReader, colnames=theColumnNames)

galleryReader_df(values=myReader$hitValues(), colnames=myReader$hitColNames())
galleryReader_df(values=myReader$trackValues(), colnames=myReader$trackColNames())

## End(Not run)

lyon-fnal/readGallery documentation built on May 21, 2019, 9:16 a.m.