Skip to content

Commit

Permalink
updated arg nms
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewphamilton committed Apr 8, 2021
1 parent 11f15af commit c37e1cb
Show file tree
Hide file tree
Showing 38 changed files with 64 additions and 61 deletions.
12 changes: 6 additions & 6 deletions R/C3_ready4_dictionary.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ x
}
#' Make prototype ready4 s3 class defining a data dictionary tibble.
#' @description Create a new prototype for the ready4 s3 class defining a data dictionary tibble.
#' @param var_nm_chr Var name (a character vector), Default: character(0)
#' @param var_cat_chr Var cat (a character vector), Default: character(0)
#' @param var_desc_chr Var description (a character vector), Default: character(0)
#' @param var_type_chr Var type (a character vector), Default: character(0)
#' @param var_nm_chr Variable name (a character vector), Default: character(0)
#' @param var_ctg_chr Variable category categories (a character vector), Default: character(0)
#' @param var_desc_chr Variable description (a character vector), Default: character(0)
#' @param var_type_chr Variable type (a character vector), Default: character(0)
#' @return A prototype for ready4 s3 class defining a data dictionary tibble.
#' @details ready4 s3 class defining a data dictionary tibble.
#' @rdname make_pt_ready4_dictionary
Expand All @@ -39,11 +39,11 @@ x
#' @importFrom rlang exec
#' @importFrom tibble tibble
make_pt_ready4_dictionary <- function(var_nm_chr = character(0),
var_cat_chr = character(0),
var_ctg_chr = character(0),
var_desc_chr = character(0),
var_type_chr = character(0)){
args_ls <- list(var_nm_chr = var_nm_chr,
var_cat_chr = var_cat_chr,
var_ctg_chr = var_ctg_chr,
var_desc_chr = var_desc_chr,
var_type_chr = var_type_chr) %>% ready4class::update_pt_fn_args_ls()
rlang::exec(tibble::tibble,!!!args_ls)
Expand Down
12 changes: 6 additions & 6 deletions R/C3_ready4_par_struc_mape.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ x
#' @param mape_05_yr_mde_dbl Mape 05 yr mde (a double vector), Default: numeric(0)
#' @param mape_10_yr_mde_dbl Mape 10 yr mde (a double vector), Default: numeric(0)
#' @param mape_15_yr_mde_dbl Mape 15 yr mde (a double vector), Default: numeric(0)
#' @param mape_05_yr_min_dbl Mape 05 yr min (a double vector), Default: numeric(0)
#' @param mape_10_yr_min_dbl Mape 10 yr min (a double vector), Default: numeric(0)
#' @param mape_15_yr_min_dbl Mape 15 yr min (a double vector), Default: numeric(0)
#' @param mape_05_yr_max_dbl Mape 05 yr max (a double vector), Default: numeric(0)
#' @param mape_10_yr_max_dbl Mape 10 yr max (a double vector), Default: numeric(0)
#' @param mape_15_yr_max_dbl Mape 15 yr max (a double vector), Default: numeric(0)
#' @param mape_05_yr_min_dbl Mape 05 yr minimum (a double vector), Default: numeric(0)
#' @param mape_10_yr_min_dbl Mape 10 yr minimum (a double vector), Default: numeric(0)
#' @param mape_15_yr_min_dbl Mape 15 yr minimum (a double vector), Default: numeric(0)
#' @param mape_05_yr_max_dbl Mape 05 yr maximum (a double vector), Default: numeric(0)
#' @param mape_10_yr_max_dbl Mape 10 yr maximum (a double vector), Default: numeric(0)
#' @param mape_15_yr_max_dbl Mape 15 yr maximum (a double vector), Default: numeric(0)
#' @param mape_05_yr_shp_dbl Mape 05 yr shp (a double vector), Default: numeric(0)
#' @param mape_10_yr_shp_dbl Mape 10 yr shp (a double vector), Default: numeric(0)
#' @param mape_15_yr_shp_dbl Mape 15 yr shp (a double vector), Default: numeric(0)
Expand Down
6 changes: 3 additions & 3 deletions R/fn_add.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ add_dv_meta_to_imp_lup <- function (imp_lup, ds_ui_1L_chr, file_type_1L_chr, sav
return(imp_lup)
}
#' Add files to dataverse
#' @description add_files_to_dv() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add files to dataverse. Function argument files_tb specifies the object to be updated. The function returns File ids (an integer vector).
#' @description add_files_to_dv() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add files to dataverse. Function argument files_tb specifies the object to be updated. The function returns File identities (an integer vector).
#' @param files_tb Files (a tibble)
#' @param data_dir_rt_1L_chr Data directory root (a character vector of length one), Default: '.'
#' @param ds_url_1L_chr Dataset url (a character vector of length one)
#' @param key_1L_chr Key (a character vector of length one)
#' @param server_1L_chr Server (a character vector of length one)
#' @return File ids (an integer vector)
#' @return File identities (an integer vector)
#' @rdname add_files_to_dv
#' @export
#' @importFrom dataverse get_dataset delete_file add_dataset_file update_dataset_file
Expand Down Expand Up @@ -139,7 +139,7 @@ add_files_to_dv <- function (files_tb, data_dir_rt_1L_chr = ".", ds_url_1L_chr,
#' @description add_labels_from_dictionary() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add labels from dictionary. Function argument ds_tb specifies the object to be updated. The function returns Labelled dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param dictionary_tb Dictionary (a tibble)
#' @param remove_old_lbls_1L_lgl Remove old lbls (a logical vector of length one), Default: F
#' @param remove_old_lbls_1L_lgl Remove old labels (a logical vector of length one), Default: F
#' @return Labelled dataset (a tibble)
#' @rdname add_labels_from_dictionary
#' @export
Expand Down
6 changes: 3 additions & 3 deletions R/fn_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ get_file_from_dv <- function (ds_ui_1L_chr, fl_nm_1L_chr, save_fmt_1L_chr, repo_
file_xxx
return(file_xxx)
}
#' Get file id from dataverse
#' @description get_fl_id_from_dv_ls() is a Get function that retrieves a pre-existing data object from memory, local file system or online repository. Specifically, this function implements an algorithm to get file id from dataverse list. Function argument ds_ls specifies the where to look for the required object. The function returns Id (a character vector of length one).
#' Get file identity from dataverse
#' @description get_fl_id_from_dv_ls() is a Get function that retrieves a pre-existing data object from memory, local file system or online repository. Specifically, this function implements an algorithm to get file identity from dataverse list. Function argument ds_ls specifies the where to look for the required object. The function returns Identity (a character vector of length one).
#' @param ds_ls Dataset (a list)
#' @param fl_nm_1L_chr File name (a character vector of length one)
#' @param nms_chr Names (a character vector), Default: 'NA'
#' @return Id (a character vector of length one)
#' @return Identity (a character vector of length one)
#' @rdname get_fl_id_from_dv_ls
#' @export
#' @importFrom purrr map2_chr
Expand Down
4 changes: 2 additions & 2 deletions R/fn_update.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#' @description update_tb_src_loc_to_url_sgl_tb() is an Update function that edits an object, while preserving core object attributes. Specifically, this function implements an algorithm to update tibble source local to url sgl tibble. Function argument x specifies the object to be updated. Argument y provides the object to be updated. The function returns Updated (a tibble).
#' @param x An object
#' @param y PARAM_DESCRIPTION
#' @param local_to_url_vec_chr Local to url vec (a character vector)
#' @param urls_vec_chr Urls vec (a character vector)
#' @param local_to_url_vec_chr Local to url vector (a character vector)
#' @param urls_vec_chr Urls vector (a character vector)
#' @return Updated (a tibble)
#' @rdname update_tb_src_loc_to_url_sgl_tb
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/fn_write.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ write_dv_ds <- function (ds_meta_ls, dev_pkg_nm_1L_chr = ready4fun::get_dev_pkg_
#' Write dataverse dataset files
#' @description write_dv_ds_fls() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write dataverse dataset files. 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
#' @param files_tb Files (a tibble)
#' @param fl_ids_int File ids (an integer vector)
#' @param fl_ids_int File identities (an integer vector)
#' @param ds_url_1L_chr Dataset url (a character vector of length one)
#' @param local_dv_dir_1L_chr Local dataverse directory (a character vector of length one)
#' @param key_1L_chr Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")
Expand Down Expand Up @@ -59,7 +59,7 @@ write_dv_ds_fls <- function (files_tb, fl_ids_int, ds_url_1L_chr, local_dv_dir_1
#' @description write_dv_fl_to_loc() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write dataverse file to local. 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
#' @param ds_ui_1L_chr Dataset ui (a character vector of length one)
#' @param fl_nm_1L_chr File name (a character vector of length one), Default: 'NA'
#' @param fl_id_1L_int File id (an integer vector of length one), Default: NA
#' @param fl_id_1L_int File identity (an integer vector of length one), Default: NA
#' @param repo_fl_fmt_1L_chr Repo file fmt (a character vector of length one)
#' @param key_1L_chr Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")
#' @param server_1L_chr Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")
Expand Down
4 changes: 2 additions & 2 deletions R/grp_generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ methods::setGeneric("save_raw")
#' @rdname update_src_loc_to_url-methods
#' @description update_src_loc_to_url() is an Update Source Local to Url generic that updates data from a local file reference to a URL
#' @param x An object
#' @param local_to_url_vec_chr Local to url vec (a character vector)
#' @param urls_vec_chr Urls vec (a character vector)
#' @param local_to_url_vec_chr Local to url vector (a character vector)
#' @param urls_vec_chr Urls vector (a character vector)
#' @param ... Additional arguments
#' @export

Expand Down
2 changes: 1 addition & 1 deletion R/mthd_bind_lups.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Bind lups method applied to ready4 S3 class defining a data dictionary tibble..
#' @description bind_lups.ready4_dictionary() is a Bind Lups method that rowbinds lookup tables of the same class, removing duplicates based on priority. This method is implemented for the ready4 s3 class defining a data dictionary tibble.. The function is called for its side effects and does not return a value.
#' @param x An instance of ready4 s3 class defining a data dictionary tibble.
#' @param new_ready4_dict_r3 New ready4 dict (a ready4 S3)
#' @param new_ready4_dict_r3 New ready4 dictionary (a ready4 S3)
#' @return NA ()
#' @rdname bind_lups-methods
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/mthd_update_src_loc_to_url.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' Update source local to url method applied to ready4 S3 class for tibble object lookup table of sources of raw (un-processed) data to import..
#' @description update_src_loc_to_url.ready4_all_import_lup() is an Update Source Local to Url method that updates data from a local file reference to a URL This method is implemented for the ready4 S3 class for tibble object lookup table of sources of raw (un-processed) data to import.. The function is called for its side effects and does not return a value.
#' @param x An instance of ready4 S3 class for tibble object lookup table of sources of raw (un-processed) data to import.
#' @param local_to_url_vec_chr Local to url vec (a character vector)
#' @param urls_vec_chr Urls vec (a character vector)
#' @param local_to_url_vec_chr Local to url vector (a character vector)
#' @param urls_vec_chr Urls vector (a character vector)
#' @return NULL
#' @rdname update_src_loc_to_url-methods
#' @export
Expand Down
6 changes: 0 additions & 6 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
home:
links:
- text: User manual (PDF)
href: https://github.com/ready4-dev/ready4use/releases/download/v0.0.0.9120/ready4use_user_0.0.0.9120.pdf
- text: Developer version of usual manual (PDF)
href: https://github.com/ready4-dev/ready4use/releases/download/v0.0.0.9120/ready4use_developer_0.0.0.9120.pdf
development:
mode: auto
reference:
Expand Down
2 changes: 1 addition & 1 deletion data-raw/MAKE_CLASSES.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ classes_to_make_tb <- dplyr::bind_rows(
pt_chkr_pfx_ls = list(list("is_")),
pt_ns_ls = list(list("tibble")),
vals_ls = list(list(var_nm_chr = "character(0)",
var_cat_chr = "character(0)",
var_ctg_chr = "character(0)",
var_desc_chr = "character(0)",
var_type_chr = "character(0)")),
class_desc_chr= "ready4 s3 class defining a data dictionary tibble."),
Expand Down
Binary file modified data-raw/dataverse/prototype_lup/prototype_lup.RDS
Binary file not shown.
9 changes: 9 additions & 0 deletions data-raw/dataverse/prototype_lup/prototype_lup.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"integer","NA_integer_","base","","NA_integer_",FALSE
"ready4_constructor_tbl","ready4class::ready4_constructor_tbl()","ready4class","ready4_constructor_tbl","",TRUE
"ready4_class_pt_lup","ready4class::ready4_class_pt_lup()","ready4class","ready4_class_pt_lup","",TRUE
"youthvars_aqol6d_adol","youthvars::youthvars_aqol6d_adol()","youthvars","youthvars_aqol6d_adol","",TRUE
"youthvars_phq9","youthvars::youthvars_phq9()","youthvars","youthvars_phq9","",TRUE
"youthvars_bads","youthvars::youthvars_bads()","youthvars","youthvars_bads","",TRUE
"youthvars_gad7","youthvars::youthvars_gad7()","youthvars","youthvars_gad7","",TRUE
"youthvars_oasis","youthvars::youthvars_oasis()","youthvars","youthvars_oasis","",TRUE
"youthvars_scared","youthvars::youthvars_scared()","youthvars","youthvars_scared","",TRUE
"youthvars_k6","youthvars::youthvars_k6()","youthvars","youthvars_k6","",TRUE
"youthvars_sofas","youthvars::youthvars_sofas()","youthvars","youthvars_sofas","",TRUE
"TTU_predictors_lup","TTU::TTU_predictors_lup()","TTU","TTU_predictors_lup","",TRUE
"ready4_dist","ready4_dist()","ready4use","ready4_dist","",TRUE
"ready4_dv_import_lup","ready4_dv_import_lup()","ready4use","ready4_dv_import_lup","",TRUE
"ready4_all_import_lup","ready4_all_import_lup()","ready4use","ready4_all_import_lup","",TRUE
Expand Down
Binary file modified data/abbreviations_lup.rda
Binary file not shown.
Binary file modified data/fn_type_lup_tb.rda
Binary file not shown.
Binary file modified data/fns_dmt_tb.rda
Binary file not shown.
Binary file modified data/prototype_lup.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/abbreviations_lup.Rd

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

4 changes: 2 additions & 2 deletions man/add_files_to_dv.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/add_labels_from_dictionary.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/bind_lups-methods.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/fn_type_lup_tb.Rd

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

6 changes: 3 additions & 3 deletions man/get_fl_id_from_dv_ls.Rd

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

10 changes: 5 additions & 5 deletions man/make_pt_ready4_dictionary.Rd

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

12 changes: 6 additions & 6 deletions man/make_pt_ready4_par_struc_mape.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/prototype_lup.Rd

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

Loading

0 comments on commit c37e1cb

Please sign in to comment.