cSpread: Calculate the center spread (range) of a sample

Description Usage Arguments Value Author(s) Examples

Description

Calculate the center spread (range) of a sample

Usage

1
cSpread(x, frac = 0.95)

Arguments

x

A sample of data

frac

The fraction of the center part, the default is 0.95

Value

The range of the center part

Author(s)

Wayne Oldford and Xiaomei Yu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
table1 <- c(7999,7998,7998,7997)
cSpread(table1)

table2<-c(97.62,92.24,100.90,90.39,48.29,42.31,49.98,39.09,75.23,75.16,100.11,74.23,49.69,57.21,80.19,51.09)
table2 <- matrix(table2, nrow=4,byrow=TRUE,dimnames=list(c("North" ,"South","East","West"),c("Q1","Q2","Q3","Q4")))
table2
cSpread(table2, frac = 0.8)

#' UCBAdmissions
cSpread(UCBAdmissions, frac=1)

Titanic
cSpread(UCBAdmissions, frac=0.5)

rwoldford/tidy-table documentation built on May 12, 2019, 4:38 a.m.