search for: readfun

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

Did you mean: radfun
2012 Dec 21
0
variable names in numeric list and Bayesian inference
...post (comparison of large data set), but I still need some assistance. This is the revised code (along with some new code that I am requesting assistance with correcting): files <- paste0("MaxFloodDepth_", 1:54, ".txt") fileobs <- "MaxFloodDepth_Observed.txt" readfun <- function(x) { u <- as.matrix(read.ascii.grid(x)$data) u[u != 0] <- 1 u } observeddepth <- readfun(fileobs) modeldepth <- lapply(files, readfun) mynames <- function(x) { variable.names(modeldepth, prefix = "ModelDepth.") x } modeldepths <- lapply(modeldepth, my...