[R] subtotals based on price bands?

jcrosbie james at crosb.ie
Wed Oct 17 16:58:47 CEST 2012


I would like to create a subtotal table with custom bands. 

seq1 = seq(0, 100, by = 5) 
seq2 = seq(100, 1000, by = 100) 
Bands = c(seq1, seq2) 
#Prices 
Prices = sample(1:1000, 200, replace=F) 
#corresponding size for the given price above. 
size = sample(1:1000, 200, replace=F) 

How would  I find the subtotal of the size based on a given price falls
within a band? 



--
View this message in context: http://r.789695.n4.nabble.com/subtotals-based-on-price-bands-tp4646473.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list