Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 55 additions & 43 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -42,51 +42,63 @@ export(write_hrc)
export(write_hrc2)
import(data.table, except = transpose)
import(utils)
importFrom(dplyr,"%>%")
importFrom(dplyr,across)
importFrom(dplyr,all_of)
importFrom(dplyr,arrange)
importFrom(dplyr,bind_rows)
importFrom(dplyr,case_when)
importFrom(dplyr,distinct)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,last_col)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,n_distinct)
importFrom(dplyr,pull)
importFrom(dplyr,rename)
importFrom(dplyr,rename_with)
importFrom(dplyr,row_number)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(dplyr,summarise)
importFrom(dplyr,tibble)
importFrom(dplyr,ungroup)
importFrom(dplyr,where)
importFrom(igraph,graph_from_data_frame)
importFrom(igraph,which_mutual)
importFrom(lifecycle,badge)
importFrom(lifecycle,deprecated)
importFrom(purrr,compact)
importFrom(purrr,discard)
importFrom(purrr,imap_dfr)
importFrom(purrr,list_c)
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map_at)
importFrom(purrr,transpose)
importFrom(dplyr,
"%>%",
across,
all_of,
arrange,
bind_rows,
case_when,
distinct,
everything,
filter,
group_by,
last_col,
left_join,
mutate,
n,
n_distinct,
pull,
rename,
rename_with,
row_number,
rowwise,
select,
summarise,
tibble,
ungroup,
where
)
importFrom(igraph,
graph_from_data_frame,
which_mutual
)
importFrom(lifecycle,
badge,
deprecated
)
importFrom(purrr,
compact,
discard,
imap_dfr,
list_c,
map,
map2,
map_at,
transpose
)
importFrom(rlang,.data)
importFrom(sdcHierarchies,hier_convert)
importFrom(sdcHierarchies,hier_import)
importFrom(sdcHierarchies,
hier_convert,
hier_import
)
importFrom(stats,setNames)
importFrom(stringr,str_detect)
importFrom(tidyr,nest)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,unnest)
importFrom(tidyr,unnest_wider)
importFrom(tidyr,
nest,
pivot_longer,
unnest,
unnest_wider
)
importFrom(utils,combn)
importFrom(zoo,na.locf)
8 changes: 4 additions & 4 deletions R/summarize_secret.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Provide the summary of the suppression pattern from a rtauargus result
#'
#' @param res_tau either the data.frame resulting from tab_rtauargus run or
#' the list of data.frame resulting from tab_multimanager run
#' the list of data.frame resulting from tab_multi_manager run
#' @param var the quantitative variable name to use for values stats of suppression
#' (default to `NULL` that is the stats are only computed depending on the number of cells )
#' @param secret_var the name of the variable indicating the primary suppressed cells
Expand Down Expand Up @@ -77,8 +77,8 @@ summarize_secret <- function(res_tau, var = NULL, secret_var = "is_secret_prim")
dplyr::mutate(
status = case_when(
is_secret_prim ~ "primary suppr.",
final_status_ta != "V" ~ "secondary suppr.",
TRUE ~ "published"
(final_status_ta == "V") | (final_status_ta == FALSE) ~ "published",
TRUE ~ "secondary suppr."
)) |>
dplyr::mutate(status = factor(
status,
Expand Down Expand Up @@ -118,7 +118,7 @@ summarize_secret <- function(res_tau, var = NULL, secret_var = "is_secret_prim")

}

return( purrr::map(res_tau, summarize_secret, var = var) )
return( purrr::map(res_tau, summarize_secret, var = var, secret_var = secret_var) )

}

Expand Down
2 changes: 1 addition & 1 deletion man/summarize_secret.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.