Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/importAndManage.R
Collapses data based on unique combinations of values in a set of columns, by default adding a column giving counts of data entries with a particular combination.
1 2 3 4 | aggregateExpData(expData, by = getIndexColumns(expData),
tablename = NULL, deleteOriginal = FALSE, overwrite = FALSE,
verbose = getOption("verbose"), colname = "counts",
aggregator = paste("count(", by[1], ")", sep = ""))
|
expData |
An object of class |
by |
Vector containing column names used to define unique entries. |
tablename |
Name of database table to write output data to. |
deleteOriginal |
Logical indicating whether original database table in |
overwrite |
Logical indicating whether database table referred to in
|
verbose |
Logical indicating whether details should be printed. |
colname |
Name of column for recording aggregation output (by default,
|
aggregator |
SQLite code used for aggregating. See |
By default this function counts instances of data entries with a particular combination of the values in the set
of columns indicated in the by
argument. Other SQLite commands
can be indicated using the aggregator
argument.
Returns an ExpData
object.
James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu
See Genominator
vignette for more information.
1 2 3 4 5 6 | N <- 10000 # the number of observations.
df <- data.frame(chr = sample(1:16, size = N, replace = TRUE),
location = sample(1:1000, size = N, replace = TRUE),
strand = sample(c(1L,-1L), size = N, replace = TRUE))
eDataRaw <- aggregateExpData(importToExpData(df, dbFilename = tempfile(),
tablename = "ex_tbl", overwrite = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.