search for: myaverag

Displaying 1 result from an estimated 1 matches for "myaverag".

Did you mean: myaverage
2009 Sep 02
2
Average over data sets
...etween numberOfRuns = 20; myList = list(); for (i in 1:numberOfRuns) { #Read in file fileName = paste("output", i, ".dat", sep=""); myData = read.table(fileName, header=TRUE); #Append data frame to list myList[[i]] = myData; } #Create variable to store data means myAverage = myList[[1]]/numberOfRuns; for (i in 2:numberOfRuns) { myAverage = myAverage + myList[[i]]/numberOfRuns; } Is a list of data frames a sensible structure to store this or should I use an array? Any pointers gratefully received. Ed Long