Displaying 2 results from an estimated 2 matches for "modeldepth54".
Did you mean:
modeldepth
2012 Dec 20
4
comparison of large data set
...odDepth_54.txt"
observeddepth = as.matrix(read.ascii.grid(fileobs)$data)
observeddepth[observeddepth!=0]<-1
modeldepth1 = as.matrix(read.ascii.grid(file1)$data)
modeldepth1[modeldepth1!=0]<-1
modeldepth2 = as.matrix(read.ascii.grid(file2)$data)
modeldepth2[modeldepth2!=0]<-1
...
modeldepth54 = as.matrix(read.ascii.grid(file54)$data)
modeldepth54[modeldepth54!=0]<-1
Each modeldepth* and observeddepth is 272x976
f2 <- function(obs, dat){
obs <- as.logical(obs)
dat <- as.logical(dat)
s1 <- sum(obs & dat)
s2 <- sum(obs & !dat)
s3 <- sum(!obs & dat)
s1/(s1...
2012 Dec 21
0
variable names in numeric list and Bayesian inference
...u != 0] <- 1
u
}
observeddepth <- readfun(fileobs)
modeldepth <- lapply(files, readfun)
mynames <- function(x) {
variable.names(modeldepth, prefix = "ModelDepth.")
x
}
modeldepths <- lapply(modeldepth, mynames) # here the objective is to
assign the name of ModelDepth1: ModelDepth54 for the 54 numeric entries
in the modeldepths element to use this information in later steps. I
need to know which ModelDepth element (1:54) is still relevant after I
determine f2 for each of the 54 elements. I only want to keep those
ModelDepth elements and their associated name.
I am not gettin...