Skip to content

Commit

Permalink
correct the way to assign levels attribute for observation dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
wangben718 committed Jan 22, 2024
1 parent 84daec8 commit c607c4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/prepare_ae_specific.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ prepare_ae_specific <- function(meta,

if (!"factor" %in% class(obs[[obs_group]])) {
warning("In observation level data, force group variable '", obs_group, "' be a factor")
obs[[obs_group]] <- factor(obs[[obs_group]], levels = levels(pop[[pop_group]]))
obs[[obs_group]] <- factor(obs[[obs_group]])
levels(obs[[obs_group]]) <- levels(pop[[pop_group]])
}

# Add a total group to display total column
Expand Down

0 comments on commit c607c4b

Please sign in to comment.