R version 2.6.2 (2008-02-08) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(0.5800,0.5800,0.5900,0.6000,0.6000,0.6100,0.6200,0.6100,0.6200,0.6200,0.6200,0.6300,0.6300,0.6300,0.6300,0.6300,0.6300,0.6300,0.6300,0.6400,0.6300,0.6300,0.6300,0.6300,0.6300,0.6400,0.6500,0.6500,0.6500,0.6500,0.6500,0.6600,0.6500,0.6600,0.6600,0.6600,0.6600,0.6800,0.6900,0.7000,0.7100,0.7100,0.7000,0.7000,0.7000,0.7000,0.7100,0.7000,0.7000,0.7000,0.6900,0.7000,0.6900,0.6900,0.6900,0.7000,0.7000,0.7100,0.7100,0.7100,0.7200,0.7300,0.7400,0.7400,0.7400,0.7400,0.7500,0.7500,0.7600,0.7600,0.7600,0.7600,0.7600,0.7700,0.7700,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.7800,0.8000,0.8000,0.8000,0.8100,0.8100,0.8100,0.8000,0.8100,0.8100,0.8100,0.8000,0.8200,0.8300,0.8300) > par1 = '4' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > (n <- length(x)) [1] 96 > (np <- floor(n / par1)) [1] 24 > arr <- array(NA,dim=c(par1,np)) > j <- 0 > k <- 1 > for (i in 1:(np*par1)) + { + j = j + 1 + arr[j,k] <- x[i] + if (j == par1) { + j = 0 + k=k+1 + } + } > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 0.58 0.60 0.62 0.63 0.63 0.63 0.63 0.65 0.65 0.66 0.71 0.70 0.70 0.69 [2,] 0.58 0.61 0.62 0.63 0.63 0.63 0.64 0.65 0.66 0.68 0.71 0.70 0.70 0.69 [3,] 0.59 0.62 0.62 0.63 0.63 0.63 0.65 0.65 0.66 0.69 0.70 0.71 0.69 0.69 [4,] 0.60 0.61 0.63 0.63 0.64 0.63 0.65 0.66 0.66 0.70 0.70 0.70 0.70 0.70 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [1,] 0.70 0.72 0.74 0.76 0.76 0.78 0.78 0.80 0.80 0.80 [2,] 0.71 0.73 0.74 0.76 0.77 0.78 0.78 0.81 0.81 0.82 [3,] 0.71 0.74 0.75 0.76 0.77 0.78 0.80 0.81 0.81 0.83 [4,] 0.71 0.74 0.75 0.76 0.78 0.78 0.80 0.81 0.81 0.83 > arr.mean <- array(NA,dim=np) > arr.sd <- array(NA,dim=np) > arr.range <- array(NA,dim=np) > for (j in 1:np) + { + arr.mean[j] <- mean(arr[,j],na.rm=TRUE) + arr.sd[j] <- sd(arr[,j],na.rm=TRUE) + arr.range[j] <- max(arr[,j],na.rm=TRUE) - min(arr[,j],na.rm=TRUE) + } > arr.mean [1] 0.5875 0.6100 0.6225 0.6300 0.6325 0.6300 0.6425 0.6525 0.6575 0.6825 [11] 0.7050 0.7025 0.6975 0.6925 0.7075 0.7325 0.7450 0.7600 0.7700 0.7800 [21] 0.7900 0.8075 0.8075 0.8200 > arr.sd [1] 0.009574271 0.008164966 0.005000000 0.000000000 0.005000000 0.000000000 [7] 0.009574271 0.005000000 0.005000000 0.017078251 0.005773503 0.005000000 [13] 0.005000000 0.005000000 0.005000000 0.009574271 0.005773503 0.000000000 [19] 0.008164966 0.000000000 0.011547005 0.005000000 0.005000000 0.014142136 > arr.range [1] 0.02 0.02 0.01 0.00 0.01 0.00 0.02 0.01 0.01 0.04 0.01 0.01 0.01 0.01 0.01 [16] 0.02 0.01 0.00 0.02 0.00 0.02 0.01 0.01 0.03 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 0.001584 0.006602 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in foreign function call (arg 4) Calls: lm -> lm.fit -> .Fortran Execution halted