search for: getmaxval

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

Did you mean: getauxval
2007 Aug 31
3
data frame row manipulation
...","Bob", "Michael","Steve","Bob","Michael","Steve","Bob"), vol=c(3,5,4,2,4,5,7,6,7)) evaluation # maxval=summaryBy(vol ~ name,data=evaluation,FUN = function(x) { c(ma=max(x)) } ) maxval # over all days per person #function getMaxVal=function(x) { maxval$vol.ma[maxval$name==x] } getMaxVal("Steve") # testing the function for one name is ok #we want to add a column, that shows the daily drinkingvolume in relation to the persons max-vol. evaluation[,"relDrink"]= evaluation$vol/getMaxVal(evaluation$name) # # th...