search for: score_scale

Displaying 1 result from an estimated 1 matches for "score_scale".

2011 Jun 03
0
ragged data.frame? using plyr
...(2,100),rep(3,100),rep(4,100),rep(5,100))) I want to "normalise" it using the following function (unless you have a better idea...): adj.values<-function(dframe){ value_mean<-mean(dframe$value) value_sd<-sd(dframe$value) norm_value<-(dframe$value-value_mean)/value_sd score_scale<-100 score_offset<-1000 scaled_value<-norm_value*score_scale+score_offset names(scaled_value)<-dframe$id return(scaled_value) } score_out<-ddply(dat,.(day),adj.values) Gives me my data.frame all nice and pretty and ready to do the following: score_out.melt<-melt(score_o...