-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve roxygen formatting and online documentation
- Loading branch information
1 parent
23943cf
commit 5a59479
Showing
35 changed files
with
706 additions
and
706 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,35 +1,35 @@ | ||
#' @keywords internal | ||
"_PACKAGE" | ||
#' Tools, Functions, Shapefiles data, and Rmarkdown templates to work with Syndromic Surveillance data via NSSP ESSENCE | ||
#' | ||
#' The National Syndromic and Surveillance Program (NSSP) at the Centers for Disease and Control has a large Community of Practice (CoP) | ||
#' including state and local Departments of Health. The NSSP has developed multiple resources including analysis reports, | ||
#' analytic tools, and assisted with scripts to interface with ESSENCE. The `Rnnsp` R package is built in an attempt to | ||
#' improve reusability, reproducibility, and distribution of the analytical resources developed at the CDC NSSP. | ||
#' | ||
#' @section Rnssp functions: | ||
#' The Rnssp functions include: | ||
#' \itemize{ | ||
#' \item API functions to pull data from the ESSENCE system | ||
#' \item Various utility functions to securely set user credentials, add or remove R Markdown templates, or set new dates in API urls. | ||
#' \item Anomaly detection and Time Series Trend classification algorithms | ||
#' } | ||
#' | ||
#' @section Rnssp vignettes: | ||
#' The vignettes serve as instructive tutorials demonstrating practical uses of the | ||
#' Rnssp package. Please run the `Rnssp_vignettes()` function to browse all available vignettes. | ||
#' | ||
#' @section Rnssp Rmarkdown templates: | ||
#' By default, the Rnssp package comes with one R Markdown template. We leave it up | ||
#' to users to decide which template to extend the package with post-installation. | ||
#' To list all available template, run the `list_templates()` function. Please, check | ||
#' the Rnssp R markdown template Github repository at | ||
#' https://github.com/cdcgov/rnssp-rmd-templates. | ||
#' | ||
#' @docType package | ||
#' @name Rnssp | ||
#' @author Gbedegnon Roseric Azondekon ([email protected]) | ||
#' @import dplyr, readr, magrittr, R6, stringi, assertive.types, safer, jsonlite, httr, askpass, yaml | ||
#' @import sf | ||
NULL | ||
# > NULL | ||
#' @keywords internal | ||
"_PACKAGE" | ||
#' Tools, Functions, Shapefiles data, and Rmarkdown templates to work with Syndromic Surveillance data via NSSP ESSENCE | ||
#' | ||
#' The National Syndromic and Surveillance Program (NSSP) at the Centers for Disease and Control has a large Community of Practice (CoP) | ||
#' including state and local Departments of Health. The NSSP has developed multiple resources including analysis reports, | ||
#' analytic tools, and assisted with scripts to interface with ESSENCE. The \code{Rnssp} R package is built in an attempt to | ||
#' improve reusability, reproducibility, and distribution of the analytical resources developed at the CDC NSSP. | ||
#' | ||
#' @section Rnssp functions: | ||
#' The Rnssp functions include: | ||
#' \itemize{ | ||
#' \item API functions to pull data from the ESSENCE system | ||
#' \item Various utility functions to securely set user credentials, add or remove R Markdown templates, or set new dates in API urls. | ||
#' \item Anomaly detection and Time Series Trend classification algorithms | ||
#' } | ||
#' | ||
#' @section Rnssp vignettes: | ||
#' The vignettes serve as instructive tutorials demonstrating practical uses of the | ||
#' Rnssp package. Please run the \code{\link[Rnnsp]{Rnssp_vignettes()}} function to browse all available vignettes. | ||
#' | ||
#' @section Rnssp Rmarkdown templates: | ||
#' By default, the Rnssp package comes with one R Markdown template. We leave it up | ||
#' to users to decide which template to extend the package with post-installation. | ||
#' To list all available template, run the \code{\link[Rnnsp]{list_templates()}} function. Please, check | ||
#' the Rnssp R markdown template Github repository at | ||
#' \href{https://github.com/cdcgov/rnssp-rmd-templates}{https://github.com/cdcgov/rnssp-rmd-templates}. | ||
#' | ||
#' @docType package | ||
#' @name Rnssp | ||
#' @author Gbedegnon Roseric Azondekon (\href{mailto:[email protected]}{[email protected]}) | ||
#' @import dplyr, readr, magrittr, R6, stringi, assertive.types, safer, jsonlite, httr, askpass, yaml | ||
#' @import sf | ||
NULL | ||
# > NULL |
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,23 +1,23 @@ | ||
#' US Core-Based Statistical Area Shapefile | ||
#' | ||
#' Useful `sf`` object shapefile for US Core-Based Statistical Area. | ||
#' | ||
#' \preformatted{ | ||
#' Rows: 933 | ||
#' Columns: 9 | ||
#' $ CSAFP <fct> NA, NA, NA, NA, 220, 184, NA, NA, 440, 104, 172, NA, 290, 106, 142, NA, NA, 204, 408, 394, NA, NA, NA, 108, NA, 218, 104, NA, 258, 2... | ||
#' $ CBSAFP <fct> 10100, 10140, 10180, 10220, 10300, 10420, 10460, 10500, 10540, 10580, 10620, 10660, 10700, 10740, 10760, 10780, 10820, 10860, 10900,... | ||
#' $ AFFGEOID <fct> 310M400US10100, 310M400US10140, 310M400US10180, 310M400US10220, 310M400US10300, 310M400US10420, 310M400US10460, 310M400US10500, 310M... | ||
#' $ GEOID <fct> 10100, 10140, 10180, 10220, 10300, 10420, 10460, 10500, 10540, 10580, 10620, 10660, 10700, 10740, 10760, 10780, 10820, 10860, 10900,... | ||
#' $ NAME <fct> "Aberdeen, SD", "Aberdeen, WA", "Abilene, TX", "Ada, OK", "Adrian, MI", "Akron, OH", "Alamogordo, NM", "Albany, GA", "Albany, OR", "... | ||
#' $ LSAD <fct> M2, M2, M1, M2, M2, M1, M2, M1, M1, M1, M2, M2, M2, M1, M2, M1, M2, M2, M1, M2, M2, M1, M2, M1, M2, M1, M2, M2, M2, M1, M1, M1, M2, ... | ||
#' $ ALAND <fct> 7353004578, 4924421612, 7105577213, 1865885645, 1941541486, 2331552026, 17126456771, 5006277239, 5923636964, 7282214082, 1023370459,... | ||
#' $ AWATER <fct> 111384297, 834689898, 36847511, 12421414, 30482189, 62086003, 36943378, 64821308, 50354267, 172506034, 25242751, 39237837, 148495464... | ||
#' $ geometry <MULTIPOLYGON [m]> MULTIPOLYGON (((22796.3 369..., MULTIPOLYGON (((-1733803 53..., MULTIPOLYGON (((-13821.28 -..., MULTIPOLYGON (((280928.... | ||
#' } | ||
#' @examples | ||
#' library(Rnssp) | ||
#' data("cbsa_sf") | ||
#' | ||
#' plot(cbsa_sf$geometry) | ||
"cbsa_sf" | ||
#' US Core-Based Statistical Area Shapefile | ||
#' | ||
#' Useful \code{sf} object shapefile for US Core-Based Statistical Area. | ||
#' | ||
#' \preformatted{ | ||
#' Rows: 933 | ||
#' Columns: 9 | ||
#' $ CSAFP <fct> NA, NA, NA, NA, 220, 184, NA, NA, 440, 104, 172, NA, 290, 106, 142, NA, NA, 204, 408, 394, NA, NA, NA, 108, NA, 218, 104, NA, 258, 2... | ||
#' $ CBSAFP <fct> 10100, 10140, 10180, 10220, 10300, 10420, 10460, 10500, 10540, 10580, 10620, 10660, 10700, 10740, 10760, 10780, 10820, 10860, 10900,... | ||
#' $ AFFGEOID <fct> 310M400US10100, 310M400US10140, 310M400US10180, 310M400US10220, 310M400US10300, 310M400US10420, 310M400US10460, 310M400US10500, 310M... | ||
#' $ GEOID <fct> 10100, 10140, 10180, 10220, 10300, 10420, 10460, 10500, 10540, 10580, 10620, 10660, 10700, 10740, 10760, 10780, 10820, 10860, 10900,... | ||
#' $ NAME <fct> "Aberdeen, SD", "Aberdeen, WA", "Abilene, TX", "Ada, OK", "Adrian, MI", "Akron, OH", "Alamogordo, NM", "Albany, GA", "Albany, OR", "... | ||
#' $ LSAD <fct> M2, M2, M1, M2, M2, M1, M2, M1, M1, M1, M2, M2, M2, M1, M2, M1, M2, M2, M1, M2, M2, M1, M2, M1, M2, M1, M2, M2, M2, M1, M1, M1, M2, ... | ||
#' $ ALAND <fct> 7353004578, 4924421612, 7105577213, 1865885645, 1941541486, 2331552026, 17126456771, 5006277239, 5923636964, 7282214082, 1023370459,... | ||
#' $ AWATER <fct> 111384297, 834689898, 36847511, 12421414, 30482189, 62086003, 36943378, 64821308, 50354267, 172506034, 25242751, 39237837, 148495464... | ||
#' $ geometry <MULTIPOLYGON [m]> MULTIPOLYGON (((22796.3 369..., MULTIPOLYGON (((-1733803 53..., MULTIPOLYGON (((-13821.28 -..., MULTIPOLYGON (((280928.... | ||
#' } | ||
#' @examples | ||
#' library(Rnssp) | ||
#' data("cbsa_sf") | ||
#' | ||
#' plot(cbsa_sf$geometry) | ||
"cbsa_sf" |
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,32 +1,32 @@ | ||
#' A `NSSPContainer` Class to store a value in a container object | ||
#' | ||
#' @description | ||
#' A `NSSPContainer` object stores a value | ||
#' | ||
#' @details | ||
#' A `NSSPContainer` object can be used to retrieve a value | ||
NSSPContainer <- R6::R6Class( | ||
"NSSPContainer", | ||
private = list( | ||
..value = NULL | ||
), | ||
active = list( | ||
value = function() { | ||
private$..value | ||
} | ||
), | ||
public = list( | ||
|
||
#' @description | ||
#' Initializes a new NSSPContainer object. | ||
#' @param entry an object or value to be stored | ||
#' @return A new `NSSPContainer` object | ||
initialize = function(entry) { | ||
if (missing(entry)) { | ||
private$..value | ||
} else { | ||
private$..value <- entry | ||
} | ||
} | ||
) | ||
) | ||
#' A \code{NSSPCredentials} Class to store a value in a container object | ||
#' | ||
#' @description | ||
#' A \code{NSSPCredentials} object stores a value | ||
#' | ||
#' @details | ||
#' A \code{NSSPCredentials} object can be used to retrieve a value | ||
NSSPContainer <- R6::R6Class( | ||
"NSSPContainer", | ||
private = list( | ||
..value = NULL | ||
), | ||
active = list( | ||
value = function() { | ||
private$..value | ||
} | ||
), | ||
public = list( | ||
|
||
#' @description | ||
#' Initializes a new NSSPContainer object. | ||
#' @param entry an object or value to be stored | ||
#' @return A new \code{NSSPCredentials} object | ||
initialize = function(entry) { | ||
if (missing(entry)) { | ||
private$..value | ||
} else { | ||
private$..value <- entry | ||
} | ||
} | ||
) | ||
) |
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,24 +1,24 @@ | ||
#' US Counties Shapefile | ||
#' | ||
#' Useful `sf`` object shapefile for US Counties. | ||
#' | ||
#' \preformatted{ | ||
#' Rows: 3,142 | ||
#' Columns: 10 | ||
#' $ STATEFP <fct> 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, ... | ||
#' $ COUNTYFP <fct> 001, 003, 005, 007, 009, 011, 013, 015, 017, 019, 021, 023, 025, 027, 029, 031, 033, 035, 037, 039, 041, 043, 045, 047, 049, 051, 05... | ||
#' $ COUNTYNS <fct> 00161526, 00161527, 00161528, 00161529, 00161530, 00161531, 00161532, 00161533, 00161534, 00161535, 00161536, 00161537, 00161538, 00... | ||
#' $ AFFGEOID <fct> 0500000US01001, 0500000US01003, 0500000US01005, 0500000US01007, 0500000US01009, 0500000US01011, 0500000US01013, 0500000US01015, 0500... | ||
#' $ GEOID <fct> 01001, 01003, 01005, 01007, 01009, 01011, 01013, 01015, 01017, 01019, 01021, 01023, 01025, 01027, 01029, 01031, 01033, 01035, 01037,... | ||
#' $ NAME <fct> Autauga, Baldwin, Barbour, Bibb, Blount, Bullock, Butler, Calhoun, Chambers, Cherokee, Chilton, Choctaw, Clarke, Clay, Cleburne, Cof... | ||
#' $ LSAD <fct> 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, ... | ||
#' $ ALAND <fct> 1539602123, 4117546676, 2292144655, 1612167481, 1670103911, 1613059160, 2012002530, 1569189622, 1545085607, 1433623321, 1794477075, ... | ||
#' $ AWATER <fct> 25706961, 1133055836, 50538698, 9602089, 15015423, 6054988, 2701198, 16627597, 16971701, 120308339, 20592144, 19144469, 36657891, 52... | ||
#' $ geometry <MULTIPOLYGON [m]> MULTIPOLYGON (((1225889 -12..., MULTIPOLYGON (((1151155 -15..., MULTIPOLYGON (((1355398 -13..., MULTIPOLYGON (((1174172.. | ||
#' } | ||
#' @examples | ||
#' library(Rnssp) | ||
#' data("county_sf") | ||
#' | ||
#' plot(county_sf$geometry) | ||
"county_sf" | ||
#' US Counties Shapefile | ||
#' | ||
#' Useful \code{sf} object shapefile for US Counties. | ||
#' | ||
#' \preformatted{ | ||
#' Rows: 3,142 | ||
#' Columns: 10 | ||
#' $ STATEFP <fct> 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, ... | ||
#' $ COUNTYFP <fct> 001, 003, 005, 007, 009, 011, 013, 015, 017, 019, 021, 023, 025, 027, 029, 031, 033, 035, 037, 039, 041, 043, 045, 047, 049, 051, 05... | ||
#' $ COUNTYNS <fct> 00161526, 00161527, 00161528, 00161529, 00161530, 00161531, 00161532, 00161533, 00161534, 00161535, 00161536, 00161537, 00161538, 00... | ||
#' $ AFFGEOID <fct> 0500000US01001, 0500000US01003, 0500000US01005, 0500000US01007, 0500000US01009, 0500000US01011, 0500000US01013, 0500000US01015, 0500... | ||
#' $ GEOID <fct> 01001, 01003, 01005, 01007, 01009, 01011, 01013, 01015, 01017, 01019, 01021, 01023, 01025, 01027, 01029, 01031, 01033, 01035, 01037,... | ||
#' $ NAME <fct> Autauga, Baldwin, Barbour, Bibb, Blount, Bullock, Butler, Calhoun, Chambers, Cherokee, Chilton, Choctaw, Clarke, Clay, Cleburne, Cof... | ||
#' $ LSAD <fct> 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, 06, ... | ||
#' $ ALAND <fct> 1539602123, 4117546676, 2292144655, 1612167481, 1670103911, 1613059160, 2012002530, 1569189622, 1545085607, 1433623321, 1794477075, ... | ||
#' $ AWATER <fct> 25706961, 1133055836, 50538698, 9602089, 15015423, 6054988, 2701198, 16627597, 16971701, 120308339, 20592144, 19144469, 36657891, 52... | ||
#' $ geometry <MULTIPOLYGON [m]> MULTIPOLYGON (((1225889 -12..., MULTIPOLYGON (((1151155 -15..., MULTIPOLYGON (((1355398 -13..., MULTIPOLYGON (((1174172.. | ||
#' } | ||
#' @examples | ||
#' library(Rnssp) | ||
#' data("county_sf") | ||
#' | ||
#' plot(county_sf$geometry) | ||
"county_sf" |
Oops, something went wrong.