-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Dear Jeff, I just stumbled into this:
tbl <- tibble::tibble(ch = c("1001", "1010", "0110"),
sex = factor(c("M", "M", "F"))
)
attempt1 <- tbl |>
marked::process.data(groups = "sex")
#> Warning: Unknown or uninitialised column: `Freq`.
#> Warning: Unknown or uninitialised column: `freq`.
#> 3 capture histories collapsed into 3
#> Warning: Unknown or uninitialised column: `id`.
#> Error in marked::process.data(tbl, groups = "sex"):
#> sex is not a factor variable
attempt2 <- tbl |>
as.data.frame() |>
marked::process.data(groups = "sex")
#> 3 capture histories collapsed into 3Created on 2024-04-06 with reprex v2.1.0
I traced the error back to process.data.R#L413, that is:
vari = data[, groups[i]]This kind of subsetting does not produce a factor with tidyverse tibbles.
Thought you may want to know. Thanks for this nice library!
Metadata
Metadata
Assignees
Labels
No labels