diff --git a/.Rbuildignore b/.Rbuildignore index 0aaa805..9355d29 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,4 +7,5 @@ images/* ^docs$ ^pkgdown$ ^cran-comments\.md$ +^testing\.md$ ^CRAN-RELEASE$ diff --git a/DESCRIPTION b/DESCRIPTION index 36765ea..2f79855 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,5 +47,5 @@ Suggests: Language: en-US URL: https://github.com/globeandmail/upstartr, https://globeandmail.github.io/upstartr/ BugReports: https://github.com/globeandmail/upstartr/issues -RoxygenNote: 7.1.1 +RoxygenNote: 7.2.3 Config/testthat/edition: 3 diff --git a/cran-comments.md b/cran-comments.md index fd47946..dbed7b2 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,10 @@ ## Test environments -* local OS X install, R 3.5.1 -* ubuntu 20.04 (on GitHub), R 4.0.3 -* win 20.04 (on GitHub), R 4.0.3 -* win-builder (devel and release) +* local OS X install, R 4.3.2 +* macos-latest (release), on GitHub, R 4.3.2 +* ubuntu-latest (devel), on GitHub, R 2023-12-31 r85754 +* ubuntu-latest (oldrel-1), on GitHub, R 4.2.3 +* ubuntu-latest (release), on GitHub, R 4.3.2 +* windows-latest (release), on GitHub, R 4.3.2 ## R CMD check results There were no ERRORs, WARNINGs or NOTEs. diff --git a/docs/404.html b/docs/404.html index 7526cdb..67d9301 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,78 +1,38 @@ - - - - + + + + - Page not found (404) • upstartr - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - -
-
- + +
+ + + - - -
+
+
-
+ + - - diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 4bb4093..eb6a909 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -1,78 +1,12 @@ - - - - - - - -License • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -License • upstartr + + - - - - -
-
- -
- -
+
+
-
- - + + diff --git a/docs/authors.html b/docs/authors.html index 4af700b..293a97d 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,78 +1,12 @@ - - - - - - - -Authors • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Authors and Citation • upstartr + + - - - - - -
-
-
- -
+
- @@ -146,22 +87,20 @@

Authors

-
- - + + diff --git a/docs/index.html b/docs/index.html index 3916613..619f366 100644 --- a/docs/index.html +++ b/docs/index.html @@ -30,6 +30,8 @@ + +
-
- - -R build status CRAN_Status_Badge CRAN_Downloads_Badge -

-upstartr logo

-

Upstartr is a companion package to The Globe and Mail’s data journalism template, startr. It contains a series of functions meant to be consumed by the template project, plus additional helpful functions for day-to-day data journalism.

-
-

-Installation

+
+ +R-CMD-check CRAN_Status_Badge CRAN_Downloads_Badge

upstartr logo

+

Upstartr is a companion package to The Globe and Mail’s data journalism template, startr. It contains a series of functions meant to be consumed by the template project, plus additional helpful functions for day-to-day data journalism.

+
+

Installation +

-install.packages('upstartr')
+install.packages('upstartr')

Or, if you want to run a development version, you can install it from GitHub by doing:

-devtools::install_github('globeandmail/upstartr')
-library(upstartr)
+devtools::install_github('globeandmail/upstartr') +library(upstartr)
-
-

-Reference

-

You can find the full reference manual for upstartr’s functions here.

+
+

Reference +

+

You can find the full reference manual for upstartr’s functions here.

-
-

-Credits

+
+

Credits +

Spark plug illustration by Murat Yükselir.

-
-

-Get in touch

+
+

Get in touch +

If you’ve got any questions, feel free to send us an email, or give us a shout on Twitter:

-
@@ -170,5 +173,7 @@

Developers

+ + diff --git a/docs/news/index.html b/docs/news/index.html index 66cf50e..191f3e4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,78 +1,12 @@ - - - - - - - -Changelog • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Changelog • upstartr - + + - - - -
-
- -
- -
+
-
-

-Version 0.1.1 2021-02-23 -

-

Small bug fixes:

-
    -
  • Adds an extra newline to the initialize_startr() log messages so that it stays on its own line.
  • -
  • Fixes an issue with write_plot() where the format parameter was inadvertently being passed to ggsave(), which would then throw an error.
  • -
+
+ +

Small bug fix: - Fixes an error where initialize_startr() breaks if cancensus is among listed packages due to an errant comma.

-
-

-Version 0.1.0 2021-02-15 -

+
+ +

Small bug fixes: - Adds an extra newline to the initialize_startr() log messages so that it stays on its own line. - Fixes an issue with write_plot() where the format parameter was inadvertently being passed to ggsave(), which would then throw an error.

+
+
+

Inaugural release! 🎉

+
-
- - + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 1273238..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 7e7048f..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -80,7 +80,7 @@ $(document).ready(function() { var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -91,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index f05ba6a..cac62d6 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,6 +1,6 @@ -pandoc: 2.11.2 -pkgdown: 1.6.1 +pandoc: 2.11.4 +pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2021-02-23T16:57Z +last_built: 2024-01-03T01:41Z diff --git a/docs/reference/begin_processing.html b/docs/reference/begin_processing.html index 0d282da..47b5b0d 100644 --- a/docs/reference/begin_processing.html +++ b/docs/reference/begin_processing.html @@ -1,82 +1,15 @@ - - - - - - - -Runs the pre-processing step on a startr project. — begin_processing • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Runs the pre-processing step on a startr project. — begin_processing • upstartr - - - - - - - - - - - - - - - + + - - - -
-
- -
- -
+
-

The pre-processing step, run as part of upstartr::run_process +

The pre-processing step, run as part of upstartr::run_process during the process.R stage of a startr project, logs all variables currently in the global environment, which will then be removed during the post-processing step to keep the startr environment unpolluted.

-
begin_processing(should_clean_processing_variables = TRUE)
+
+
begin_processing(should_clean_processing_variables = TRUE)
+
-

Arguments

- - - - - - -
should_clean_processing_variables

Either TRUE, FALSE, or pulled from the environment if set.

+
+

Arguments

+
should_clean_processing_variables
+

Either TRUE, FALSE, or pulled from the environment if set.

-

Value

+
+
+

Value

+ -

A list of all environment variables present before the function was run

+

A list of all environment variables present before the function was run

+
+
-
- - + + diff --git a/docs/reference/calc_index.html b/docs/reference/calc_index.html index bf8b82f..f7307d7 100644 --- a/docs/reference/calc_index.html +++ b/docs/reference/calc_index.html @@ -1,81 +1,14 @@ - - - - - - - -Index values — calc_index • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Index values — calc_index • upstartr - - - - - - - - - - - - - - - + + - - - -
-
- -
- -
+
@@ -136,55 +56,57 @@

Index values

to a different base, like 100, such as if you're looking at financial data.

-
calc_index(m, base = 0)
- -

Arguments

- - - - - - - - - - -
m

Numeric vector to index to first value.

base

Base to index against. (Default: 0)

- -

Value

- -

An vector of indexed values.

- -

Examples

-
calc_index(c(5, 2, 8, 17, 7, 3, 1, -4)) -
#> [1] 0.0 -0.6 0.6 2.4 0.4 -0.4 -0.8 -1.8
calc_index(c(5, 2, 8, 17, 7, 3, 1, -4), base = 100) -
#> [1] 100 40 160 340 140 60 20 -80
-
+
+
calc_index(m, base = 0)
+
+ +
+

Arguments

+
m
+

Numeric vector to index to first value.

+ + +
base
+

Base to index against. (Default: 0)

+ +
+
+

Value

+ + +

An vector of indexed values.

+
+ +
+

Examples

+
calc_index(c(5, 2, 8, 17, 7, 3, 1, -4))
+#> [1]  0.0 -0.6  0.6  2.4  0.4 -0.4 -0.8 -1.8
+calc_index(c(5, 2, 8, 17, 7, 3, 1, -4), base = 100)
+#> [1] 100  40 160 340 140  60  20 -80
+
+
+
+
-
- - + + diff --git a/docs/reference/calc_mode.html b/docs/reference/calc_mode.html index 8c77e21..b9543fb 100644 --- a/docs/reference/calc_mode.html +++ b/docs/reference/calc_mode.html @@ -1,79 +1,12 @@ - - - - - - - -Calculate mode — calc_mode • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calculate mode — calc_mode • upstartr - - + + - - -
-
- -
- -
+
@@ -132,52 +52,55 @@

Calculate mode

Calculates the mode of a given vector.

-
calc_mode(x)
+
+
calc_mode(x)
+
-

Arguments

- - - - - - -
x

Any kind of vector — numeric, character, logical.

+
+

Arguments

+
x
+

Any kind of vector — numeric, character, logical.

-

Value

+
+
+

Value

+ -

The mode(s) of that vector.

+

The mode(s) of that vector.

+
-

Examples

-
calc_mode(c(1, 1, 2, 3, 4)) -
#> [1] 1
calc_mode(c('the', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy', 'dog')) -
#> [1] "the"
calc_mode(c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE)) -
#> [1] FALSE
-
+
+

Examples

+
calc_mode(c(1, 1, 2, 3, 4))
+#> [1] 1
+calc_mode(c('the', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy', 'dog'))
+#> [1] "the"
+calc_mode(c(TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE))
+#> [1] FALSE
+
+
+
+
-
- - + + diff --git a/docs/reference/clean_columns.html b/docs/reference/clean_columns.html index 85068d1..70f902c 100644 --- a/docs/reference/clean_columns.html +++ b/docs/reference/clean_columns.html @@ -1,80 +1,13 @@ - - - - - - - -Cleans up column names by forcing them into tidyverse style — clean_columns • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Cleans up column names by forcing them into tidyverse style — clean_columns • upstartr - - + + - - -
-
- -
- -
+
@@ -134,53 +54,54 @@

Cleans up column names by forcing them into tidyverse style

coerces them into tidyverse-styled column names.

-
clean_columns(x)
+
+
clean_columns(x)
+
-

Arguments

- - - - - - -
x

A vector of column names.

+
+

Arguments

+
x
+

A vector of column names.

-

Value

+
+
+

Value

+ -

A character vector of column names.

+

A character vector of column names.

+
-

Examples

-
clean_columns(c("Date of Purchase", "Item No.", "description", "", - "Transaction at Jane's Counter?", "Auditing - Worth it?")) -
#> [1] "date_of_purchase" "item_no" -#> [3] "description" "column_4" -#> [5] "transaction_at_janes_counter" "auditing_worth_it"
-
+
+

Examples

+
clean_columns(c("Date of Purchase", "Item No.", "description", "",
+  "Transaction at Jane's Counter?", "Auditing - Worth it?"))
+#> [1] "date_of_purchase"             "item_no"                     
+#> [3] "description"                  "column_4"                    
+#> [5] "transaction_at_janes_counter" "auditing_worth_it"           
+
+
+
+
-
- - + + diff --git a/docs/reference/combine_csvs.html b/docs/reference/combine_csvs.html index ac3de14..d2cd49b 100644 --- a/docs/reference/combine_csvs.html +++ b/docs/reference/combine_csvs.html @@ -1,80 +1,13 @@ - - - - - - - -Combine CSVs in a directory — combine_csvs • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Combine CSVs in a directory — combine_csvs • upstartr - + + - - - -
-
- -
- -
+
@@ -134,54 +54,52 @@

Combine CSVs in a directory

concatenate all CSV files into a single tibble.

-
combine_csvs(dir, pattern = "*.csv", ...)
- -

Arguments

- - - - - - - - - - - - - - -
dir

Path to the directory to look at for files.

pattern

Pattern to use for detecting files. (Default: '*.csv')

...

Parameters to pass to readr::read_csv.

- -

Value

- -

A tibble of concatenated data from multiple CSV files.

+
+
combine_csvs(dir, pattern = "*.csv", ...)
+
+ +
+

Arguments

+
dir
+

Path to the directory to look at for files.

+ + +
pattern
+

Pattern to use for detecting files. (Default: '*.csv')

+ + +
...
+

Parameters to pass to readr::read_csv.

+ +
+
+

Value

+ + +

A tibble of concatenated data from multiple CSV files.

+
+
-
- - + + diff --git a/docs/reference/combine_excels.html b/docs/reference/combine_excels.html index da2fc7b..2af0d77 100644 --- a/docs/reference/combine_excels.html +++ b/docs/reference/combine_excels.html @@ -1,80 +1,13 @@ - - - - - - - -Combine Excel files in a directory — combine_excels • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Combine Excel files in a directory — combine_excels • upstartr - - + + - - -
-
- -
- -
+
@@ -134,59 +54,57 @@

Combine Excel files in a directory

concatenate all Excel files into a single tibble.

-
combine_excels(dir, pattern = "*.xls[x]?", all_sheets = FALSE, ...)
- -

Arguments

- - - - - - - - - - - - - - - - - - -
dir

Path to the directory to look at for files.

pattern

Pattern to use for detecting files. (Default: '*.xls[x]?')

all_sheets

Should this function also concatenate all sheets within each -Excel file into one long tibble? (Default: FALSE)

...

Parameters to pass to readxl::read_excel.

- -

Value

- -

A tibble of concatenated data from multiple Excel files.

+
+
combine_excels(dir, pattern = "*.xls[x]?", all_sheets = FALSE, ...)
+
+ +
+

Arguments

+
dir
+

Path to the directory to look at for files.

+ + +
pattern
+

Pattern to use for detecting files. (Default: '*.xls[x]?')

+ + +
all_sheets
+

Should this function also concatenate all sheets within each +Excel file into one long tibble? (Default: FALSE)

+ + +
...
+

Parameters to pass to readxl::read_excel.

+ +
+
+

Value

+ + +

A tibble of concatenated data from multiple Excel files.

+
+
-
- - + + diff --git a/docs/reference/convert_str_to_logical.html b/docs/reference/convert_str_to_logical.html index b1de1f2..9264574 100644 --- a/docs/reference/convert_str_to_logical.html +++ b/docs/reference/convert_str_to_logical.html @@ -1,80 +1,13 @@ - - - - - - - -Converts a character vector to logicals — convert_str_to_logical • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Converts a character vector to logicals — convert_str_to_logical • upstartr - - + + - - -
-
- -
- -
+
@@ -134,62 +54,63 @@

Converts a character vector to logicals

a vector of patterns to match against for truthy and falsy values.

-
convert_str_to_logical(
-  x,
-  truthy = c("T", "TRUE", "Y", "YES"),
-  falsy = c("F", "FALSE", "N", "NO")
-)
- -

Arguments

- - - - - - - - - - - - - - -
x

A character vector.

truthy

A vector of case-insensitive truthy values to turn into TRUE.

falsy

A vector of case-insensitive falsy values to turn into FALSE.

- -

Value

- -

A logical vector.

- -

Examples

-
convert_str_to_logical(c('YES', 'Y', 'No', 'N', 'YES', 'yes', 'no', 'Yes', 'NO', 'Y', 'y')) -
#> [1] TRUE TRUE FALSE FALSE TRUE TRUE FALSE TRUE FALSE TRUE TRUE
-
+
+
convert_str_to_logical(
+  x,
+  truthy = c("T", "TRUE", "Y", "YES"),
+  falsy = c("F", "FALSE", "N", "NO")
+)
+
+ +
+

Arguments

+
x
+

A character vector.

+ + +
truthy
+

A vector of case-insensitive truthy values to turn into TRUE.

+ + +
falsy
+

A vector of case-insensitive falsy values to turn into FALSE.

+ +
+
+

Value

+ + +

A logical vector.

+
+ +
+

Examples

+
convert_str_to_logical(c('YES', 'Y', 'No', 'N', 'YES', 'yes', 'no', 'Yes', 'NO', 'Y', 'y'))
+#>  [1]  TRUE  TRUE FALSE FALSE  TRUE  TRUE FALSE  TRUE FALSE  TRUE  TRUE
+
+
+
+
-
- - + + diff --git a/docs/reference/dir_data_cache.html b/docs/reference/dir_data_cache.html index a59792c..720b865 100644 --- a/docs/reference/dir_data_cache.html +++ b/docs/reference/dir_data_cache.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within cached data directory. — dir_data_cache • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within cached data directory. — dir_data_cache • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within cached data directory.

Constructs a path within startr's data/cache/ directory.

-
dir_data_cache(...)
+
+
dir_data_cache(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
-
- - + + diff --git a/docs/reference/dir_data_out.html b/docs/reference/dir_data_out.html index 5e57c26..3382bfa 100644 --- a/docs/reference/dir_data_out.html +++ b/docs/reference/dir_data_out.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within disposable data outputs directory. — dir_data_out • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within disposable data outputs directory. — dir_data_out • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within disposable data outputs directory.

Constructs a path within startr's data/out/ directory.

-
dir_data_out(...)
+
+
dir_data_out(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
-
- - + + diff --git a/docs/reference/dir_data_processed.html b/docs/reference/dir_data_processed.html index 3b42feb..d0ae3df 100644 --- a/docs/reference/dir_data_processed.html +++ b/docs/reference/dir_data_processed.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within processed data directory. — dir_data_processed • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within processed data directory. — dir_data_processed • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within processed data directory.

Constructs a path within startr's data/processed/ directory.

-
dir_data_processed(...)
+
+
dir_data_processed(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
-
- - + + diff --git a/docs/reference/dir_data_raw.html b/docs/reference/dir_data_raw.html index 0316c5e..14f50a6 100644 --- a/docs/reference/dir_data_raw.html +++ b/docs/reference/dir_data_raw.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within raw data directory. — dir_data_raw • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within raw data directory. — dir_data_raw • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within raw data directory.

Constructs a path within startr's data/raw/ directory.

-
dir_data_raw(...)
+
+
dir_data_raw(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
-
- - + + diff --git a/docs/reference/dir_path.html b/docs/reference/dir_path.html index b128090..2dde6a3 100644 --- a/docs/reference/dir_path.html +++ b/docs/reference/dir_path.html @@ -1,79 +1,12 @@ - - - - - - - -Construct an arbitrary path. — dir_path • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Construct an arbitrary path. — dir_path • upstartr - + + - - - -
-
- -
- -
+
-

Convenience function that constructs a path. Wraps here::here.

+

Convenience function that constructs a path. Wraps here::here.

-
dir_path(...)
+
+
dir_path(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
-
- - + + diff --git a/docs/reference/dir_plots.html b/docs/reference/dir_plots.html index 5d946a0..f343763 100644 --- a/docs/reference/dir_plots.html +++ b/docs/reference/dir_plots.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within plots directory. — dir_plots • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within plots directory. — dir_plots • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within plots directory.

Constructs a path within startr's plots/ directory.

-
dir_plots(...)
+
+
dir_plots(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
-
- - + + diff --git a/docs/reference/dir_reports.html b/docs/reference/dir_reports.html index b5a82a3..2ed18c4 100644 --- a/docs/reference/dir_reports.html +++ b/docs/reference/dir_reports.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within reports directory. — dir_reports • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within reports directory. — dir_reports • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within reports directory.

Constructs a path within startr's reports/ directory.

-
dir_reports(...)
+
+
dir_reports(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
- - - + + diff --git a/docs/reference/dir_scrape.html b/docs/reference/dir_scrape.html index ffafbaa..0785c8a 100644 --- a/docs/reference/dir_scrape.html +++ b/docs/reference/dir_scrape.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within scrape directory. — dir_scrape • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within scrape directory. — dir_scrape • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within scrape directory.

Constructs a path within startr's scrape/ directory.

-
dir_scrape(...)
+
+
dir_scrape(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
- - - + + diff --git a/docs/reference/dir_src.html b/docs/reference/dir_src.html index 4151a75..3194bf3 100644 --- a/docs/reference/dir_src.html +++ b/docs/reference/dir_src.html @@ -1,79 +1,12 @@ - - - - - - - -Get path within src directory — dir_src • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Get path within src directory — dir_src • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Get path within src directory

Constructs a path within startr's main R/ directory.

-
dir_src(...)
+
+
dir_src(...)
+
-

Arguments

- - - - - - -
...

Any number of path strings, passed in the same fashion as here::here.

+
+

Arguments

+
...
+

Any number of path strings, passed in the same fashion as here::here.

-

Value

+
+
+

Value

+ -

A path string.

+

A path string.

+
+
- - - + + diff --git a/docs/reference/end_processing.html b/docs/reference/end_processing.html index 648b75e..809abc2 100644 --- a/docs/reference/end_processing.html +++ b/docs/reference/end_processing.html @@ -1,82 +1,15 @@ - - - - - - - -Runs the post-processing step on a startr project. — end_processing • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Runs the post-processing step on a startr project. — end_processing • upstartr - - - - - - - - - - - - - - - + + - - - -
-
- -
- -
+
-

The post-processing step, run as part of upstartr::run_process +

The post-processing step, run as part of upstartr::run_process during the process.R stage of a startr project, removes all variables -saved by upstartr::begin_processing +saved by upstartr::begin_processing and then beeps to announce it's finished.

-
end_processing(
-  should_clean_processing_variables = TRUE,
-  should_beep = TRUE,
-  logged_vars = NULL
-)
- -

Arguments

- - - - - - - - - - - - - - -
should_clean_processing_variables

Either TRUE, FALSE, or pulled from the environment if set.

should_beep

Either TRUE, FALSE, or pulled from the environment if set.

logged_vars

A list of variables that existed before the processing step began.

- -

Value

- -

No return value, called for side effects

+
+
end_processing(
+  should_clean_processing_variables = TRUE,
+  should_beep = TRUE,
+  logged_vars = NULL
+)
+
+ +
+

Arguments

+
should_clean_processing_variables
+

Either TRUE, FALSE, or pulled from the environment if set.

+ + +
should_beep
+

Either TRUE, FALSE, or pulled from the environment if set.

+ + +
logged_vars
+

A list of variables that existed before the processing step began.

+ +
+
+

Value

+ + +

No return value, called for side effects

+
+
-
- - + + diff --git a/docs/reference/grapes-not_in-grapes.html b/docs/reference/grapes-not_in-grapes.html index 89d1537..768b008 100644 --- a/docs/reference/grapes-not_in-grapes.html +++ b/docs/reference/grapes-not_in-grapes.html @@ -1,79 +1,12 @@ - - - - - - - -Opposite of %in% — %not_in% • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Opposite of %in% — %not_in% • upstartr - + + - - - -
-
- -
- -
+
@@ -132,54 +52,55 @@

Opposite of %in%

Given vectors A and B, returns only the entities from vector A that don't occur in vector B.

-
x %not_in% table
- -

Arguments

- - - - - - - - - - -
x

The vector you want to check.

table

Table in which to do lookups against x.

- -

Value

- -

Same form of return as %in% — except it will return only elements on the lhs that aren't present on the rhs

- -

Examples

-
c(1, 2, 3, 4, 5) %not_in% c(4, 5, 6, 7, 8) -
#> [1] TRUE TRUE TRUE FALSE FALSE
-
+
+
x %not_in% table
+
+ +
+

Arguments

+
x
+

The vector you want to check.

+ + +
table
+

Table in which to do lookups against x.

+ +
+
+

Value

+ + +

Same form of return as %in% — except it will return only elements on the lhs that aren't present on the rhs

+
+ +
+

Examples

+
c(1, 2, 3, 4, 5) %not_in% c(4, 5, 6, 7, 8)
+#> [1]  TRUE  TRUE  TRUE FALSE FALSE
+
+
+
+
- - - + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 95084a9..c16016d 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,78 +1,12 @@ - - - - - - - -Function reference • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Function reference • upstartr - + + - - - -
-
- -
- -
+
- - - - - - - - - - -
-

Startr-specific

-

Functions specific to running a startr-templated project

+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+

Startr-specific

+

Functions specific to running a startr-templated project

+

initialize_startr()

Initialize startr project

+

run_analyze()

Runs the analysis step for a startr project.

+

run_config()

Configures an existing startr project

+

run_notebook()

Runs the notebook rendering step for a startr project.

+

run_process()

Runs the processing step on a startr project.

+

run_visualize()

Runs the visualization step for a startr project.

+

begin_processing()

Runs the pre-processing step on a startr project.

+

end_processing()

Runs the post-processing step on a startr project.

+

render_notebook()

Renders out an RMarkdown notebook.

+

dir_data_cache()

Get path within cached data directory.

+

dir_data_out()

Get path within disposable data outputs directory.

+

dir_data_processed()

Get path within processed data directory.

+

dir_data_raw()

Get path within raw data directory.

+

dir_path()

Construct an arbitrary path.

+

dir_plots()

Get path within plots directory.

+

dir_reports()

Get path within reports directory.

+

dir_scrape()

Get path within scrape directory.

+

dir_src()

Get path within src directory

-

Helpers

+
+

Helpers

+

calc_index()

Index values

+

calc_mode()

Calculate mode

+

unaccent()

De-accents strings

+

remove_non_utf8()

Removes non-UTF-8 characters

+

`%not_in%`

Opposite of %in%

+

not.na()

Opposite of is.na

+

not.null()

Opposite of is.null

+

simplify_string()

Simplifies strings for analysis

+

clean_columns()

Cleans up column names by forcing them into tidyverse style

+

convert_str_to_logical()

Converts a character vector to logicals

-

Reading

+
+

Reading

+

read_all_excel_sheets()

Combine all sheets in an Excel file

+

combine_csvs()

Combine CSVs in a directory

+

combine_excels()

Combine Excel files in a directory

-

Writing

+
+

Writing

+

write_excel()

Write out an Excel file with minimal configuration

+

write_plot()

Write out a ggplot2 graphic with minimal configuration

+

write_shp()

Write a shapefile to disk

-

Graphics

+
+

Graphics

+

scale_x_percent()

Create a continuous x-axis scale using percentages

+

scale_y_percent()

Create a continuous y-axis scale using percentages

+

reorder_within

Reorder an x or y axis within facets

+

scale_x_reordered

Passed after reorder_within to reorder x-axis along facets

+

scale_y_reordered

Passed after reorder_within to reorder x-axis along facets

- +
+
-
- - + + diff --git a/docs/reference/initialize_startr.html b/docs/reference/initialize_startr.html index 653f226..4726353 100644 --- a/docs/reference/initialize_startr.html +++ b/docs/reference/initialize_startr.html @@ -1,81 +1,14 @@ - - - - - - - -Initialize startr project — initialize_startr • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Initialize startr project — initialize_startr • upstartr - - - - - - - - - - - - - - - - + + - - -
-
- -
- -
+
@@ -136,100 +56,98 @@

Initialize startr project

writing some project configs to `options`).

-
initialize_startr(
-  author = "Firstname Lastname <firstlast@example.com>",
-  title = "startr",
-  scipen = 999,
-  timezone = "America/Toronto",
-  should_render_notebook = FALSE,
-  should_process_data = TRUE,
-  should_timestamp_output_files = FALSE,
-  should_clean_processing_variables = TRUE,
-  should_beep = TRUE,
-  set_minimal_graphics_theme = TRUE,
-  packages = c()
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
author

Name and email of the startr project author

title

Title of the startr project

scipen

Which level of scientific precision to use. (Default: 999)

timezone

The timezone for analysis. (Default: 'America/Toronto')

should_render_notebook

Whether the RMarkdown notebook should be rendered. (Default: FALSE)

should_process_data

Whether startr's process step should be run. (Default: TRUE)

should_timestamp_output_files

Whether write_excel's output files should be timestamped. (Default: FALSE)

should_clean_processing_variables

Whether processing variables should be cleaned -from the environment after processing is complete. (Default: TRUE)

should_beep

Whether startr should beep after tasks like processing or knitting RMarkdown notebooks. (Default: TRUE)

set_minimal_graphics_theme

Whether the minimal graphics theme should be used. (Default: TRUE)

packages

Vector of package names, from CRAN, Github or Bioconductor to be installed. -If using GitHub, package names should be in the format 'user/repo', e.g. 'globeandmail/upstartr'.

- -

Value

- -

No return value, called for side effects

+
+
initialize_startr(
+  author = "Firstname Lastname <firstlast@example.com>",
+  title = "startr",
+  scipen = 999,
+  timezone = "America/Toronto",
+  should_render_notebook = FALSE,
+  should_process_data = TRUE,
+  should_timestamp_output_files = FALSE,
+  should_clean_processing_variables = TRUE,
+  should_beep = TRUE,
+  set_minimal_graphics_theme = TRUE,
+  packages = c()
+)
+
+ +
+

Arguments

+
author
+

Name and email of the startr project author

+ + +
title
+

Title of the startr project

+ + +
scipen
+

Which level of scientific precision to use. (Default: 999)

+ + +
timezone
+

The timezone for analysis. (Default: 'America/Toronto')

+ + +
should_render_notebook
+

Whether the RMarkdown notebook should be rendered. (Default: FALSE)

+ + +
should_process_data
+

Whether startr's process step should be run. (Default: TRUE)

+ + +
should_timestamp_output_files
+

Whether write_excel's output files should be timestamped. (Default: FALSE)

+ + +
should_clean_processing_variables
+

Whether processing variables should be cleaned +from the environment after processing is complete. (Default: TRUE)

+ + +
should_beep
+

Whether startr should beep after tasks like processing or knitting RMarkdown notebooks. (Default: TRUE)

+ + +
set_minimal_graphics_theme
+

Whether the minimal graphics theme should be used. (Default: TRUE)

+ + +
packages
+

Vector of package names, from CRAN, Github or Bioconductor to be installed. +If using GitHub, package names should be in the format 'user/repo', e.g. 'globeandmail/upstartr'.

+ +
+
+

Value

+ + +

No return value, called for side effects

+
+
- - - + + diff --git a/docs/reference/not.na.html b/docs/reference/not.na.html index 003514d..d40c77d 100644 --- a/docs/reference/not.na.html +++ b/docs/reference/not.na.html @@ -1,79 +1,12 @@ - - - - - - - -Opposite of is.na — not.na • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Opposite of is.na — not.na • upstartr - - + + - - -
-
- -
- -
+
@@ -132,50 +52,51 @@

Opposite of is.na

Given a vector, returns TRUE for all entities that aren't NA.

-
not.na(x)
+
+
not.na(x)
+
-

Arguments

- - - - - - -
x

A vector to check for NAs against.

+
+

Arguments

+
x
+

A vector to check for NAs against.

-

Value

+
+
+

Value

+ -

A vector of elements that aren't NA

+

A vector of elements that aren't NA

+
-

Examples

-
not.na(c(1, NA, 2, NA)) -
#> [1] TRUE FALSE TRUE FALSE
-
+
+

Examples

+
not.na(c(1, NA, 2, NA))
+#> [1]  TRUE FALSE  TRUE FALSE
+
+
+
+
- - - + + diff --git a/docs/reference/not.null.html b/docs/reference/not.null.html index d61b492..e4627b6 100644 --- a/docs/reference/not.null.html +++ b/docs/reference/not.null.html @@ -1,79 +1,12 @@ - - - - - - - -Opposite of is.null — not.null • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Opposite of is.null — not.null • upstartr - - + + - - -
-
- -
- -
+
@@ -132,50 +52,51 @@

Opposite of is.null

Given a list, returns TRUE for all entities that aren't NULL.

-
not.null(x)
+
+
not.null(x)
+
-

Arguments

- - - - - - -
x

A vector to check for NULLs against.

+
+

Arguments

+
x
+

A vector to check for NULLs against.

-

Value

+
+
+

Value

+ -

Elements that aren't NULL

+

Elements that aren't NULL

+
-

Examples

-
not.null(list(1, NULL, 2, NULL)) -
#> [1] TRUE
-
+
+

Examples

+
not.null(list(1, NULL, 2, NULL))
+#> [1] TRUE
+
+
+
+
- - - + + diff --git a/docs/reference/read_all_excel_sheets.html b/docs/reference/read_all_excel_sheets.html index 8b894ca..50ea8ae 100644 --- a/docs/reference/read_all_excel_sheets.html +++ b/docs/reference/read_all_excel_sheets.html @@ -1,80 +1,13 @@ - - - - - - - -Combine all sheets in an Excel file — read_all_excel_sheets • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Combine all sheets in an Excel file — read_all_excel_sheets • upstartr - - - - + + -
-
- -
- -
+
-

Reads all sheets in a single Excel file using readxl::read_excel +

Reads all sheets in a single Excel file using readxl::read_excel and concatenates them into a single, long tibble.

-
read_all_excel_sheets(filepath, ...)
+
+
read_all_excel_sheets(filepath, ...)
+
+ +
+

Arguments

+
filepath
+

Path to the Excel file.

-

Arguments

- - - - - - - - - - -
filepath

Path to the Excel file.

...

Parameters to pass to readxl::read_excel.

-

Value

+
...
+

Parameters to pass to readxl::read_excel.

-

A tibble data concatenated from a all sheets in an Excel file.

+
+
+

Value

+ + +

A tibble data concatenated from a all sheets in an Excel file.

+
+
-
- - + + diff --git a/docs/reference/remove_non_utf8.html b/docs/reference/remove_non_utf8.html index e65392a..3b8418d 100644 --- a/docs/reference/remove_non_utf8.html +++ b/docs/reference/remove_non_utf8.html @@ -1,79 +1,12 @@ - - - - - - - -Removes non-UTF-8 characters — remove_non_utf8 • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Removes non-UTF-8 characters — remove_non_utf8 • upstartr - - + + - - -
-
- -
- -
+
@@ -132,52 +52,53 @@

Removes non-UTF-8 characters

Removes non-UTF-8 characters in a given character vector.

-
remove_non_utf8(x)
+
+
remove_non_utf8(x)
+
-

Arguments

- - - - - - -
x

A character vector.

+
+

Arguments

+
x
+

A character vector.

-

Value

+
+
+

Value

+ -

A character vector of strings without non-UTF-8 characters.

+

A character vector of strings without non-UTF-8 characters.

+
-

Examples

-
non_utf8 <- 'fa\xE7ile' - Encoding(non_utf8) <- 'latin1' - remove_non_utf8(non_utf8) -
#> [1] "façile"
-
+
+

Examples

+
non_utf8 <- 'fa\xE7ile'
+  Encoding(non_utf8) <- 'latin1'
+  remove_non_utf8(non_utf8)
+#> [1] "façile"
+
+
+
+
- - - + + diff --git a/docs/reference/render_notebook.html b/docs/reference/render_notebook.html index 7cbca42..dbf27c7 100644 --- a/docs/reference/render_notebook.html +++ b/docs/reference/render_notebook.html @@ -1,80 +1,13 @@ - - - - - - - -Renders out an RMarkdown notebook. — render_notebook • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Renders out an RMarkdown notebook. — render_notebook • upstartr - - - - + + -
-
- -
- -
+
@@ -134,50 +54,48 @@

Renders out an RMarkdown notebook.

and then beeps.

-
render_notebook(notebook_file, output_dir = dir_reports())
+
+
render_notebook(notebook_file, output_dir = dir_reports())
+
+ +
+

Arguments

+
notebook_file
+

The path for the RMarkdown notebook you're rendering.

-

Arguments

- - - - - - - - - - -
notebook_file

The path for the RMarkdown notebook you're rendering.

output_dir

The directory to write the outputs to.

-

Value

+
output_dir
+

The directory to write the outputs to.

-

No return value, called for side effects

+
+
+

Value

+ + +

No return value, called for side effects

+
+
- - - + + diff --git a/docs/reference/reorder_within.html b/docs/reference/reorder_within.html index 1e219a9..4647833 100644 --- a/docs/reference/reorder_within.html +++ b/docs/reference/reorder_within.html @@ -1,79 +1,12 @@ - - - - - - - -Reorder an x or y axis within facets — reorder_within • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Reorder an x or y axis within facets — reorder_within • upstartr - + + - - - -
-
- -
- -
+
-

See tidytext::reorder_within for details.

+

See tidytext::reorder_within for details.

+
+

Value

+ -

Value

+

A ggplot2 object for reordering elements within facets, used in combination with

+

+

upstartr::scale_x_reordered or

+

+

upstartr::scale_y_reordered

-

A ggplot2 object for reordering elements within facets, used in combination with - upstartr::scale_x_reordered or - upstartr::scale_y_reordered

+ +
+
-
- - + + diff --git a/docs/reference/run_analyze.html b/docs/reference/run_analyze.html index bf95e0a..5337871 100644 --- a/docs/reference/run_analyze.html +++ b/docs/reference/run_analyze.html @@ -1,79 +1,12 @@ - - - - - - - -Runs the analysis step for a startr project. — run_analyze • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Runs the analysis step for a startr project. — run_analyze • upstartr - - + + - - -
-
- -
- -
+
@@ -132,38 +52,38 @@

Runs the analysis step for a startr project.

Sources analyze.R.

-
run_analyze()
- +
+
run_analyze()
+
-

Value

+
+

Value

+ -

No return value, called for side effects

+

No return value, called for side effects

+
+
- - - + + diff --git a/docs/reference/run_config.html b/docs/reference/run_config.html index d540168..3a9518f 100644 --- a/docs/reference/run_config.html +++ b/docs/reference/run_config.html @@ -1,79 +1,12 @@ - - - - - - - -Configures an existing startr project — run_config • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Configures an existing startr project — run_config • upstartr - - + + - - -
-
- -
- -
+
@@ -132,38 +52,38 @@

Configures an existing startr project

Sources config.R and functions.R in turn.

-
run_config()
- +
+
run_config()
+
-

Value

+
+

Value

+ -

No return value, called for side effects

+

No return value, called for side effects

+
+
- - - + + diff --git a/docs/reference/run_notebook.html b/docs/reference/run_notebook.html index 88edf23..3e7244c 100644 --- a/docs/reference/run_notebook.html +++ b/docs/reference/run_notebook.html @@ -1,80 +1,13 @@ - - - - - - - -Runs the notebook rendering step for a startr project. — run_notebook • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Runs the notebook rendering step for a startr project. — run_notebook • upstartr - + + - - - -
-
- -
- -
+
-

Renders an RMarkdown notebook using upstartr::render_notebook +

Renders an RMarkdown notebook using upstartr::render_notebook and then beeps.

-
run_notebook(
-  filename = "notebook.Rmd",
-  should_beep = TRUE,
-  should_render_notebook = TRUE
-)
- -

Arguments

- - - - - - - - - - - - - - -
filename

The filename for the RMarkdown notebook you want to render.

should_beep

Either TRUE, FALSE, or pulled from the environment if set.

should_render_notebook

Either TRUE, FALSE, or pulled from the environment if set.

- -

Value

- -

No return value, called for side effects

+
+
run_notebook(
+  filename = "notebook.Rmd",
+  should_beep = TRUE,
+  should_render_notebook = TRUE
+)
+
+ +
+

Arguments

+
filename
+

The filename for the RMarkdown notebook you want to render.

+ + +
should_beep
+

Either TRUE, FALSE, or pulled from the environment if set.

+ + +
should_render_notebook
+

Either TRUE, FALSE, or pulled from the environment if set.

+ +
+
+

Value

+ + +

No return value, called for side effects

+
+
-
- - + + diff --git a/docs/reference/run_process.html b/docs/reference/run_process.html index eef4971..dadeb2c 100644 --- a/docs/reference/run_process.html +++ b/docs/reference/run_process.html @@ -1,81 +1,14 @@ - - - - - - - -Runs the processing step on a startr project. — run_process • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Runs the processing step on a startr project. — run_process • upstartr - - - - - - - - - - - - - - - + + - - - -
-
- -
- -
+
-

Runs the pre-processing step (see upstartr::begin_processing +

Runs the pre-processing step (see upstartr::begin_processing for details), then sources process.R, then runs the post-processing step -(see upstartr::end_processing for details).

+(see upstartr::end_processing for details).

-
run_process(should_process_data = TRUE)
+
+
run_process(should_process_data = TRUE)
+
-

Arguments

- - - - - - -
should_process_data

Either TRUE, FALSE, or pulled from the environment if set.

+
+

Arguments

+
should_process_data
+

Either TRUE, FALSE, or pulled from the environment if set.

-

Value

+
+
+

Value

+ -

No return value, called for side effects

+

No return value, called for side effects

+
+
-
- - + + diff --git a/docs/reference/run_visualize.html b/docs/reference/run_visualize.html index 1d89cbe..fe423a0 100644 --- a/docs/reference/run_visualize.html +++ b/docs/reference/run_visualize.html @@ -1,79 +1,12 @@ - - - - - - - -Runs the visualization step for a startr project. — run_visualize • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Runs the visualization step for a startr project. — run_visualize • upstartr - - + + - - -
-
- -
- -
+
@@ -132,38 +52,38 @@

Runs the visualization step for a startr project.

Sources visualize.R.

-
run_visualize()
- +
+
run_visualize()
+
-

Value

+
+

Value

+ -

No return value, called for side effects

+

No return value, called for side effects

+
+
- - - + + diff --git a/docs/reference/scale_x_percent.html b/docs/reference/scale_x_percent.html index da2bea4..50617f6 100644 --- a/docs/reference/scale_x_percent.html +++ b/docs/reference/scale_x_percent.html @@ -1,79 +1,12 @@ - - - - - - - -Create a continuous x-axis scale using percentages — scale_x_percent • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Create a continuous x-axis scale using percentages — scale_x_percent • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Create a continuous x-axis scale using percentages

Convenience function to return a scale_x_continuous function using percentage labels.

-
scale_x_percent(...)
+
+
scale_x_percent(...)
+
-

Arguments

- - - - - - -
...

All your usual continuous x-axis scale parameters.

+
+

Arguments

+
...
+

All your usual continuous x-axis scale parameters.

-

Value

+
+
+

Value

+ -

A scale object to be consumed by ggplot2.

+

A scale object to be consumed by ggplot2.

+
+
- - - + + diff --git a/docs/reference/scale_x_reordered.html b/docs/reference/scale_x_reordered.html index 8ad19af..238e64f 100644 --- a/docs/reference/scale_x_reordered.html +++ b/docs/reference/scale_x_reordered.html @@ -1,79 +1,12 @@ - - - - - - - -Passed after reorder_within to reorder x-axis along facets — scale_x_reordered • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Passed after reorder_within to reorder x-axis along facets — scale_x_reordered • upstartr - + + - - - -
-
- -
- -
+
-

See tidytext::scale_x_reordered for details.

+

See tidytext::scale_x_reordered for details.

+
+

Value

+ -

Value

- -

A scale object to be consumed by ggplot2, used in combination with - upstartr::reorder_within.

+

A scale object to be consumed by ggplot2, used in combination with

+

+

upstartr::reorder_within.

+
+
-
- - + + diff --git a/docs/reference/scale_y_percent.html b/docs/reference/scale_y_percent.html index b1b1bbb..af9ae8b 100644 --- a/docs/reference/scale_y_percent.html +++ b/docs/reference/scale_y_percent.html @@ -1,79 +1,12 @@ - - - - - - - -Create a continuous y-axis scale using percentages — scale_y_percent • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Create a continuous y-axis scale using percentages — scale_y_percent • upstartr - + + - - - -
-
- -
- -
+
@@ -132,46 +52,44 @@

Create a continuous y-axis scale using percentages

Convenience function to return a scale_y_continuous function using percentage labels.

-
scale_y_percent(...)
+
+
scale_y_percent(...)
+
-

Arguments

- - - - - - -
...

All your usual continuous y-axis scale parameters.

+
+

Arguments

+
...
+

All your usual continuous y-axis scale parameters.

-

Value

+
+
+

Value

+ -

A scale object to be consumed by ggplot2.

+

A scale object to be consumed by ggplot2.

+
+
- - - + + diff --git a/docs/reference/scale_y_reordered.html b/docs/reference/scale_y_reordered.html index 5abc825..8b1ebca 100644 --- a/docs/reference/scale_y_reordered.html +++ b/docs/reference/scale_y_reordered.html @@ -1,79 +1,12 @@ - - - - - - - -Passed after reorder_within to reorder x-axis along facets — scale_y_reordered • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Passed after reorder_within to reorder x-axis along facets — scale_y_reordered • upstartr - + + - - - -
-
- -
- -
+
-

See tidytext::scale_y_reordered for details.

+

See tidytext::scale_y_reordered for details.

+
+

Value

+ -

Value

- -

A scale object to be consumed by ggplot2, used in combination with - upstartr::reorder_within.

+

A scale object to be consumed by ggplot2, used in combination with

+

+

upstartr::reorder_within.

+
+
-
- - + + diff --git a/docs/reference/simplify_string.html b/docs/reference/simplify_string.html index 9191d80..0f39c3e 100644 --- a/docs/reference/simplify_string.html +++ b/docs/reference/simplify_string.html @@ -1,82 +1,15 @@ - - - - - - - -Simplifies strings for analysis — simplify_string • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Simplifies strings for analysis — simplify_string • upstartr - + + - - - -
-
- -
- -
+
@@ -138,91 +58,93 @@

Simplifies strings for analysis

or business names you need to compare, but where misspellings may be common.

-
simplify_string(
-  x,
-  alpha = TRUE,
-  digits = FALSE,
-  unaccent = TRUE,
-  utf8_only = TRUE,
-  case = "upper",
-  trim = TRUE,
-  stopwords = NA
-)
- -

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
x

A character vector.

alpha

Should alphabetic characters be included in the cleaned up string? (Default: TRUE)

digits

Should digits be included in the cleaned up string? (Default: FALSE)

unaccent

Should characters be de-accented? (Default: TRUE)

utf8_only

Should characters be UTF-8 only? (Default: TRUE)

case

What casing should characters use? Can be one of 'upper', 'lower', 'sentence', 'title', -or 'keep' for the existing casing (Default: 'upper')

trim

Should strings be trimmed of excess spaces? (Default: TRUE)

stopwords

An optional vector of stop words to be removed.

- -

Value

- -

A character vector of simplified strings.

- -

Examples

-
simplify_string(c('J. Jonah Jameson', 'j jonah jameson', - 'j jonah 123 jameson', 'J Jónah Jameson...')) -
#> [1] "J JONAH JAMESON" "J JONAH JAMESON" "J JONAH JAMESON" "J JONAH JAMESON"
simplify_string(c('123 Business Inc.', '123 business incorporated', - '123 ... Business ... Inc.'), digits = TRUE, stopwords = c('INC', 'INCORPORATED')) -
#> [1] "123 BUSINESS" "123 BUSINESS" "123 BUSINESS"
-
+
+
simplify_string(
+  x,
+  alpha = TRUE,
+  digits = FALSE,
+  unaccent = TRUE,
+  utf8_only = TRUE,
+  case = "upper",
+  trim = TRUE,
+  stopwords = NA
+)
+
+ +
+

Arguments

+
x
+

A character vector.

+ + +
alpha
+

Should alphabetic characters be included in the cleaned up string? (Default: TRUE)

+ + +
digits
+

Should digits be included in the cleaned up string? (Default: FALSE)

+ + +
unaccent
+

Should characters be de-accented? (Default: TRUE)

+ + +
utf8_only
+

Should characters be UTF-8 only? (Default: TRUE)

+ + +
case
+

What casing should characters use? Can be one of 'upper', 'lower', 'sentence', 'title', +or 'keep' for the existing casing (Default: 'upper')

+ + +
trim
+

Should strings be trimmed of excess spaces? (Default: TRUE)

+ + +
stopwords
+

An optional vector of stop words to be removed.

+ +
+
+

Value

+ + +

A character vector of simplified strings.

+
+ +
+

Examples

+
simplify_string(c('J. Jonah Jameson', 'j jonah jameson',
+  'j   jonah 123   jameson', 'J Jónah Jameson...'))
+#> [1] "J JONAH JAMESON" "J JONAH JAMESON" "J JONAH JAMESON" "J JONAH JAMESON"
+simplify_string(c('123 Business Inc.', '123 business incorporated',
+  '123 ... Business ... Inc.'), digits = TRUE, stopwords = c('INC', 'INCORPORATED'))
+#> [1] "123 BUSINESS" "123 BUSINESS" "123 BUSINESS"
+
+
+
+
- - - + + diff --git a/docs/reference/unaccent.html b/docs/reference/unaccent.html index 87cd138..adfcb6e 100644 --- a/docs/reference/unaccent.html +++ b/docs/reference/unaccent.html @@ -1,81 +1,14 @@ - - - - - - - -De-accents strings — unaccent • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -De-accents strings — unaccent • upstartr - - - - - - - - - - - - - - - - + + - - -
-
- -
- -
+
@@ -136,59 +56,61 @@

De-accents strings

compatibility issues during data analysis.

-
unaccent(x, remove.nonconverted = FALSE, ...)
- -

Arguments

- - - - - - - - - - - - - - -
x

A character vector.

remove.nonconverted

Should the function remove unmapped encodings? (Default: FALSE)

...

Parameters passed to textclean::replace_non_ascii

- -

Value

- -

A character vector of strings without accents.

- -

Examples

-
unaccent('façile') -
#> [1] "facile"
unaccent('Montréal') -
#> [1] "Montreal"
-
+
+
unaccent(x, remove.nonconverted = FALSE, ...)
+
+ +
+

Arguments

+
x
+

A character vector.

+ + +
remove.nonconverted
+

Should the function remove unmapped encodings? (Default: FALSE)

+ + +
...
+

Parameters passed to textclean::replace_non_ascii

+ +
+
+

Value

+ + +

A character vector of strings without accents.

+
+ +
+

Examples

+
unaccent('façile')
+#> [1] "facile"
+unaccent('Montréal')
+#> [1] "Montreal"
+
+
+
+
- - - + + diff --git a/docs/reference/write_excel.html b/docs/reference/write_excel.html index e01d7a5..6ad9f96 100644 --- a/docs/reference/write_excel.html +++ b/docs/reference/write_excel.html @@ -1,80 +1,13 @@ - - - - - - - -Write out an Excel file with minimal configuration — write_excel • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Write out an Excel file with minimal configuration — write_excel • upstartr - + + - - - -
-
- -
- -
+
@@ -134,58 +54,56 @@

Write out an Excel file with minimal configuration

using the variable name as the filename.

-
write_excel(
-  variable,
-  output_dir = dir_data_out(),
-  should_timestamp_output_files = FALSE
-)
- -

Arguments

- - - - - - - - - - - - - - -
variable

A tibble or dataframe object.

output_dir

The directory to save the file out to.

should_timestamp_output_files

Either TRUE, FALSE, or pulled from the environment if set.

- -

Value

- -

No return value, called for side effects

+
+
write_excel(
+  variable,
+  output_dir = dir_data_out(),
+  should_timestamp_output_files = FALSE
+)
+
+ +
+

Arguments

+
variable
+

A tibble or dataframe object.

+ + +
output_dir
+

The directory to save the file out to.

+ + +
should_timestamp_output_files
+

Either TRUE, FALSE, or pulled from the environment if set.

+ +
+
+

Value

+ + +

No return value, called for side effects

+
+
- - - + + diff --git a/docs/reference/write_plot.html b/docs/reference/write_plot.html index bf76763..56a1845 100644 --- a/docs/reference/write_plot.html +++ b/docs/reference/write_plot.html @@ -1,80 +1,13 @@ - - - - - - - -Write out a ggplot2 graphic with minimal configuration — write_plot • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Write out a ggplot2 graphic with minimal configuration — write_plot • upstartr - - + + - - -
-
- -
- -
+
-

Takes a ggplot2 object and writes it to disk via ggplot2::ggsave using the +

Takes a ggplot2 object and writes it to disk via ggplot2::ggsave using the variable name as the filename.

-
write_plot(variable, format = "png", output_dir = dir_plots(), ...)
- -

Arguments

- - - - - - - - - - - - - - - - - - -
variable

A tibble or dataframe object.

format

The desired format for the plot, be it 'png', 'pdf', etc. Accepts formats -you'd pass to ggplot2::ggsave's 'device' parameter.

output_dir

The directory to save the plot out to.

...

Other settings to pass to ggsave, such as format, width, height or dpi.

- -

Value

- -

No return value, called for side effects

+
+
write_plot(variable, format = "png", output_dir = dir_plots(), ...)
+
+ +
+

Arguments

+
variable
+

A tibble or dataframe object.

+ + +
format
+

The desired format for the plot, be it 'png', 'pdf', etc. Accepts formats +you'd pass to ggplot2::ggsave's 'device' parameter.

+ + +
output_dir
+

The directory to save the plot out to.

+ + +
...
+

Other settings to pass to ggsave, such as format, width, height or dpi.

+ +
+
+

Value

+ + +

No return value, called for side effects

+
+
-
- - + + diff --git a/docs/reference/write_shp.html b/docs/reference/write_shp.html index 4453e48..130b49d 100644 --- a/docs/reference/write_shp.html +++ b/docs/reference/write_shp.html @@ -1,81 +1,14 @@ - - - - - - - -Write a shapefile to disk — write_shp • upstartr - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Write a shapefile to disk — write_shp • upstartr - - - - - - - - - - - - - - - + + - - - -
-
- -
- -
+
-

Utility function that wraps sf::st_write, but first -removes a previous version of the shapefile if it exists (by default, sf::st_write +

Utility function that wraps sf::st_write, but first +removes a previous version of the shapefile if it exists (by default, sf::st_write will throw an error.)

-
write_shp(shp, path, ...)
- -

Arguments

- - - - - - - - - - - - - - -
shp

A spatial object.

path

The desired filepath for the shapefile.

...

Other settings to pass to st_write, such as format, width, height or dpi.

- -

Value

- -

No return value, called for side effects

+
+
write_shp(shp, path, ...)
+
+ +
+

Arguments

+
shp
+

A spatial object.

+ + +
path
+

The desired filepath for the shapefile.

+ + +
...
+

Other settings to pass to st_write, such as format, width, height or dpi.

+ +
+
+

Value

+ + +

No return value, called for side effects

+
+
-
- - + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..96b98cc --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,150 @@ + + + + /404.html + + + /LICENSE-text.html + + + /authors.html + + + /index.html + + + /news/index.html + + + /reference/begin_processing.html + + + /reference/calc_index.html + + + /reference/calc_mode.html + + + /reference/clean_columns.html + + + /reference/combine_csvs.html + + + /reference/combine_excels.html + + + /reference/convert_str_to_logical.html + + + /reference/dir_data_cache.html + + + /reference/dir_data_out.html + + + /reference/dir_data_processed.html + + + /reference/dir_data_raw.html + + + /reference/dir_path.html + + + /reference/dir_plots.html + + + /reference/dir_reports.html + + + /reference/dir_scrape.html + + + /reference/dir_src.html + + + /reference/end_processing.html + + + /reference/grapes-not_in-grapes.html + + + /reference/index-topic.html + + + /reference/index.html + + + /reference/initialize_startr.html + + + /reference/mode.html + + + /reference/not.na.html + + + /reference/not.null.html + + + /reference/read_all_excel_sheets.html + + + /reference/remove_non_utf8.html + + + /reference/render_notebook.html + + + /reference/reorder_within.html + + + /reference/run_analyze.html + + + /reference/run_config.html + + + /reference/run_notebook.html + + + /reference/run_process.html + + + /reference/run_render_notebook.html + + + /reference/run_visualize.html + + + /reference/scale_x_percent.html + + + /reference/scale_x_reordered.html + + + /reference/scale_y_percent.html + + + /reference/scale_y_reordered.html + + + /reference/simplify_string.html + + + /reference/unaccent.html + + + /reference/write_excel.html + + + /reference/write_plot.html + + + /reference/write_shp.html + + + /testing.html + + diff --git a/docs/testing.html b/docs/testing.html new file mode 100644 index 0000000..7ebbff5 --- /dev/null +++ b/docs/testing.html @@ -0,0 +1,77 @@ + +NA • upstartr + + +
+
+ + + +
+
+ + +

devtools::load_all() devtools::check() devtools::document() pkgdown::build_site()

+ +
+ + + +
+ + + +
+ + + + + + + +