-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df979e0
commit ec38b58
Showing
15 changed files
with
405 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
cff-version: 1.2.0 | ||
message: "Caroline Gao and Matthew Hamilton (2022). TTU: Implement Transfer to Utility Mapping Algorithms. Version 0.0.0.9335. Zenodo. https://doi.org/10.5281/zenodo.5646593" | ||
message: "Caroline Gao and Matthew Hamilton (2022). TTU: Implement Transfer to Utility Mapping Algorithms. Version 0.0.0.9337. Zenodo. https://doi.org/10.5281/zenodo.5646593" | ||
authors: | ||
- family-names: "Gao" | ||
given-names: "Caroline" | ||
- family-names: "Hamilton" | ||
given-names: "Matthew" | ||
title: "TTU: Implement Transfer to Utility Mapping Algorithms" | ||
version: 0.0.0.9335 | ||
version: 0.0.0.9337 | ||
doi: 10.5281/zenodo.5646593 | ||
date-released: 2022-02-18 | ||
date-released: 2022-02-22 | ||
url: "https://ready4-dev.github.io/TTU/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#' TTUSynopsis | ||
#' | ||
#' Input, Output and Authorship Data For Generating Utility Mapping Study Reports. | ||
#' | ||
#' @slot a_Ready4showPaths (an instance of the Ready4showPaths class) | ||
#' @slot b_SpecificResults (an instance of the SpecificResults class) | ||
#' @slot c_SpecificParameters (an instance of the SpecificParameters class) | ||
#' @slot d_YouthvarsProfile (an instance of the YouthvarsProfile class) | ||
#' @slot e_Ready4useRepos (an instance of the Ready4useRepos class) | ||
#' @slot abstract_args_ls Abstract arguments (a list) | ||
#' @slot authors_r3 Authors (a ready4 S3) | ||
#' @slot background_1L_chr Background (a character vector of length one) | ||
#' @slot coi_1L_chr Conflict of interest (a character vector of length one) | ||
#' @slot conclusion_1L_chr Conclusion (a character vector of length one) | ||
#' @slot correspondences_r3 Correspondences (a ready4 S3) | ||
#' @slot digits_int Digits (an integer vector) | ||
#' @slot ethics_1L_chr Ethics (a character vector of length one) | ||
#' @slot fl_nm_1L_chr File name (a character vector of length one) | ||
#' @slot figures_in_body_lgl Figures in body (a logical vector) | ||
#' @slot funding_1L_chr Funding (a character vector of length one) | ||
#' @slot institutes_r3 Institutes (a ready4 S3) | ||
#' @slot interval_chr Interval (a character vector) | ||
#' @slot keywords_chr Keywords (a character vector) | ||
#' @slot outp_formats_chr Output formats (a character vector) | ||
#' @slot rmd_fl_nms_ls R Markdown file names (a list) | ||
#' @slot sample_desc_1L_chr Sample description (a character vector of length one) | ||
#' @slot tables_in_body_lgl Tables in body (a logical vector) | ||
#' @slot title_1L_chr Title (a character vector of length one) | ||
#' @slot dissemination_1L_chr Dissemination (a character vector of length one) | ||
#' @import specific | ||
#' @name TTUSynopsis-class | ||
#' @rdname TTUSynopsis-class | ||
#' @export TTUSynopsis | ||
#' @exportClass TTUSynopsis | ||
TTUSynopsis <- methods::setClass("TTUSynopsis", | ||
contains = "SpecificSynopsis", | ||
slots = c(a_Ready4showPaths = "Ready4showPaths",b_SpecificResults = "SpecificResults",c_SpecificParameters = "SpecificParameters",d_YouthvarsProfile = "YouthvarsProfile",e_Ready4useRepos = "Ready4useRepos",abstract_args_ls = "list",authors_r3 = "ready4show_authors",background_1L_chr = "character",coi_1L_chr = "character",conclusion_1L_chr = "character",correspondences_r3 = "ready4show_correspondences",digits_int = "integer",ethics_1L_chr = "character",fl_nm_1L_chr = "character",figures_in_body_lgl = "logical",funding_1L_chr = "character",institutes_r3 = "ready4show_institutes",interval_chr = "character",keywords_chr = "character",outp_formats_chr = "character",rmd_fl_nms_ls = "list",sample_desc_1L_chr = "character",tables_in_body_lgl = "logical",title_1L_chr = "character",dissemination_1L_chr = "character"), | ||
prototype = list(a_Ready4showPaths = ready4show::Ready4showPaths(),b_SpecificResults = specific::SpecificResults(),c_SpecificParameters = specific::SpecificParameters(),d_YouthvarsProfile = youthvars::YouthvarsProfile(),e_Ready4useRepos = ready4use::Ready4useRepos())) | ||
|
||
|
||
methods::setValidity(methods::className("TTUSynopsis"), | ||
function(object){ | ||
msg <- NULL | ||
if (is.null(msg)) TRUE else msg | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#' Get package citation | ||
#' @description get_pkg_citation() 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 package citation. Function argument pkg_nm_1L_chr specifies the where to look for the required object. The function returns Citation (a character vector of length one). | ||
#' @param pkg_nm_1L_chr Package name (a character vector of length one) | ||
#' @return Citation (a character vector of length one) | ||
#' @rdname get_pkg_citation | ||
#' @export | ||
#' @keywords internal | ||
get_pkg_citation <- function (pkg_nm_1L_chr) | ||
{ | ||
citation_chr <- suppressWarnings(citation(pkg_nm_1L_chr)) %>% | ||
capture.output() | ||
start_idx_1L_int <- 4 | ||
end_idx_1L_int <- which(citation_chr == "")[which(which(citation_chr == | ||
"") > start_idx_1L_int)[1]] - 1 | ||
citation_1L_chr <- citation_chr[start_idx_1L_int:end_idx_1L_int] %>% | ||
paste0(collapse = "") | ||
return(citation_1L_chr) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
get_pkg_citation <- function(pkg_nm_1L_chr){ | ||
citation_chr <- suppressWarnings(citation(pkg_nm_1L_chr)) %>% capture.output() | ||
start_idx_1L_int <- 4 | ||
end_idx_1L_int <- which(citation_chr== "")[which(which(citation_chr== "")>start_idx_1L_int)[1]]-1 | ||
citation_1L_chr<- citation_chr[start_idx_1L_int:end_idx_1L_int] %>% paste0(collapse = "") | ||
return(citation_1L_chr) | ||
} |
Oops, something went wrong.