Displaying 1 result from an estimated 1 matches for "retailsum".
Did you mean:
retails
2012 May 13
1
Help writing function in R....
...","golf"),
brand=c("x","y","z","y","x","a"),type=c("iron","ball","helmet","shoe","driver","iron"),
retail=c(124,.60,80,75,150,108),actual=c(112,.60,72,75,135,100))
retailsum=funtion(segment,brand,type){
datanew=dataold[which(dataoldsegment='segment' & dataoldbrand='brand' &
dataold$type='type'),c("retail","actaul")]
summary=c(dim(datanew)[1],colMeans(datanew)) return(summary) }
The code inside the function braces w...