Hi John,
Just printing the result gives a good indication where the problem lies:
frm %% rowwise() %% do(MM=max(as.numeric(.)))
Source: local data frame [6 x 1]
Groups: by row
MM
1 dbl[1]
2 dbl[1]
3 dbl[1]
4 dbl[1]
5 dbl[1]
6 dbl[1]
do() is designed to produce scalars (e.g. a linear
I'm using the dplyr package to perform one-row-at-a-time processing of a data
frame:
rnd6 = function() sample(1:300, 6)
frm = data.frame(AA=rnd6(), BB=rnd6(), CC=rnd6())
frm
AA BB CC
1 123 50 45
2 12 30 231
3 127 147 100
4 133 32 129
5 66 235 71
6 38 264 261
The interface is
2 matches
Mail list logo