R-help,
 
I am trying to create a function that i pass a data set to and have the
function return some calculations based on data.
 
Allow me to illustrate:
 
myfunc <- function(lst,mn,sd){
   lst <- sort(lst)
   mn <- mean(lst)
   sd <- sqrt(var(lst))
   return(lst,mn,sd)
}
 
data1 <-c (1,2,3,4,5)
data2 <- c(6,7,8,9,10)
myfunc(data1,data1mn,data1sd)
myfunc(data2,data2mn,data2sd)
 
This snippet errors that data1mn not find and warns that return is
deprecating!!!!!!!!!!!
 
Can you help me?
 
Regards,
Bill
 



Bill Hunsicker
RF Micro Devices
7625 Thorndike Road
Greensboro, NC 27409-9421
bhunsicker@rfmd.com
336-678-5260(w)
610-597-9985(m)
336-678-5088(lab)


 


	[[alternative HTML version deleted]]

