Learn R Programming

tcR (version 2.3.2)

column.summary: Columns statistics.

Description

column.summary - general function for computing summary statistics (using the summary function) for columns of the given mitcr data.frame: divide .factor.column by factors from .alphabet and compute statistics of correspondingly divided .target.column.

insertion.stats - compute statistics of insertions for the given mitcr data.frame.

Usage

column.summary(.data, .factor.col, .target.col, .alphabet = NA, .remove.neg = T)

insertion.stats(.data)

Arguments

.data

Data frame with columns .factor.col and target.col

.factor.col

Columns with factors by which the data will be divided to subsets.

.target.col

Column with numeric values for computing summaries after dividing the data to subsets.

.alphabet

Character vector of factor levels. If NA than use all possible elements frim the .factor.col column.

.remove.neg

Remove all elements which >-1 from the .target.col column.

Value

Data.frame with first column with levels of factors and 5 columns with output from the summary function.

See Also

summary

Examples

Run this code
# NOT RUN {
# Compute summary statistics of VD insertions
# for each V-segment using all V-segments in the given data frame.
column.summary(immdata[[1]], 'V.gene', 'Total.insertions')
# Compute summary statistics of VD insertions for each V-segment using only V-segments
# from the HUMAN_TRBV_MITCR
column.summary(immdata[[1]], 'V.gene', 'Total.insertions', HUMAN_TRBV_MITCR)
# }

Run the code above in your browser using DataLab