scriptDS: Generate knitR script for descriptive statistics

Description Usage Arguments Value Examples

Description

This helper function prints the knitR code necessary to print the descriptive stats for all the specified factors in a data.table.

Usage

1
scriptDS(dataT, facF, DV, subF, levelV = 2, file = "", alpha = 0.05)

Arguments

dataT

The data table

facF

The name of the column containing the factor on which the comparisons are operated.

DV

Name of the column containing the dependant variable.

subF

Name of the column containing the subject code.

levelV

Heading level.A number between 2 and 5

file

Name of the file to output to. If the file already exists, it will append _1 to the name.

alpha

Significance level.

Value

Prints the knitR code in the specified file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("donn_ag")
dataT<-donn_ag
facF<-"Trial_Block,Group,dist,dur"
levelV<-2
file<-""
DV<-"relE"
subF<-"sub"
alpha<-.05

scriptDS(dataT = dataT,facF = facF,DV = DV,subF = subF,levelV = levelV,file=file)

VinLaflamme/muCoVL documentation built on May 7, 2019, 7:14 p.m.