computeStats: computeStats: Calculate count, mean, stdev, and cv of a...

View source: R/computeStats.R

computeStatsR Documentation

computeStats: Calculate count, mean, stdev, and cv of a vector or rows/columns of a matrix, or dataframe

Description

Returns count, mean, stdev, and cv of vector, matrix or dataframe

Usage

computeStats(x, byCol = TRUE, cols.factors = 1, cols.vars = 2)

Arguments

x
  • vector, matrix or dataframe

byCol
  • compute stats by column (if TRUE)

cols.factors
  • vector identifying columns to use as factors

cols.vars
  • vector identifying columns to use as variables

Value

  • for x a vector, returns vector with count,mean, stdev and cv as elements

  • for x a matrix, returns matrix w/ rows with elements count, mean, stdev and cv
    Rownames correspond to column (or row) names of original matrix.

  • for x a dataframe, returns NULL (not yet implemented)


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.