Displaying 1 result from an estimated 1 matches for "list_of_data_fram".
Did you mean:
list_of_data_frames
2014 Jun 19
1
R is converting arg input to scientific notation, which is bad!
...er corresponds with the .csv file I'm
trying to call (030.csv).*
Below is my code:
pollutantmean <- function(directory, pollutant, id = 1:332){
filenames <- paste0(formatC(id, digits = 0, width = 3, flag = "0"), ".csv")
filepaths <- file.path(directory, filenames)
list_of_data_frames <- lapply(filepaths, read.csv)
big.df<-do.call(rbind,list_of_data_frames)
print(str(big.df))
mean(big.df[,pollutant], na.rm=TRUE)
}
I'm curious if formatC() is converting the number to scientific notation or
is that the default for R if there is no sequence when there could be.
Many o...