Description Usage Arguments Value Note Author(s) Examples
View source: R/responseTransform.R
Transforms a response based on a selection from the GUI input.
1 | responseTransform(Data, ResponVar, Trans)
|
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'). |
OutData |
The original data set with a new variable called 'TransformedResponse' which is the rank transform of the response. |
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
.
Joe Swintek
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.