Description Usage Arguments Value Examples
View source: R/rm.cols.Hst.ls.R
Remove spacial covariates from space-time covariate list
1 | rm.cols.Hst.ls(Hst.ls, rm.col.ndx)
|
Hst.ls |
Space-time covariates (of supporting sites). A list of length τ, each element should be a numeric n x p_st matrix. |
rm.col.ndx |
Which columns of |
An unnamed list of length τ, each element will be a numeric n x p_st - p_rm matrix, where p_rm is the length of rm.col.ndx
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
tau <- 21
n <- 7
pst <- 5
Hst.ls <- list()
for(i in 1:tau) { Hst.ls[[i]] <- matrix(1:pst, n, pst, byrow=TRUE) }
rm.cols.Hst.ls(Hst.ls, c(1,3))
## The function is currently defined as
function (Hst.ls, rm.col.ndx)
{
tau <- length(Hst.ls)
for (i in 1:tau) {
Hst.ls[[i]] <- Hst.ls[[i]][, -rm.col.ndx, drop = FALSE]
}
return(Hst.ls)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.