Skip to content

Commit

Permalink
fix dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
stemangiola committed Jul 9, 2023
1 parent 9bf0be9 commit 7816bc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ importFrom(dplyr,starts_with)
importFrom(dplyr,summarise)
importFrom(dplyr,summarise_all)
importFrom(dplyr,ungroup)
importFrom(glue,glue)
importFrom(lifecycle,deprecate_soft)
importFrom(lifecycle,deprecate_warn)
importFrom(magrittr,"%$%")
Expand Down
7 changes: 3 additions & 4 deletions R/glmmSeq.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ standard_error = function (model)
#' @importFrom purrr map2_dfc
#' @importFrom tidyr pivot_longer
#' @importFrom tidyr pivot_wider
#' @importFrom glue glue
#' @importFrom dplyr join_by
#'
#' @keywords internal
Expand All @@ -41,7 +40,7 @@ lmer_to_confidence_intervals_random_effects = function(fit){
as_tibble(rownames = "group_id") |>
setNames(
"group_id" |>
c(glue("{.y}__{colnames(.x)}"))
c(sprintf("%s__%s", .y, colnames(.x)))
) |>
pivot_longer(-group_id, names_to = "parameter", values_to = "CI")
)
Expand All @@ -53,7 +52,7 @@ lmer_to_confidence_intervals_random_effects = function(fit){
as_tibble(rownames = "group_id") |>
setNames(
"group_id" |>
c(glue("{.y}__{colnames(.x)}"))
c(sprintf("%s__%s", .y, colnames(.x)))
) |>
pivot_longer(-group_id, names_to = "parameter", values_to = "mode")
)
Expand Down Expand Up @@ -236,7 +235,7 @@ glmmSeq = function (modelFormula, countdata, metadata, id = NULL, dispersion = N
# If matrix is too big because model is too big
#-----------------------------------------------#
rows_to_sample = sample(seq_len(nrow(designMatrix)), min(max_rows_for_matrix_multiplication, nrow(designMatrix)))
if(length(rows_to_sample) < nrow(designMatrix)) warning(glue("tidybulk says: for calculating p-value the combination of covariates has been limited to 10000 rather than {nrow(designMatrix)} othwerwise a matrix multiplication in the glmmSeq would overflow the momery available for arrays."))
if(length(rows_to_sample) < nrow(designMatrix)) warning(sprintf("tidybulk says: for calculating p-value the combination of covariates has been limited to 10000 rather than %d othwerwise a matrix multiplication in the glmmSeq would overflow the momery available for arrays.", nrow(designMatrix)))
designMatrix = designMatrix[rows_to_sample,,drop=FALSE]
modelData = modelData[rows_to_sample,,drop=FALSE]
#----------------------------------------------#
Expand Down

0 comments on commit 7816bc5

Please sign in to comment.