Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correction to cellIndexTable #1

Open
derek-corcoran-barrios opened this issue Nov 30, 2020 · 0 comments
Open

correction to cellIndexTable #1

derek-corcoran-barrios opened this issue Nov 30, 2020 · 0 comments

Comments

@derek-corcoran-barrios
Copy link

Correction to the cellIndexTable specifically the toInteger was not working

cellIndexTable <- function (env, nCellChunks, sumDirs, toInteger = T)
{
co = coordinates(env)
keep = complete.cases(values(env))
co = co[keep, ]
if (toInteger)
co = apply(co, 2, as.integer)
if (nCellChunks > 1) {
chunks = cut(1:nrow(co), nCellChunks, labels = FALSE)
}
else {
chunks = rep(1, nrow(co))
}
cell.ind = data.frame(co, cellID = as.integer(cellFromXY(env,
co)), chunkID = as.integer(chunks))
cell.ind = cell.ind %>% data.frame
saveRDS(cell.ind, file = paste0(sumDirs$sumBaseDir, "/cellIndexTable.rds"))
cell.ind
}

bjohnso005 pushed a commit that referenced this issue Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant