[R] Possible bug in apply()

mikalzet@libero.it mikalzet at libero.it
Sat Oct 7 23:48:45 CEST 2000


On Sat, 7 Oct 2000, Clive Jenkins wrote:

 > # Read the data in
 > distr.dat <- matrix(scan("distr.dat"), byrow=T, ncol=60)
 Read 120 items
 > # Define a function to perform Shapiro-Wilk, with protection
 > # against values that would cause fatal errors in shapiro.test()
 > shap <- function(x){
 +   result.W <- NA; result.p <- NA    # Set default return value
 +   if (length(x[!is.na(x)])>3){      # Check for bad values

I copied your data and tried your example.
I get to this point, then I have a 'syntax error' message.
R-1.1.1 on linux-mandrake 7.1 .

Dr. Michele Alzetta

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list