Displaying 3 results from an estimated 3 matches for "maxflooddepth_".
2013 Jan 27
1
lapply and SpatialGridDataFrame error
...ASCII grid
format to .shp files to .bnd files for BayesX.
I have the following R code to operate on those files:
library(maptools)
library(Grid2Polygons)
library(BayesX)
library(BayesXsrc)
library(R2BayesX)
readfunct <- function(x)
{
u <- readAsciiGrid(x)
}
modfilesmore <- paste0("MaxFloodDepth_", 1:54, ".txt")
modeldepthsmore <- lapply(modfilesmore, readfunct)
maxdepth.plys <- lapply(modeldepthsmore, Grid2Polygons(modeldepthsmore,
level = FALSE))
layers <- paste0("examples/floodlayers_", 1:54)
polyshapes <- lapply(writePolyShape(maxdepth.plys, layers...
2012 Dec 20
4
comparison of large data set
Hi, how are you?
I have the following truncated R code:
fileobs <- "MaxFloodDepth_Observed.txt"
file1 <- "MaxFloodDepth_1.txt"
file2 <- "MaxFloodDepth_2.txt"
...
file54 <- "MaxFloodDepth_54.txt"
observeddepth = as.matrix(read.ascii.grid(fileobs)$data)
observeddepth[observeddepth!=0]<-1
modeldepth1 = as.matrix(read.ascii.grid(fil...
2012 Dec 21
0
variable names in numeric list and Bayesian inference
Hi everyone, I have received assistance from my previous 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.name...