prepare: Prepare a cg data object from a data frame

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/utilities.R

Description

Reads in a data frame and settings in order to create a cg Data object.

Usage

1

Arguments

type

Values and synonyms to create a cg data object. For one factor / unpaired samples, either "onefactor" or "unpairedgroups" can be specified.

For paired samples, either "paireddifference" or "pairedgroups" can be used.

Partial matching also allows shortened forms such as "unpaired" or "paireddiff".

...

Depends on the specific function that is called according to the type argument. For current valid calls, no ... arguments are used.

Value

See cgOneFactorData and cgPairedDifferenceData for possible valid objects that are created, dependent on the type and ... arguments that are correctly specified.

Note

Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.

Author(s)

Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]

See Also

prepareCGOneFactorData, prepareCGPairedDifferenceData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data(canine)
canine.data <- prepare(type="unpairedgroups", dfr=canine,
                       format="groupcolumns",
                       analysisname="Canine",
                       endptname="Prostate Volume",
                       endptunits=expression(plain(cm)^3),
                       digits=1, logscale=TRUE, refgrp="CC")

## Censored Data
data(gmcsfcens)
gmcsfcens.data <- prepare(type="onefactor",
                          dfr=gmcsfcens, format="groupcolumns",
                          analysisname="cytokine",
                          endptname="GM-CSF (pg/ml)",
                          logscale=TRUE)

## Paired Groups
data(anorexiaFT)
anorexiaFT.data <- prepare(type="paireddiff",  ## Partial matching
                           dfr=anorexiaFT, format="groupcolumns",
                           analysisname="Anorexia FT",
                           endptname="Weight",
                           endptunits="lbs",
                           expunitname="Patient",
                           digits=1, logscale=TRUE)

cg documentation built on May 30, 2017, 12:12 a.m.