Skip to content

correction to cellIndexTable #1

@derek-corcoran-barrios

Description

@derek-corcoran-barrios

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions