Skip to content

Commit def4dff

Browse files
fix of unlabel fn
1 parent db57363 commit def4dff

27 files changed

Lines changed: 35 additions & 30 deletions

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ importFrom(rlang,exec)
137137
importFrom(rlang,sym)
138138
importFrom(sinew,makeOxyFile)
139139
importFrom(sinew,makeOxygen)
140-
importFrom(sjlabelled,unlabel)
141140
importFrom(stats,setNames)
142141
importFrom(stringi,stri_locate_last_fixed)
143142
importFrom(stringi,stri_replace_first_regex)
@@ -152,6 +151,7 @@ importFrom(stringr,str_replace)
152151
importFrom(stringr,str_replace_all)
153152
importFrom(stringr,str_sub)
154153
importFrom(stringr,str_trim)
154+
importFrom(summarytools,unlabel)
155155
importFrom(testit,assert)
156156
importFrom(tibble,add_case)
157157
importFrom(tibble,is_tibble)

R/db_fns_dmt_tb.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' \item{title_chr}{Title (a character vector)}
1010
#' \item{desc_chr}{Description (a character vector)}
1111
#' \item{details_chr}{Details (a character vector)}
12-
#' \item{inc_for_main_user_lgl}{Inc for main user (a logical vector)}
12+
#' \item{inc_for_main_user_lgl}{Include for main user (a logical vector)}
1313
#' \item{output_chr}{Output (a character vector)}
1414
#' \item{example_lgl}{Example (a logical vector)}
1515
#' \item{args_ls}{Arguments (a list)}

R/fn_add.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ add_indefartls_to_phrases <- function (abbreviated_phrase_1L_chr, abbreviations_
9494
#' @importFrom dplyr filter pull bind_rows arrange
9595
#' @importFrom rlang sym
9696
#' @importFrom Hmisc label
97-
#' @importFrom sjlabelled unlabel
97+
#' @importFrom summarytools unlabel
9898
#' @keywords internal
9999
add_lups <- function (template_lup, new_lup, key_var_nm_1L_chr, priority_lup_for_dupls_1L_chr = "template")
100100
{
@@ -111,10 +111,11 @@ add_lups <- function (template_lup, new_lup, key_var_nm_1L_chr, priority_lup_for
111111
labels_chr <- Hmisc::label(new_lup) %>% unname()
112112
}
113113
if (!all(labels_chr %>% unique() == "")) {
114-
Hmisc::label(template_lup %>% sjlabelled::unlabel()) <- as.list(Hmisc::label(labels_chr) %>%
115-
unname())
116-
Hmisc::label(new_lup %>% sjlabelled::unlabel()) <- as.list(Hmisc::label(labels_chr) %>%
114+
template_lup <- template_lup %>% summarytools::unlabel()
115+
new_lup <- new_lup %>% summarytools::unlabel()
116+
Hmisc::label(template_lup) <- as.list(labels_chr %>%
117117
unname())
118+
Hmisc::label(new_lup) <- as.list(labels_chr %>% unname())
118119
}
119120
combined_lups <- dplyr::bind_rows(template_lup, new_lup) %>%
120121
dplyr::arrange(!!rlang::sym(key_var_nm_1L_chr))

R/fn_make.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ make_depnt_fns_ls <- function (arg_ls, pkg_depcy_ls)
241241
#' force_false_chr = NA_character_), args_ls_ls = NULL)
242242
#' @param fn_type_lup_tb Function type lookup table (a tibble)
243243
#' @param abbreviations_lup Abbreviations (a lookup table), Default: NULL
244-
#' @param inc_all_mthds_1L_lgl Inc all mthds (a logical vector of length one), Default: T
244+
#' @param inc_all_mthds_1L_lgl Include all methods (a logical vector of length one), Default: T
245245
#' @return All functions documentation (a tibble)
246246
#' @rdname make_dmt_for_all_fns
247247
#' @export
@@ -930,12 +930,12 @@ make_pkg_desc_ls <- function (pkg_nm_1L_chr = get_dev_pkg_nm(), pkg_title_1L_chr
930930
URL = paste0(urls_chr, collapse = ", "))
931931
return(pkg_desc_ls)
932932
}
933-
#' Make ret object description
934-
#' @description make_ret_obj_desc() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make ret object description. The function returns Ret object description (a character vector of length one).
933+
#' Make return object description
934+
#' @description make_ret_obj_desc() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make return object description. The function returns Return object description (a character vector of length one).
935935
#' @param fn Function (a function)
936936
#' @param abbreviations_lup Abbreviations (a lookup table)
937937
#' @param starts_sentence_1L_lgl Starts sentence (a logical vector of length one), Default: T
938-
#' @return Ret object description (a character vector of length one)
938+
#' @return Return object description (a character vector of length one)
939939
#' @rdname make_ret_obj_desc
940940
#' @export
941941

R/fn_update.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ update_fn_dmt_with_slots <- function (fn_name_1L_chr, fn_dmt_1L_chr)
144144
#' @param title_ls Title (a list), Default: NULL
145145
#' @param desc_ls Description (a list), Default: NULL
146146
#' @param details_ls Details (a list), Default: NULL
147-
#' @param inc_for_main_user_lgl_ls Inc for main user (a list of logical vectors), Default: NULL
147+
#' @param inc_for_main_user_lgl_ls Include for main user (a list of logical vectors), Default: NULL
148148
#' @param output_ls Output (a list), Default: NULL
149149
#' @param example_ls Example (a list), Default: NULL
150150
#' @param args_ls_ls Arguments (a list of lists), Default: NULL

R/fn_write.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ write_from_tmp <- function (temp_path_1L_chr, dest_path_1L_chr, edit_fn = functi
440440
writeLines(txt_chr, fileConn)
441441
close(fileConn)
442442
}
443-
#' Write inst directory
444-
#' @description write_inst_dir() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write inst directory. The function is called for its side effects and does not return a value. WARNING: This function writes R scripts to your local environment. Make sure to only use if you want this behaviour
443+
#' Write instance directory
444+
#' @description write_inst_dir() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write instance directory. The function is called for its side effects and does not return a value. WARNING: This function writes R scripts to your local environment. Make sure to only use if you want this behaviour
445445
#' @param path_to_pkg_rt_1L_chr Path to package root (a character vector of length one), Default: getwd()
446446
#' @return NULL
447447
#' @rdname write_inst_dir
@@ -508,7 +508,7 @@ write_links_for_website <- function (path_to_pkg_rt_1L_chr = getwd(), user_manua
508508
#' @param dir_path_chr Directory path (a character vector)
509509
#' @param rt_dev_dir_path_1L_chr Root development directory path (a character vector of length one), Default: normalizePath("../../../")
510510
#' @param pkg_nm_1L_chr Package name (a character vector of length one)
511-
#' @param inc_fns_idx_dbl Inc functions idx (a double vector), Default: NA
511+
#' @param inc_fns_idx_dbl Include functions index (a double vector), Default: NA
512512
#' @return Function arguments to rnm (a list)
513513
#' @rdname write_new_arg_sfxs
514514
#' @export

data-raw/DATASET.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,11 @@ write_and_doc_fn_fls(fns_dmt_tb,
142142
dev_pkgs_chr = NA_character_,
143143
update_pkgdown_1L_lgl = T)
144144
#
145-
# write_links_for_website(user_manual_url_1L_chr = "https://github.com/ready4-dev/ready4fun/releases/download/v0.0.0.9279/ready4fun_user_0.0.0.9279.pdf",
146-
# developer_manual_url_1L_chr = "https://github.com/ready4-dev/ready4fun/releases/download/v0.0.0.9279/ready4fun_developer_0.0.0.9279.pdf",
147-
# project_website_url_1L_chr = "https://www.ready4-dev.com/")
145+
# PAUSE FOR INTERACTIVE
146+
#
147+
write_links_for_website(user_manual_url_1L_chr = "https://github.com/ready4-dev/ready4fun/releases/download/v0.0.0.9279/ready4fun_user_0.0.0.9279.pdf",
148+
developer_manual_url_1L_chr = "https://github.com/ready4-dev/ready4fun/releases/download/v0.0.0.9279/ready4fun_developer_0.0.0.9279.pdf",
149+
project_website_url_1L_chr = "https://www.ready4-dev.com/")
148150

149151
# 12. Create vignettes
150152
# NOTE TO SELF: Currently Vignettes are overwritten by this last step. Need to implement more sophisticated workflow.

data-raw/fns/add.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ add_lups <- function(template_lup,
149149
labels_chr <- Hmisc::label(new_lup) %>% unname()
150150
}
151151
if(!all(labels_chr %>% unique() =="")){
152-
Hmisc::label(template_lup %>% sjlabelled::unlabel()) <- as.list(Hmisc::label(labels_chr) %>% unname())
153-
Hmisc::label(new_lup %>% sjlabelled::unlabel()) <- as.list(Hmisc::label(labels_chr) %>% unname())
152+
template_lup <- template_lup %>% summarytools::unlabel()
153+
new_lup <- new_lup %>% summarytools::unlabel()
154+
Hmisc::label(template_lup) <- as.list(labels_chr %>% unname())
155+
Hmisc::label(new_lup) <- as.list(labels_chr %>% unname())
154156
}
155157
combined_lups <- dplyr::bind_rows(template_lup,
156158
new_lup) %>%

data/abbreviations_lup.rda

462 Bytes
Binary file not shown.

data/fn_type_lup_tb.rda

207 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)