Displaying 1 result from an estimated 1 matches for "numberofruns".
Did you mean:
numberofbins
2009 Sep 02
2
Average over data sets
...ch variable.
The code below works, but it seems like I should be able to do the
second part without a for loop. I played with sapply(myList, mean),
but that seems to take the mean between time points and files, rather
than just between files.
#Number of files to calculate mean value between
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[...