responseTransform: Transforms a response

Description Usage Arguments Value Note Author(s) Examples

View source: R/responseTransform.R

Description

Transforms a response based on a selection from the GUI input.

Usage

1
responseTransform(Data, ResponVar, Trans)

Arguments

Data

A data set.

ResponVar

The name (as a string) of the response variable.

Trans

The name (as a string) of the response variable. Can take on the values of c('Transformation', 'None', 'Log',Log1', 'Square_Root', 'Arcsin', 'Rank').

Value

OutData

The original data set with a new variable called 'TransformedResponse' which is the rank transform of the response.

Note

The log transformation is the common log (base 10) transformation, while 'Arcsin' is the arcsin of the square root of the response. The 'Rank' transformation uses rankTransform.

Author(s)

Joe Swintek

Examples

1
2
3
4
5
6
7
8
9
	#Data 
		data(lengthWeightData)
	#Subset the data
		SubData<-lengthWeightData[lengthWeightData$Age=='16 week', ] 
		SubData<-SubData[SubData$Generation=='F1', ]
		SubData<-SubData[SubData$SEX=='M', ]
	#Run 
		RankData<-responseTransform(Data=SubData, ResponVar='WEIGHT', Trans='Log')
		head(RankData)

StatCharrms documentation built on Nov. 14, 2020, 5:09 p.m.