Skip to content

Commit

Permalink
fix error from cmd check
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewphamilton committed Nov 15, 2023
1 parent 945d26b commit 81779f1
Show file tree
Hide file tree
Showing 26 changed files with 119 additions and 72 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cff-version: 1.2.0
message: "Matthew P Hamilton (2023). ready4: Implement Transparent, Reusable and Updatable Computational Health
Economic Models. Version 0.0.0.9131. Zenodo. https://doi.org/10.5281/zenodo.5606250"
Economic Models. Version 0.0.0.9132. Zenodo. https://doi.org/10.5281/zenodo.5606250"
authors:
- family-names: "Hamilton"
given-names: "Matthew P"
title: "ready4: Implement Transparent, Reusable and Updatable Computational Health
Economic Models"
version: 0.0.0.9131
version: 0.0.0.9132
doi: 10.5281/zenodo.5606250
date-released: 2023-11-15
url: "https://ready4-dev.github.io/ready4/"
16 changes: 4 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Collate:
'C4_Ready4Module.R'
'C4_Ready4Private.R'
'C4_Ready4Public.R'
'add.R'
'bind.R'
'fn_add.R'
'fn_bind.R'
'fn_get.R'
Expand All @@ -43,11 +41,9 @@ Collate:
'fn_transform.R'
'fn_update.R'
'fn_write.R'
'get.R'
'grp_generics.R'
'imp_fns.R'
'imp_mthds.R'
'make.R'
'mthd_authorSlot.R'
'mthd_characterizeSlot.R'
'mthd_depictSlot.R'
Expand All @@ -64,13 +60,7 @@ Collate:
'mthd_renewSlot.R'
'mthd_shareSlot.R'
'pkg_ready4.R'
'print.R'
'ready4-package.R'
'remove.R'
'rowbind.R'
'transform.R'
'update.R'
'write.R'
Imports:
assertthat,
bib2df,
Expand All @@ -80,7 +70,6 @@ Imports:
fs,
Hmisc,
kableExtra,
knitr,
lifecycle,
magrittr,
methods,
Expand All @@ -96,11 +85,14 @@ Imports:
stringi,
stringr,
testit,
testthat,
tibble,
tidyRSS,
tidyselect,
tools,
utils,
zen4R
VignetteBuilder: knitr
Suggests:
knitr,
pkgload,
testthat
18 changes: 12 additions & 6 deletions R/fn_make.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ make_additions_tb <- function (category_chr = character(0), library_chr = charac
#' @importFrom kableExtra cell_spec kable kable_styling column_spec spec_image
#' @examplesIf interactive()
#' # Likely to take more than one minute to execute.
#' make_code_releases_tbl("Framework", gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Module", gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Framework",
#' gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Module",
#' gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Program",
#' gh_repo_1L_chr = "ready4-dev/ready4")
#' make_code_releases_tbl("Subroutine",
#' gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl <- function (repo_type_1L_chr = c("Framework", "Module", "Package",
"Program", "Subroutine", "Program_and_Subroutine"), as_kbl_1L_lgl = T,
brochure_repos_chr = character(0), exclude_chr = character(0),
Expand Down Expand Up @@ -780,8 +784,10 @@ make_modules_tb <- function (pkg_extensions_tb = NULL, cls_extensions_tb = NULL,
#' @importFrom kableExtra cell_spec kable kable_styling
#' @examplesIf interactive()
#' # Likely to take more than one minute to execute.
#' make_programs_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4")
#' make_programs_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4")
#' make_programs_tbl("Program",
#' gh_repo_1L_chr = "ready4-dev/ready4")
#' make_programs_tbl("Subroutine",
#' gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl <- function (what_1L_chr = c("Program", "Subroutine", "Program_and_Subroutine"),
as_kbl_1L_lgl = F, exclude_chr = character(0), format_1L_chr = "%d-%b-%Y",
gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0",
Expand Down
10 changes: 7 additions & 3 deletions R/fn_write.R
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,8 @@ write_to_publish_dv_ds <- function (dv_ds_1L_chr, consent_1L_chr = "", consent_i
#' # Copy template RMD files
#' write_to_copy_rmds(dir_path_1L_chr = tempdir(),
#' fl_nm_1L_chr = "RMDs",
#' rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4"))
#' rmds_dir_1L_chr = system.file("MD_RMDs",
#' package = "ready4"))
#' # Typically you would now edit these templates before proceeding.
#' # Render post from RMD files.
#' write_to_render_post("RMDs", path_to_main_dir_1L_chr = tempdir())
Expand All @@ -1326,10 +1327,13 @@ write_to_publish_dv_ds <- function (dv_ds_1L_chr, consent_1L_chr = "", consent_i
#' # Copy template Rmarkdown file
#' write_to_copy_rmds(dir_path_1L_chr = tempdir(),
#' fl_nm_1L_chr = "Rmarkdown",
#' rmds_dir_1L_chr = system.file("MD_Rmarkdown", package = "ready4"))
#' rmds_dir_1L_chr = system.file("MD_Rmarkdown",
#' package = "ready4"))
#' # Typically you would now edit these templates before proceeding.
#' # Render post from RMD files.
#' write_to_render_post("Rmarkdown", path_to_main_dir_1L_chr = tempdir(), is_rmd_1L_lgl = F)
#' write_to_render_post("Rmarkdown",
#' path_to_main_dir_1L_chr = tempdir(),
#' is_rmd_1L_lgl = F)
write_to_render_post <- function (included_dirs_chr, path_to_main_dir_1L_chr, consent_1L_chr = "",
consent_indcs_int = 1L, is_rmd_1L_lgl = T, options_chr = c("Y",
"N"))
Expand Down
2 changes: 1 addition & 1 deletion data-raw/DATASET.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ c(readLines("R/imp_fns.R"), # update in ready4fun
"NULL"
) %>%
writeLines("R/imp_fns.R")
write_examples()
write_examples(consent_1L_chr = "Y")
usethis::use_cran_badge() # Export to ready4fun
devtools::build_vignettes()
#
Expand Down
9 changes: 6 additions & 3 deletions data-raw/examples/get_from_lup_obj.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lookup_tb <- tibble::tibble(Name = c("Sajid","Siobhan"), Treat = c("Cake", "Chocolate"))
get_from_lup_obj(lookup_tb, match_value_xx = "Siobhan", match_var_nm_1L_chr = "Name", target_var_nm_1L_chr = "Treat")
get_from_lup_obj(lookup_tb, match_value_xx = "Cake", match_var_nm_1L_chr = "Treat", target_var_nm_1L_chr = "Name")
lookup_tb <- tibble::tibble(Name = c("Sajid","Siobhan"),
Treat = c("Cake", "Chocolate"))
get_from_lup_obj(lookup_tb, match_value_xx = "Siobhan",
match_var_nm_1L_chr = "Name", target_var_nm_1L_chr = "Treat")
get_from_lup_obj(lookup_tb, match_value_xx = "Cake",
match_var_nm_1L_chr = "Treat", target_var_nm_1L_chr = "Name")

12 changes: 8 additions & 4 deletions data-raw/examples/make_code_releases_tbl.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
if (interactive()) {
# Likely to take more than one minute to execute.
make_code_releases_tbl("Framework", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Module", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Framework",
gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Module",
gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Program",
gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Subroutine",
gh_repo_1L_chr = "ready4-dev/ready4")
}
2 changes: 1 addition & 1 deletion data-raw/examples/make_ds_releases_tbl.R
Original file line number Diff line number Diff line change
@@ -1 +1 @@
make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = F)
make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = FALSE)
6 changes: 4 additions & 2 deletions data-raw/examples/make_programs_tbl.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if (interactive()) {
# Likely to take more than one minute to execute.
make_programs_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl("Program",
gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl("Subroutine",
gh_repo_1L_chr = "ready4-dev/ready4")
}
2 changes: 1 addition & 1 deletion data-raw/examples/print_data.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
datasets_tb <- get_datasets_tb("ready4-dev/ready4")
print_data(datasets_tb, by_dv_1L_lgl = T)
print_data(datasets_tb, by_dv_1L_lgl = TRUE)
print_data(datasets_tb, what_1L_chr = "real")
print_data(datasets_tb, what_1L_chr = "fakes")

6 changes: 4 additions & 2 deletions data-raw/examples/print_packages.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "framework")
print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "modules")
print_packages(gh_repo_1L_chr = "ready4-dev/ready4",
include_1L_chr = "framework")
print_packages(gh_repo_1L_chr = "ready4-dev/ready4",
include_1L_chr = "modules")
10 changes: 7 additions & 3 deletions data-raw/examples/write_to_render_post.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ if (interactive()) {
# Copy template RMD files
write_to_copy_rmds(dir_path_1L_chr = tempdir(),
fl_nm_1L_chr = "RMDs",
rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4"))
rmds_dir_1L_chr = system.file("MD_RMDs",
package = "ready4"))
# Typically you would now edit these templates before proceeding.
# Render post from RMD files.
write_to_render_post("RMDs", path_to_main_dir_1L_chr = tempdir())
Expand All @@ -15,8 +16,11 @@ if (interactive()) {
# Copy template Rmarkdown file
write_to_copy_rmds(dir_path_1L_chr = tempdir(),
fl_nm_1L_chr = "Rmarkdown",
rmds_dir_1L_chr = system.file("MD_Rmarkdown", package = "ready4"))
rmds_dir_1L_chr = system.file("MD_Rmarkdown",
package = "ready4"))
# Typically you would now edit these templates before proceeding.
# Render post from RMD files.
write_to_render_post("Rmarkdown", path_to_main_dir_1L_chr = tempdir(), is_rmd_1L_lgl = F)
write_to_render_post("Rmarkdown",
path_to_main_dir_1L_chr = tempdir(),
is_rmd_1L_lgl = F)
}
9 changes: 6 additions & 3 deletions man/examples/get_from_lup_obj.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
lookup_tb <- tibble::tibble(Name = c("Sajid","Siobhan"), Treat = c("Cake", "Chocolate"))
get_from_lup_obj(lookup_tb, match_value_xx = "Siobhan", match_var_nm_1L_chr = "Name", target_var_nm_1L_chr = "Treat")
get_from_lup_obj(lookup_tb, match_value_xx = "Cake", match_var_nm_1L_chr = "Treat", target_var_nm_1L_chr = "Name")
lookup_tb <- tibble::tibble(Name = c("Sajid","Siobhan"),
Treat = c("Cake", "Chocolate"))
get_from_lup_obj(lookup_tb, match_value_xx = "Siobhan",
match_var_nm_1L_chr = "Name", target_var_nm_1L_chr = "Treat")
get_from_lup_obj(lookup_tb, match_value_xx = "Cake",
match_var_nm_1L_chr = "Treat", target_var_nm_1L_chr = "Name")

12 changes: 8 additions & 4 deletions man/examples/make_code_releases_tbl.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
if (interactive()) {
# Likely to take more than one minute to execute.
make_code_releases_tbl("Framework", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Module", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Framework",
gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Module",
gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Program",
gh_repo_1L_chr = "ready4-dev/ready4")
make_code_releases_tbl("Subroutine",
gh_repo_1L_chr = "ready4-dev/ready4")
}
2 changes: 1 addition & 1 deletion man/examples/make_ds_releases_tbl.R
Original file line number Diff line number Diff line change
@@ -1 +1 @@
make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = F)
make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = FALSE)
6 changes: 4 additions & 2 deletions man/examples/make_programs_tbl.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
if (interactive()) {
# Likely to take more than one minute to execute.
make_programs_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl("Program",
gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl("Subroutine",
gh_repo_1L_chr = "ready4-dev/ready4")
}
2 changes: 1 addition & 1 deletion man/examples/print_data.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
datasets_tb <- get_datasets_tb("ready4-dev/ready4")
print_data(datasets_tb, by_dv_1L_lgl = T)
print_data(datasets_tb, by_dv_1L_lgl = TRUE)
print_data(datasets_tb, what_1L_chr = "real")
print_data(datasets_tb, what_1L_chr = "fakes")

6 changes: 4 additions & 2 deletions man/examples/print_packages.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "framework")
print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "modules")
print_packages(gh_repo_1L_chr = "ready4-dev/ready4",
include_1L_chr = "framework")
print_packages(gh_repo_1L_chr = "ready4-dev/ready4",
include_1L_chr = "modules")
10 changes: 7 additions & 3 deletions man/examples/write_to_render_post.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ if (interactive()) {
# Copy template RMD files
write_to_copy_rmds(dir_path_1L_chr = tempdir(),
fl_nm_1L_chr = "RMDs",
rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4"))
rmds_dir_1L_chr = system.file("MD_RMDs",
package = "ready4"))
# Typically you would now edit these templates before proceeding.
# Render post from RMD files.
write_to_render_post("RMDs", path_to_main_dir_1L_chr = tempdir())
Expand All @@ -15,8 +16,11 @@ if (interactive()) {
# Copy template Rmarkdown file
write_to_copy_rmds(dir_path_1L_chr = tempdir(),
fl_nm_1L_chr = "Rmarkdown",
rmds_dir_1L_chr = system.file("MD_Rmarkdown", package = "ready4"))
rmds_dir_1L_chr = system.file("MD_Rmarkdown",
package = "ready4"))
# Typically you would now edit these templates before proceeding.
# Render post from RMD files.
write_to_render_post("Rmarkdown", path_to_main_dir_1L_chr = tempdir(), is_rmd_1L_lgl = F)
write_to_render_post("Rmarkdown",
path_to_main_dir_1L_chr = tempdir(),
is_rmd_1L_lgl = F)
}
9 changes: 6 additions & 3 deletions man/get_from_lup_obj.Rd

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

12 changes: 8 additions & 4 deletions man/make_code_releases_tbl.Rd

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

2 changes: 1 addition & 1 deletion man/make_ds_releases_tbl.Rd

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

6 changes: 4 additions & 2 deletions man/make_programs_tbl.Rd

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

2 changes: 1 addition & 1 deletion man/print_data.Rd

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

6 changes: 4 additions & 2 deletions man/print_packages.Rd

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

10 changes: 7 additions & 3 deletions man/write_to_render_post.Rd

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

0 comments on commit 81779f1

Please sign in to comment.