Hi you all
I have a question regarding the function. In my function I divide the values by
the standard errors and sometimes the standard error is equal to zero and I get
the result NA. Can I write the function in the way that if the outcome of the
function is zero then the function is not conducted and it stays the value (not
divided by standard errors)? the code for my function is the following:
standardised.abnormal.returns<-lapply(seq_len(ncol(abnormal.returns)),function(i)
{abnormal.returns[,i]/standard.deviation[i,1]})
Thank you all for the help
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.