Displaying 1 result from an estimated 1 matches for "revenue_pl".
2014 Mar 15
0
allocation error and high CPU usage from kworker and migration: memory fragmentation?
...ds is_PL column, a boolean
move <- merge(move, parent, by=c('store', 'year') # adds parent
column, an integer
setkeyv(move, by)
# this reduces move to a data.table with at most 6000 rows, but
always 4 columns
move <- move[, list(revenue=sum(price*units),
revenue_PL=sum(price*units*is_PL)),
keyby=by]
move[, category := gsub(search, replace, filename)]
return(move)
}
--
James Sams
sams.james at gmail.com