Skip to content
Prev 171317 / 398503 Next

split/decompose lines

Mafalda Viana-2 wrote:
olddata[rep(1:nrow(olddata),olddata$B),] 
repeats the rows of the data frame the appropriate number
of times.  The new Frequency column is trivial
(rep(1,sum(olddata$B))

  Ben Bolker