summarizeExpData: Summarize a data column

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Genominator.R

Description

This function returns a summary of one or more data columns, as indicated by a particular SQLite query function.

Usage

1
2
3
summarizeExpData(expData, what = getColnames(expData, all = FALSE),
  fxs = c("TOTAL"), preserveColnames = TRUE, whereClause = "",
  verbose = getOption("verbose"))

Arguments

expData

An object of class ExpData.

what

Vector of names of data columns to be summarized.

fxs

Vector of strings giving the names of SQLite functions to call on the data column.

preserveColnames

Logical indicating whether column names should be preserved.

whereClause

Additional filtration criteria, customizable to refer to additional data columns. See Details for more explanation.

verbose

Logical indicating whether details should be printed.

Details

The argument whereClause should be a string indicating a subset of the data to be selected. For example, if you have a column called category, you could specify "category = 1" to select only those data entries where category has a value of 1. This function operates as a database query, and thus the argument can include logical combinations of multiple criteria using SQL boolean operators.

Value

A vector with results of summarization.

Author(s)

James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu

References

The available SQLite functions are listed here: http://www.sqlite.org/lang_aggfunc.html

See Also

See Genominator vignette for more information.

Examples

1
2
3
4
ed <- ExpData(system.file(package = "Genominator", "sample.db"),
              tablename = "raw")
summarizeExpData(ed)
summarizeExpData(ed, fxs = c("MIN", "MAX", "AVG"))

Genominator documentation built on Oct. 31, 2019, 8:56 a.m.