Displaying 1 result from an estimated 1 matches for "dataoldbrand".
2012 May 13
1
Help writing function in R....
...t;,"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 works on its own, but once I wrap a
function around it I start getting errors or it will just return 0 co...