search for: getminmax1

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

Did you mean: getminmax2
2010 Dec 06
3
[plyr] Question regarding ddply: use of .(as.name(varname)) and varname in ddply function
...t;d1", "l13", "d13" ), row.names = c(1L, 2L, 3L, 1758L, 1759L, 1760L), class = "data.frame") ----------- If some one doesn't want to open github - here is the code ## Doesn't work # grp -- name of a column of the the data.frame df # function call is -- getMinMax1( df1 , grp = "var1") getMinMax1 <-function(df, grp){ dfret <- ddply( df , .(as.name(grp)), ## I am using as.name(grp), source of error function(x){ minmax <- c(mix(x[ , 3]), max(x[ ,3])) return(minmax) } )...