Dear all,
I´ve got a simple self-written function to calculate the mean + s.e. from arcsine-transformed data:
backsin<-function(x,y,...){ backtransf<-list() backtransf$back<-((sin(x[x!="NA"]))^2)*100 backtransf$mback<-tapply(backtransf$back,y[x!="NA"],mean) backtransf$sdback<-tapply(backtransf$back,y[x!="NA"],stdev)/sqrt(length(y[x!="NA"])) backtransf }
I would like to apply this function to whole datasets, such as
tapply(variable,list(A,B,C,D),backsin)
Of course, this doesn´t work with the way in which the backsin() function is specified.
Does anyone have suggestions on how I could improve my function?
Regards, Christoph
______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html