From 495096f584c3cd7280d8b9aa337343ff6dce10ac Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Fri, 1 Mar 2024 08:07:34 -0500 Subject: [PATCH 01/10] Fixed font issues. Added examples and returns. Fixed installation / update instructions --- .Rbuildignore | 1 + NAMESPACE | 1 - R/theme_tntp.R | 6 ++- R/theme_tntp_2018.R | 69 +++++++++++++++++++++----------- R/tntp_style.R | 2 +- R/utils.R | 6 +-- README.md | 7 ---- cran-comments.md | 2 +- man/SegoeUI.Rd | 16 -------- man/import_segoe_ui.Rd | 19 ++++----- man/update_geom_font_defaults.Rd | 10 +++++ tntpr.Rproj | 1 + 12 files changed, 76 insertions(+), 64 deletions(-) delete mode 100644 man/SegoeUI.Rd diff --git a/.Rbuildignore b/.Rbuildignore index c9a707d..eed5ba0 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,4 @@ ^vignettes/tntp-style-plots\.rmd$ ^notes$ ^cran-comments\.md$ +^CRAN-SUBMISSION$ diff --git a/NAMESPACE b/NAMESPACE index 7d69e67..4eef979 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -10,7 +10,6 @@ export(colors_tntp_palette) export(date_to_sy) export(factorize_df) export(figureN) -export(font_se) export(header_tntp) export(import_segoe_ui) export(labelled_to_factors) diff --git a/R/theme_tntp.R b/R/theme_tntp.R index a6ba79e..99cab58 100644 --- a/R/theme_tntp.R +++ b/R/theme_tntp.R @@ -36,8 +36,12 @@ theme_tntp <- function(show_legend_title = TRUE, caption_align = "right", caption_color = "black", caption_size = 12) { - # As of v2.2 ggplot2 left aligns titles by default. ------------------------- .Deprecated("tntp_style") + + # Check for a usable font family + base_family <- get_usable_family(base_family) + + # As of v2.2 ggplot2 left aligns titles by default. ------------------------- # title_align and subtitle_align allows tntpr users to quickly change # Check alignment positions for plot title and subtitle diff --git a/R/theme_tntp_2018.R b/R/theme_tntp_2018.R index 20cfd35..9e69fa2 100644 --- a/R/theme_tntp_2018.R +++ b/R/theme_tntp_2018.R @@ -86,6 +86,10 @@ theme_tntp_2018 <- function(base_family = "Segoe UI", base_size = 11.5, grid_col = "grey93", grid = TRUE, axis_col = "#cccccc", axis = FALSE, ticks = FALSE) { .Deprecated() + + # Check for a usable font family + base_family <- get_usable_family(base_family) + ret <- ggplot2::theme_minimal(base_family = base_family, base_size = base_size) ret <- ret + ggplot2::theme(legend.background = ggplot2::element_blank()) @@ -216,6 +220,13 @@ theme_tntp_2018 <- function(base_family = "Segoe UI", base_size = 11.5, #' #' @param family,face,size,color font family name, face, size and color #' @export +#' @returns nothing +#' @examples +#' \dontrun{ +#' # Update text geoms to use Arial font +#' update_geom_font_defaults(family = 'Arial') +#' } +#' update_geom_font_defaults <- function(family = "Segoe UI", face = "plain", size = 3.5, color = "#2b2b2b") { ggplot2::update_geom_defaults("text", list(family = family, face = face, size = size, color = color)) @@ -224,34 +235,44 @@ update_geom_font_defaults <- function(family = "Segoe UI", face = "plain", size #' Import Segoe UI Condensed font for use in charts #' -#' There is an option `tntpr.loadfonts` which -- if set to `TRUE` -- will -#' call `extrafont::loadfonts()` to register non-core fonts with R PDF & PostScript -#' devices. If you are running under Windows, the package calls the same function -#' to register non-core fonts with the Windows graphics device. +#' This function will check if Segoe UI is already accessible in R and if not +#' it will attempt to import it using the `extrafont` package #' #' @md -#' @note This will take care of ensuring PDF/PostScript usage. The location of the -#' font directory is displayed after the base import is complete. It is highly -#' recommended that you install them on your system the same way you would any -#' other font you wish to use in other programs. #' @export +#' @returns nothing +#' @examples +#' \dontrun{ +#' import_segoe_ui() +#' } +#' import_segoe_ui <- function() { - segoe_font_dir <- system.file("fonts", "segoe-ui", package = "tntpr") - suppressWarnings(suppressMessages(extrafont::font_import(segoe_font_dir, prompt = FALSE))) + # Check if it's already installed + fnt <- extrafont::fonttable() + if (any(grepl("Segoe UI", fnt$FamilyName))) { + cli::cli_inform("Segoe UI is already installed and accessible in R") + return() + } + + # Try loading fonts + extrafont::loadfonts(quiet = TRUE) + fnt <- extrafont::fonttable() + if (any(grepl("Segoe UI", fnt$FamilyName))) { + cli::cli_inform("Segoe UI is now accessible in R") + return() + } - message( - sprintf( - "You will likely need to install these fonts on your system as well.\n\nYou can find them in [%s]", - segoe_font_dir - ) - ) -} + # Try importing fonts + cli::cli_inform("Segoe UI not found in R fonts. Importing all system fonts...") + extrafont::font_import(prompt = FALSE) + extrafont::loadfonts(quiet = TRUE) -#' @rdname SegoeUI -#' @md -#' @title Segoe UI font name R variable aliases -#' @description `font_an` == "`Segoe UI`" -#' @format length 1 character vector -#' @export -font_se <- "Segoe UI" + # Check again for Segoe + fnt <- extrafont::fonttable() + if (any(grepl("Segoe UI", fnt$FamilyName))) { + cli::cli_inform(c("v" = "Segoe UI successfully imported.")) + } else { + cli::cli_inform(c("x" = "Segoe UI could not be imported from your system.")) + } +} diff --git a/R/tntp_style.R b/R/tntp_style.R index 8b9adf8..ac38da9 100644 --- a/R/tntp_style.R +++ b/R/tntp_style.R @@ -33,7 +33,7 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { if(!silent) { cli::cli_warn(c( "x" = "Family {.val {family}} is not registered in the font table.", - "v" = "Using standard {.val sans} font instead", + "v" = "Using default {.val {default_family}} font instead", "i" = "Run {.code extrafont::loadfonts()} to register non-core fonts (needs to be done once each session)", "i" = "If you've never imported your fonts before, run {.code extrafont::font_import()} first, then {.code extrafont::loadfonts()}" )) diff --git a/R/utils.R b/R/utils.R index 55fe648..125351e 100644 --- a/R/utils.R +++ b/R/utils.R @@ -24,11 +24,9 @@ utils::globalVariables(c("vec", "vec.factor", "n", "group.vec", "group.factor", fnt <- extrafont::fonttable() if (!any(grepl("Halyard Display", fnt$FamilyName))) { - packageStartupMessage("NOTE: The Halyard Display font is the default font for the tntp_style() theme.") - packageStartupMessage(" This font is not currently installed on your system. ") + packageStartupMessage("NOTE: The 'Halyard Display' font is the default font for the tntp_style() theme. This font is not currently installed on your system. ") packageStartupMessage("") - packageStartupMessage(" To install the Halyard Display fonts, follow the directions in the TNTP") - packageStartupMessage(" Visualization Cookbook at the following link:") + packageStartupMessage(" To install 'Halyard Display', follow the directions in the TNTP Visualization Cookbook at the following link:") packageStartupMessage("") packageStartupMessage(" https://tntp.github.io/tntpr/articles/visualization-cookbook.html#setting-font-family-and-font-sizes") } # nocov end diff --git a/README.md b/README.md index 528aa50..5e8506d 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,6 @@ Once installed, you load it like any other package. library(tntpr) ``` -To update `tntpr`, you’ll need to first unload it (or start a fresh R -session). You can then run the code above below. - -``` r -tntpr::update_tntpr() -``` - ## Feature Requests and Bug Reports Have a data problem you think `tntpr` could help with? Find a bug while diff --git a/cran-comments.md b/cran-comments.md index 858617d..c31fff6 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,5 @@ ## R CMD check results -0 errors | 0 warnings | 1 note +0 errors | 0 warnings | 0 notes * This is a new release. diff --git a/man/SegoeUI.Rd b/man/SegoeUI.Rd deleted file mode 100644 index a53f973..0000000 --- a/man/SegoeUI.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/theme_tntp_2018.R -\docType{data} -\name{font_se} -\alias{font_se} -\title{Segoe UI font name R variable aliases} -\format{ -length 1 character vector -} -\usage{ -font_se -} -\description{ -\code{font_an} == "\verb{Segoe UI}" -} -\keyword{datasets} diff --git a/man/import_segoe_ui.Rd b/man/import_segoe_ui.Rd index 4ae7324..91c6e65 100644 --- a/man/import_segoe_ui.Rd +++ b/man/import_segoe_ui.Rd @@ -6,15 +6,16 @@ \usage{ import_segoe_ui() } +\value{ +nothing +} \description{ -There is an option \code{tntpr.loadfonts} which -- if set to \code{TRUE} -- will -call \code{extrafont::loadfonts()} to register non-core fonts with R PDF & PostScript -devices. If you are running under Windows, the package calls the same function -to register non-core fonts with the Windows graphics device. +This function will check if Segoe UI is already accessible in R and if not +it will attempt to import it using the \code{extrafont} package +} +\examples{ +\dontrun{ +import_segoe_ui() } -\note{ -This will take care of ensuring PDF/PostScript usage. The location of the -font directory is displayed after the base import is complete. It is highly -recommended that you install them on your system the same way you would any -other font you wish to use in other programs. + } diff --git a/man/update_geom_font_defaults.Rd b/man/update_geom_font_defaults.Rd index 758bf65..9524279 100644 --- a/man/update_geom_font_defaults.Rd +++ b/man/update_geom_font_defaults.Rd @@ -14,6 +14,16 @@ update_geom_font_defaults( \arguments{ \item{family, face, size, color}{font family name, face, size and color} } +\value{ +nothing +} \description{ Updates [ggplot2::geom_label] and [ggplot2::geom_text] font defaults } +\examples{ +\dontrun{ +# Update text geoms to use Arial font +update_geom_font_defaults(family = 'Arial') +} + +} diff --git a/tntpr.Rproj b/tntpr.Rproj index ba381fb..ea83efd 100644 --- a/tntpr.Rproj +++ b/tntpr.Rproj @@ -18,3 +18,4 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace From 5ac65d66049e8a124ce67e69e50ab6184c8767dc Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Thu, 7 Mar 2024 15:31:28 -0500 Subject: [PATCH 02/10] Fixed Cran submission comments --- R/header_tntp.R | 7 +++---- R/knitr-utils.R | 16 ++++++++++------ R/palette_tntp.R | 22 +++++++--------------- R/setup_repo.R | 12 ++++-------- R/show_in_excel.R | 4 +--- R/theme_tntp.R | 1 + R/theme_tntp_2018.R | 20 +++++++------------- R/tntp_cred.R | 4 +--- R/tntp_style.R | 10 ++++------ R/update_tntpr.R | 4 +--- cran-comments.md | 20 ++++++++++++++++++-- man/colors_tntp.Rd | 3 +-- man/colors_tntp_likert.Rd | 3 +-- man/colors_tntp_likert_orange_to_green.Rd | 3 +-- man/colors_tntp_palette.Rd | 3 +-- man/figureN.Rd | 6 ++++-- man/header_tntp.Rd | 8 ++++---- man/import_segoe_ui.Rd | 5 ++--- man/palette_names.Rd | 3 +-- man/palette_tntp_scales.Rd | 5 ++--- man/scale_colour_tntp.Rd | 2 -- man/set_data_memo_formatting.Rd | 5 +++-- man/setup_repo.Rd | 4 ++-- man/setup_subdirectory.Rd | 6 ++++-- man/show_in_excel.Rd | 5 ++--- man/tableN.Rd | 6 ++++-- man/theme_tntp.Rd | 3 +++ man/theme_tntp_2018.Rd | 12 +++++------- man/tntp_cred.Rd | 5 ++--- man/tntp_style.Rd | 9 +++------ man/update_geom_font_defaults.Rd | 5 ++--- man/update_tntpr.Rd | 5 ++--- tests/testthat/Rplots.pdf | Bin 0 -> 7166 bytes 33 files changed, 106 insertions(+), 120 deletions(-) create mode 100644 tests/testthat/Rplots.pdf diff --git a/R/header_tntp.R b/R/header_tntp.R index 5a01678..a2cd8ca 100644 --- a/R/header_tntp.R +++ b/R/header_tntp.R @@ -1,13 +1,12 @@ #' Insert header_script_tntp. #' -#' Call this function inside a .R file to insert the standard TNTP header. +#' Call this function from inside a .R file in RStudio to insert the standard +#' TNTP header into your active script. #' #' @export #' @returns nothing -#' @examples -#' \dontrun{ +#' @examplesIf rstudioapi::isAvailable() #' header_tntp() -#' } #' header_tntp <- function() { rstudioapi::insertText("# TITLE: [enter] diff --git a/R/knitr-utils.R b/R/knitr-utils.R index 16b2ef6..2120b9c 100644 --- a/R/knitr-utils.R +++ b/R/knitr-utils.R @@ -6,8 +6,8 @@ #' #' @returns nothing #' @export -#' @examples -#' # not run: set_data_memo_formatting() +#' @examplesIf interactive() +#' set_data_memo_formatting() #' set_data_memo_formatting <- function() { # set knitr options @@ -25,10 +25,12 @@ set_data_memo_formatting <- function() { #' Create sequential figure numbers #' #' @param x character string description of the figure -#' @returns nothing +#' @returns An atomic character vector prepended with a Figure number #' @export #' @examples -#' # not run, in RMarkdown doc: `r figureN("Distribution of cars by cylinder count")` +#' +#' figureN("Distribution of cars by cylinder count") +#' # Inline RMarkdown code: `r figureN("Distribution of cars by cylinder count")` #' #' # figureN <- local({ @@ -47,10 +49,12 @@ figureN <- local({ #' #' @param x character string description of the figure #' -#' @returns nothing +#' @returns An atomic character vector prepended with a Table number #' @export #' @examples -#' # not run, in RMarkdown doc: `r tableN("Distribution of cars by cylinder count")` +#' +#' tableN("Distribution of cars by cylinder count") +#' # Inline RMarkdown code: `r tableN("Distribution of cars by cylinder count")` tableN <- local({ i <- 0 function(x) { diff --git a/R/palette_tntp.R b/R/palette_tntp.R index 23dbdec..97c076a 100644 --- a/R/palette_tntp.R +++ b/R/palette_tntp.R @@ -60,9 +60,8 @@ palette_tntp <- function(...) { #' @md #' #' @examples -#' \dontrun{ #' tntp_colors() -#' } +#' #' @export "colors_tntp" colors_tntp <- c( # TNTPPalette @@ -112,9 +111,8 @@ colors_tntp <- c( # TNTPPalette #' #' @md #' @examples -#' \dontrun{ #' tntp_colors() -#' } +#' #' @export "colors_tntp_palette" colors_tntp_palette <- @@ -144,9 +142,8 @@ colors_tntp_palette <- #' #' @md #' @examples -#' \dontrun{ #' tntp_palette('likert_6') -#' } +#' #' @export "colors_tntp_likert" colors_tntp_likert <- @@ -167,9 +164,8 @@ colors_tntp_likert <- #' #' @md #' @examples -#' \dontrun{ #' tntp_palette('bg_6') -#' } +#' #' @export "colors_tntp_likert_orange_to_green" colors_tntp_likert_orange_to_green <- @@ -191,9 +187,8 @@ colors_tntp_likert_orange_to_green <- #' #' @md #' @examples -#' \dontrun{ #' show_tntp_palette() -#' } +#' #' @export "palette_names" palette_names <- c( @@ -216,9 +211,8 @@ palette_names <- c( #' #' @returns a character vector #' @examples -#' \dontrun{ -#' colors <- palette_tntp_scales('likert_5pt') -#' } +#' colors <- tntp_palette("likert_5") +#' #' @export #' palette_tntp_scales <- function(palette = palette_names) { @@ -257,7 +251,6 @@ palette_tntp_scales <- function(palette = palette_names) { #' @returns a ggplot Scale object #' #' @examples -#' \dontrun{ #' library(ggplot2) #' library(dplyr) #' @@ -268,7 +261,6 @@ palette_tntp_scales <- function(palette = palette_names) { #' ggplot(x, aes(x = cyl, y = n, fill = am)) + # you need a fill aesthetic #' geom_col() + #' scale_fill_manual(values = tntp_palette()) -#' } #' scale_colour_tntp <- function(palette = palette_names, ...) { diff --git a/R/setup_repo.R b/R/setup_repo.R index 32d87ea..4aa9423 100644 --- a/R/setup_repo.R +++ b/R/setup_repo.R @@ -19,14 +19,12 @@ #' #' @export #' @returns nothing -#' @examples +#' @examplesIf interactive() #' # After the user has created a repository "Anywhere City" and set their working #' # directory to that folder: -#' \dontrun{ #' setup_repo("ela_access", #' proj_name = "Access to Grade-Level ELA Content", #' analyst_name = "Dustin Pashouwer and Sam Firke") -#' } setup_repo <- function(subfolder, proj_name, analyst_name) { if (missing(subfolder)) { stop("Specify the subfolder name of the project within this repo you'll be working on") @@ -92,14 +90,12 @@ setup_repo <- function(subfolder, proj_name, analyst_name) { #' @export #' @returns nothing -#' @examples +#' @examplesIf interactive() #' # When there's already a repository "Anywhere City" with an RProject and a .gitignore #' # and a new project analysis subfolder is needed within that repo: -#' \dontrun{ #' setup_subdirectory("ela_access", -# proj_name = "Equitable Access to Grade-Level ELA", -# analyst_name = "Dustin Pashouwer and Sam Firke") -#' } +#' proj_name = "Equitable Access to Grade-Level ELA", +#' analyst_name = "Dustin Pashouwer and Sam Firke") setup_subdirectory <- function(subfolder, proj_name, analyst_name) { if (missing(proj_name)) { diff --git a/R/show_in_excel.R b/R/show_in_excel.R index 57c7407..545b287 100644 --- a/R/show_in_excel.R +++ b/R/show_in_excel.R @@ -4,11 +4,9 @@ #' #' @export #' @returns nothing -#' @examples -#' \dontrun{ +#' @examplesIf interactive() #' # View a data set in excel #' mtcars |> show_in_excel() -#' } #' #' show_in_excel <- function(.data) { diff --git a/R/theme_tntp.R b/R/theme_tntp.R index 99cab58..fe50f96 100644 --- a/R/theme_tntp.R +++ b/R/theme_tntp.R @@ -22,6 +22,7 @@ #' @importFrom ggplot2 %+replace% #' @export #' @rdname theme_tntp +#' @returns a ggplot theme object. theme_tntp <- function(show_legend_title = TRUE, base_size = 12, diff --git a/R/theme_tntp_2018.R b/R/theme_tntp_2018.R index 9e69fa2..aa0217b 100644 --- a/R/theme_tntp_2018.R +++ b/R/theme_tntp_2018.R @@ -38,7 +38,8 @@ #' @param axis add x or y axes? `TRUE`, `FALSE`, "`xy`" #' @param ticks ticks if `TRUE` add ticks #' @export -#' @examples \dontrun{ +#' @returns a ggplot theme object. +#' @examples #' library(ggplot2) #' library(dplyr) #' @@ -51,12 +52,9 @@ #' subtitle = "A plot that is only useful for demonstration purposes", #' caption = "Brought to you by the letter 'g'" #' ) + -#' theme_ipsum() +#' tntp_style(family = 'sans') #' #' # seminal bar chart -#' -#' update_geom_font_defaults() -#' #' count(mpg, class) %>% #' ggplot(aes(class, n)) + #' geom_col() + @@ -67,9 +65,9 @@ #' subtitle = "A plot that is only useful for demonstration purposes", #' caption = "Brought to you by the letter 'g'" #' ) + -#' theme_ipsum(grid = "Y") + +#' tntp_style(family = 'sans') + #' theme(axis.text.y = element_blank()) -#' } + theme_tntp_2018 <- function(base_family = "Segoe UI", base_size = 11.5, plot_title_family = base_family, plot_title_size = 18, plot_title_face = "bold", plot_title_margin = 10, @@ -221,11 +219,9 @@ theme_tntp_2018 <- function(base_family = "Segoe UI", base_size = 11.5, #' @param family,face,size,color font family name, face, size and color #' @export #' @returns nothing -#' @examples -#' \dontrun{ +#' @examplesIf interactive() #' # Update text geoms to use Arial font #' update_geom_font_defaults(family = 'Arial') -#' } #' update_geom_font_defaults <- function(family = "Segoe UI", face = "plain", size = 3.5, color = "#2b2b2b") { @@ -241,10 +237,8 @@ update_geom_font_defaults <- function(family = "Segoe UI", face = "plain", size #' @md #' @export #' @returns nothing -#' @examples -#' \dontrun{ +#' @examplesIf interactive() #' import_segoe_ui() -#' } #' import_segoe_ui <- function() { diff --git a/R/tntp_cred.R b/R/tntp_cred.R index d36275e..b2521fd 100644 --- a/R/tntp_cred.R +++ b/R/tntp_cred.R @@ -26,8 +26,7 @@ #' * `tntp_cred_list()` returns a 2-column data frame of services and usernames #' @export #' -#' @examples -#' \dontrun{ +#' @examplesIf interactive() && rlang::is_installed("qualtRics") #' # Using tntp_cred() with qualtRics #' library(qualtRics) #' @@ -38,7 +37,6 @@ #' #' # To overwrite your Qualtrics credential #' tntp_cred("QUALTRICS_TOKEN", .set = TRUE) -#' } #' tntp_cred <- function(service, username = NULL, keyring = NULL, prompt = NULL) { diff --git a/R/tntp_style.R b/R/tntp_style.R index ac38da9..a263e86 100644 --- a/R/tntp_style.R +++ b/R/tntp_style.R @@ -66,8 +66,7 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { #' @export #' @returns a ggplot theme object. #' -#' @examples \dontrun{ -#' library(tntpr) +#' @examples #' library(dplyr) #' library(ggplot2) #' @@ -82,7 +81,7 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { #' x = "Years of Experience", #' caption = "Data from the Fake County Data Set" #' ) + -#' tntp_style(show_axis_titles = "x") +#' tntp_style(family = 'sans', show_axis_titles = "x") #' #' frpl_experience <- fake_county |> #' mutate(frpl_bucket = cut(sch_frpl_pct, @@ -104,8 +103,7 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { #' )) + #' geom_text(aes(label = label), #' nudge_y = -0.25, vjust = 1, -#' color = "white", size = 5, lineheight = 1, -#' family = "Segoe UI" +#' color = "white", size = 5, lineheight = 1 #' ) + #' labs( #' title = "High Poverty Schools have Less Experienced Teachers", @@ -113,10 +111,10 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { #' ) + #' scale_y_continuous(breaks = seq(0, 20, 4)) + #' tntp_style( +#' family = 'sans', #' base_size = 20, #' show_axis_titles = "x" #' ) -#' } #' tntp_style <- function(family = "Halyard Display", header_family = family, diff --git a/R/update_tntpr.R b/R/update_tntpr.R index 9ac7b0a..a044c61 100644 --- a/R/update_tntpr.R +++ b/R/update_tntpr.R @@ -1,11 +1,9 @@ #' @title Re-install the tntpr package from GitHub. #' @export #' @returns nothing -#' @examples -#' \dontrun{ +#' @examplesIf interactive() #' # Run without loading tntpr first #' tntpr::update_tntpr() -#' } #' update_tntpr <- function() { diff --git a/cran-comments.md b/cran-comments.md index c31fff6..8de791e 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,21 @@ +## Resubmission + +This is a resubmission. In this version I have: + +* Clarified "TNTP" in the CMD check comments below +* Added documentatoin of values to theme_tntp.Rd and theme_tntp_2018.Rd +* Removed \dontrun{} tags from all examples +* Fixed the error in setup_subdirectory.Rd example code + +A comment on the original submission said: + +*"If there are references describing the methods in your package, please add these in the description field of your DESCRIPTION file in the form authors (year) authors (year) authors (year, ISBN:...) or if those are not available: <[https:...]https:...> with no space after 'doi:', 'arXiv:', 'https:' and angle brackets for auto-linking. (If you want to add a title as well please put it in quotes: "Title")"* + +This package doesn't reference academic publications, so there are no references to document. + ## R CMD check results -0 errors | 0 warnings | 0 notes +0 errors | 0 warnings | 1 notes -* This is a new release. +* Note: the word "TNTP" in README.md is the name of an organization, not an acronym or mis-spelled word. +* This is a new release. diff --git a/man/colors_tntp.Rd b/man/colors_tntp.Rd index bcc4823..79345e8 100644 --- a/man/colors_tntp.Rd +++ b/man/colors_tntp.Rd @@ -15,8 +15,7 @@ This list of colors has been superseded by the new brand colors and the new function \code{\link[=tntp_colors]{tntp_colors()}}. } \examples{ -\dontrun{ tntp_colors() -} + } \keyword{datasets} diff --git a/man/colors_tntp_likert.Rd b/man/colors_tntp_likert.Rd index e19bf50..3205c62 100644 --- a/man/colors_tntp_likert.Rd +++ b/man/colors_tntp_likert.Rd @@ -15,8 +15,7 @@ This likert palette has been superseded by the new brand colors and the new function \code{\link[=tntp_palette]{tntp_palette()}}. } \examples{ -\dontrun{ tntp_palette('likert_6') -} + } \keyword{datasets} diff --git a/man/colors_tntp_likert_orange_to_green.Rd b/man/colors_tntp_likert_orange_to_green.Rd index 870b0ca..e6e8565 100644 --- a/man/colors_tntp_likert_orange_to_green.Rd +++ b/man/colors_tntp_likert_orange_to_green.Rd @@ -15,8 +15,7 @@ This likert palette has been superseded by the new brand colors and the new functions \code{\link[=tntp_colors]{tntp_colors()}} and \code{\link[=tntp_palette]{tntp_palette()}}. } \examples{ -\dontrun{ tntp_palette('bg_6') -} + } \keyword{datasets} diff --git a/man/colors_tntp_palette.Rd b/man/colors_tntp_palette.Rd index 070a527..01663c2 100644 --- a/man/colors_tntp_palette.Rd +++ b/man/colors_tntp_palette.Rd @@ -15,8 +15,7 @@ This list of colors has been superseded by the new brand colors and the new function \code{\link[=tntp_colors]{tntp_colors()}}. } \examples{ -\dontrun{ tntp_colors() -} + } \keyword{datasets} diff --git a/man/figureN.Rd b/man/figureN.Rd index 0dd9d3b..8851115 100644 --- a/man/figureN.Rd +++ b/man/figureN.Rd @@ -10,13 +10,15 @@ figureN(x) \item{x}{character string description of the figure} } \value{ -nothing +An atomic character vector prepended with a Figure number } \description{ Create sequential figure numbers } \examples{ -# not run, in RMarkdown doc: `r figureN("Distribution of cars by cylinder count")` + +figureN("Distribution of cars by cylinder count") +# Inline RMarkdown code: `r figureN("Distribution of cars by cylinder count")` # } diff --git a/man/header_tntp.Rd b/man/header_tntp.Rd index 6874b0f..8cff7a9 100644 --- a/man/header_tntp.Rd +++ b/man/header_tntp.Rd @@ -10,11 +10,11 @@ header_tntp() nothing } \description{ -Call this function inside a .R file to insert the standard TNTP header. +Call this function from inside a .R file in RStudio to insert the standard +TNTP header into your active script. } \examples{ -\dontrun{ +\dontshow{if (rstudioapi::isAvailable()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} header_tntp() -} - +\dontshow{\}) # examplesIf} } diff --git a/man/import_segoe_ui.Rd b/man/import_segoe_ui.Rd index 91c6e65..82327ee 100644 --- a/man/import_segoe_ui.Rd +++ b/man/import_segoe_ui.Rd @@ -14,8 +14,7 @@ This function will check if Segoe UI is already accessible in R and if not it will attempt to import it using the \code{extrafont} package } \examples{ -\dontrun{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} import_segoe_ui() -} - +\dontshow{\}) # examplesIf} } diff --git a/man/palette_names.Rd b/man/palette_names.Rd index 4f29a73..ec0dc90 100644 --- a/man/palette_names.Rd +++ b/man/palette_names.Rd @@ -16,8 +16,7 @@ new functions \code{\link[=tntp_colors]{tntp_colors()}} and \code{\link[=tntp_pa brand palettes, use \code{\link[=show_tntp_palette]{show_tntp_palette()}}. } \examples{ -\dontrun{ show_tntp_palette() -} + } \keyword{datasets} diff --git a/man/palette_tntp_scales.Rd b/man/palette_tntp_scales.Rd index 4f81768..0acf5f8 100644 --- a/man/palette_tntp_scales.Rd +++ b/man/palette_tntp_scales.Rd @@ -17,7 +17,6 @@ This function has been superseded by \code{\link[=tntp_palette]{tntp_palette()}} brand colors. } \examples{ -\dontrun{ -colors <- palette_tntp_scales('likert_5pt') -} +colors <- tntp_palette("likert_5") + } diff --git a/man/scale_colour_tntp.Rd b/man/scale_colour_tntp.Rd index 49e4b37..98f1bde 100644 --- a/man/scale_colour_tntp.Rd +++ b/man/scale_colour_tntp.Rd @@ -26,7 +26,6 @@ These functions are deprecated. Please use \code{scale_fill_manual(values = tntp_palette(palette_name))} instead. } \examples{ -\dontrun{ library(ggplot2) library(dplyr) @@ -37,6 +36,5 @@ x <- mtcars \%>\% ggplot(x, aes(x = cyl, y = n, fill = am)) + # you need a fill aesthetic geom_col() + scale_fill_manual(values = tntp_palette()) -} } diff --git a/man/set_data_memo_formatting.Rd b/man/set_data_memo_formatting.Rd index 0fadf78..ce44a0e 100644 --- a/man/set_data_memo_formatting.Rd +++ b/man/set_data_memo_formatting.Rd @@ -14,6 +14,7 @@ internal function that calls standard formatting options for the Data Memo RMark moved here to keep the actual memo template cleaner and easier to use } \examples{ -# not run: set_data_memo_formatting() - +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +set_data_memo_formatting() +\dontshow{\}) # examplesIf} } diff --git a/man/setup_repo.Rd b/man/setup_repo.Rd index d747628..3e20532 100644 --- a/man/setup_repo.Rd +++ b/man/setup_repo.Rd @@ -31,11 +31,11 @@ that project and the analyst(s) working on it. These latter two values are used to create a README.Md file. } \examples{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # After the user has created a repository "Anywhere City" and set their working # directory to that folder: -\dontrun{ setup_repo("ela_access", proj_name = "Access to Grade-Level ELA Content", analyst_name = "Dustin Pashouwer and Sam Firke") -} +\dontshow{\}) # examplesIf} } diff --git a/man/setup_subdirectory.Rd b/man/setup_subdirectory.Rd index 1fb651c..7881b98 100644 --- a/man/setup_subdirectory.Rd +++ b/man/setup_subdirectory.Rd @@ -34,9 +34,11 @@ and create the RProject and .gitignore files. Add subsequent analysis project f with this function. } \examples{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # When there's already a repository "Anywhere City" with an RProject and a .gitignore # and a new project analysis subfolder is needed within that repo: -\dontrun{ setup_subdirectory("ela_access", -} + proj_name = "Equitable Access to Grade-Level ELA", + analyst_name = "Dustin Pashouwer and Sam Firke") +\dontshow{\}) # examplesIf} } diff --git a/man/show_in_excel.Rd b/man/show_in_excel.Rd index b670f2f..bf1240c 100644 --- a/man/show_in_excel.Rd +++ b/man/show_in_excel.Rd @@ -16,10 +16,9 @@ nothing Write Dataframe to a temp excel file and open it. } \examples{ -\dontrun{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # View a data set in excel mtcars |> show_in_excel() -} - +\dontshow{\}) # examplesIf} } diff --git a/man/tableN.Rd b/man/tableN.Rd index baba8a2..a6e91f1 100644 --- a/man/tableN.Rd +++ b/man/tableN.Rd @@ -10,11 +10,13 @@ tableN(x) \item{x}{character string description of the figure} } \value{ -nothing +An atomic character vector prepended with a Table number } \description{ Create sequential table numbers } \examples{ -# not run, in RMarkdown doc: `r tableN("Distribution of cars by cylinder count")` + +tableN("Distribution of cars by cylinder count") +# Inline RMarkdown code: `r tableN("Distribution of cars by cylinder count")` } diff --git a/man/theme_tntp.Rd b/man/theme_tntp.Rd index fee3b90..39c3b8a 100644 --- a/man/theme_tntp.Rd +++ b/man/theme_tntp.Rd @@ -47,6 +47,9 @@ theme_tntp( \item{caption_size}{size of caption text} } +\value{ +a ggplot theme object. +} \description{ This theme is superseded by [tntp_style()]. Ggplot2 theme customized for TNTP aesthetics } diff --git a/man/theme_tntp_2018.Rd b/man/theme_tntp_2018.Rd index 793d244..3ab10d6 100644 --- a/man/theme_tntp_2018.Rd +++ b/man/theme_tntp_2018.Rd @@ -67,6 +67,9 @@ theme_tntp_2018( \item{ticks}{ticks if \code{TRUE} add ticks} } +\value{ +a ggplot theme object. +} \description{ This theme is superseded by \code{\link[=tntp_style]{tntp_style()}}. } @@ -92,7 +95,6 @@ to register non-core fonts with the Windows graphics device. } \examples{ -\dontrun{ library(ggplot2) library(dplyr) @@ -105,12 +107,9 @@ ggplot(mtcars, aes(mpg, wt)) + subtitle = "A plot that is only useful for demonstration purposes", caption = "Brought to you by the letter 'g'" ) + - theme_ipsum() + tntp_style(family = 'sans') # seminal bar chart - -update_geom_font_defaults() - count(mpg, class) \%>\% ggplot(aes(class, n)) + geom_col() + @@ -121,7 +120,6 @@ count(mpg, class) \%>\% subtitle = "A plot that is only useful for demonstration purposes", caption = "Brought to you by the letter 'g'" ) + - theme_ipsum(grid = "Y") + + tntp_style(family = 'sans') + theme(axis.text.y = element_blank()) } -} diff --git a/man/tntp_cred.Rd b/man/tntp_cred.Rd index 27f7aa2..d601348 100644 --- a/man/tntp_cred.Rd +++ b/man/tntp_cred.Rd @@ -49,7 +49,7 @@ overwriting any current credentials. and username. } \examples{ -\dontrun{ +\dontshow{if (interactive() && rlang::is_installed("qualtRics")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Using tntp_cred() with qualtRics library(qualtRics) @@ -60,6 +60,5 @@ qualtrics_api_credentials(api_key = qualtrics_token, # To overwrite your Qualtrics credential tntp_cred("QUALTRICS_TOKEN", .set = TRUE) -} - +\dontshow{\}) # examplesIf} } diff --git a/man/tntp_style.Rd b/man/tntp_style.Rd index 21bd3cb..9dfc15e 100644 --- a/man/tntp_style.Rd +++ b/man/tntp_style.Rd @@ -47,8 +47,6 @@ a ggplot theme object. A custom theme including TNTP fonts and other defaults for styling ggplot2 charts. } \examples{ -\dontrun{ -library(tntpr) library(dplyr) library(ggplot2) @@ -63,7 +61,7 @@ fake_county |> x = "Years of Experience", caption = "Data from the Fake County Data Set" ) + - tntp_style(show_axis_titles = "x") + tntp_style(family = 'sans', show_axis_titles = "x") frpl_experience <- fake_county |> mutate(frpl_bucket = cut(sch_frpl_pct, @@ -85,8 +83,7 @@ frpl_experience |> )) + geom_text(aes(label = label), nudge_y = -0.25, vjust = 1, - color = "white", size = 5, lineheight = 1, - family = "Segoe UI" + color = "white", size = 5, lineheight = 1 ) + labs( title = "High Poverty Schools have Less Experienced Teachers", @@ -94,9 +91,9 @@ frpl_experience |> ) + scale_y_continuous(breaks = seq(0, 20, 4)) + tntp_style( + family = 'sans', base_size = 20, show_axis_titles = "x" ) -} } diff --git a/man/update_geom_font_defaults.Rd b/man/update_geom_font_defaults.Rd index 9524279..1ceab9e 100644 --- a/man/update_geom_font_defaults.Rd +++ b/man/update_geom_font_defaults.Rd @@ -21,9 +21,8 @@ nothing Updates [ggplot2::geom_label] and [ggplot2::geom_text] font defaults } \examples{ -\dontrun{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Update text geoms to use Arial font update_geom_font_defaults(family = 'Arial') -} - +\dontshow{\}) # examplesIf} } diff --git a/man/update_tntpr.Rd b/man/update_tntpr.Rd index 4ebca89..90ccb76 100644 --- a/man/update_tntpr.Rd +++ b/man/update_tntpr.Rd @@ -13,9 +13,8 @@ nothing Re-install the tntpr package from GitHub. } \examples{ -\dontrun{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # Run without loading tntpr first tntpr::update_tntpr() -} - +\dontshow{\}) # examplesIf} } diff --git a/tests/testthat/Rplots.pdf b/tests/testthat/Rplots.pdf new file mode 100644 index 0000000000000000000000000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rObQzB<>gTTi+ZE0q@Yc{irJWm7s_oowVGCOn!vPoQ9?TcT%HyC=gXX}4cAjsG0_j@rPD@1B~nme|=md8;4b zHYd35^s_$2gF(1uK~89lyBomzZ*7`imGtj2_mAa& z)!86J_dB>>ZJTouf-iRAPWb87H|MdXGL`8)~0d|1DG${U<=MMn$mj)5T!^XdB!s1|jS^iH=0$)G>Bg!1;eR0Dugz*mGd|6K~vba97-~8x(^ Date: Thu, 7 Mar 2024 15:52:47 -0500 Subject: [PATCH 03/10] Bumped version number --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 72d74b2..4285a3f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: tntpr Title: Data Analysis Tools Customized for TNTP -Version: 1.0.0 +Version: 1.0.1 Author: Sam Firke [aut, cre], Jake Russ [aut, cre], Alex Spurrier [ctb], Dustin Pashouwer [ctb], Kate Mullan [ctb], Shane Orr [ctb], Sam Talcott [ctb] Maintainer: Dustin Pashouwer From b4ce9f6024f39732eb630d7853455b4e6aa41b77 Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Fri, 8 Mar 2024 12:42:57 -0500 Subject: [PATCH 04/10] Fixed setup_repo and Setup_subdirectory --- R/setup_repo.R | 123 +++++++++++++++++++++++--------------- cran-comments.md | 5 +- man/setup_repo.Rd | 16 ++--- man/setup_subdirectory.Rd | 16 ++--- 4 files changed, 94 insertions(+), 66 deletions(-) diff --git a/R/setup_repo.R b/R/setup_repo.R index 4aa9423..cee9837 100644 --- a/R/setup_repo.R +++ b/R/setup_repo.R @@ -9,6 +9,7 @@ #' that project and the analyst(s) working on it. These latter two values are #' used to create a README.Md file. #' +#' @param project_path the path to the main project directory. To use the current project, use `project_path = here::here()`. #' @param subfolder a character vector containing the concise name of a project subfolder. #' E.g., if the repository is the name of a city "Anywhere City", a project subfolder might be #' "ela_access" or "aps_talent_landscape"). @@ -19,23 +20,32 @@ #' #' @export #' @returns nothing -#' @examplesIf interactive() -#' # After the user has created a repository "Anywhere City" and set their working -#' # directory to that folder: -#' setup_repo("ela_access", -#' proj_name = "Access to Grade-Level ELA Content", -#' analyst_name = "Dustin Pashouwer and Sam Firke") -setup_repo <- function(subfolder, proj_name, analyst_name) { +#' @examples +#' # Setting up in a temporary directory +#' setup_repo(project_path = tempdir(), +#' subfolder = "ela_access", +#' proj_name = "Access to Grade-Level ELA Content", +#' analyst_name = "Dustin Pashouwer and Sam Firke") +setup_repo <- function(project_path, subfolder, proj_name, analyst_name) { + if (missing(project_path)) { + cli::cli_abort("Required argument {.var project_path} is missing. For your current project, run with {.code project_path = here::here()}.") + } + if (!dir.exists(project_path)) { + cli::cli_abort("Path {.val {project_path}} is not a valid directory.") + } if (missing(subfolder)) { - stop("Specify the subfolder name of the project within this repo you'll be working on") + cli::cli_abort("Required argument {.var subfolder} is missing. Please provide a name for your subfolder.") } if (missing(proj_name)) { - stop("Specify the full name of the subfolder project as it should appear in the README") + cli::cli_abort("Required argument {.var proj_name} is missing. Please provide a full name for the subfolder project as it should appear in the README.") } if (missing(analyst_name)) { - stop("Specify the analyst(s) working on this subfolder project") + cli::cli_abort("Required argument {.var analyst_name} is missing. Please specify the analyst(s) working on this subfolder project.") } + # Fixes issues with ~ leading to different paths in different functions + project_path <- normalizePath(project_path) + # Files for git to ignore to_ignore <- c( ".Rhistory", ".RData", ".Rproj.user" # set RStudio to not store .Rhistory @@ -45,22 +55,27 @@ setup_repo <- function(subfolder, proj_name, analyst_name) { # Create project using the current working directory # If no .Rproj is returned (may see a .here file) then ensure # RStudio is available - usethis::create_project(path = getwd()) - unlink("R", recursive = TRUE) # create_project created "R" folder, we don't want - usethis::use_git_ignore(ignores = to_ignore) + usethis::create_project(path = normalizePath(project_path)) + unlink(file.path(project_path, "R"), recursive = TRUE) # create_project created "R" folder, we don't want + usethis::with_project( + project_path, + usethis::use_git_ignore(ignores = to_ignore), + quiet = TRUE + ) # Create subfolder - invisible(lapply(subfolder, setup_subdirectory, proj_name, analyst_name)) + invisible(lapply(subfolder, \(subfolder) setup_subdirectory(project_path, subfolder, proj_name, analyst_name))) + # Create main repo readme - if (!any(grepl("README.Md", list.files(), ignore.case = TRUE))) { - writeLines(create_repo_readme(proj_name, analyst_name), "README.Md") + if (!any(grepl("README.Md", list.files(project_path), ignore.case = TRUE))) { + writeLines(create_repo_readme(project_path, proj_name, analyst_name), file.path(project_path, "README.Md")) } else { overwrite_repo_readme <- utils::menu(c("Keep current README.Md", "Replace with template README.Md"), title = "This repository already contains a file README.Md. Do you wish to replace with the tntpr template README file?" ) if (overwrite_repo_readme == 2) { - writeLines(create_repo_readme(proj_name, analyst_name), "README.Md") + writeLines(create_repo_readme(project_path, proj_name, analyst_name), file.path(project_path, "README.Md")) } } } @@ -80,6 +95,7 @@ setup_repo <- function(subfolder, proj_name, analyst_name) { #' and create the RProject and .gitignore files. Add subsequent analysis project folders #' with this function. #' +#' @param project_path the path to the main project directory. To use the current project, use `project_path = here::here()`. #' @param subfolder a character vector containing the concise name of a project subfolder. #' E.g., if the repository is the name of a city "Anywhere City", a project subfolder might be #' "ela_access" or "aps_talent_landscape"). @@ -90,70 +106,81 @@ setup_repo <- function(subfolder, proj_name, analyst_name) { #' @export #' @returns nothing -#' @examplesIf interactive() -#' # When there's already a repository "Anywhere City" with an RProject and a .gitignore -#' # and a new project analysis subfolder is needed within that repo: -#' setup_subdirectory("ela_access", -#' proj_name = "Equitable Access to Grade-Level ELA", -#' analyst_name = "Dustin Pashouwer and Sam Firke") - -setup_subdirectory <- function(subfolder, proj_name, analyst_name) { +#' @examples +#' # Setting up in a temporary directory +#' setup_subdirectory(tempdir(), +#' subfolder = "ela_access", +#' proj_name = "Equitable Access to Grade-Level ELA", +#' analyst_name = "Dustin Pashouwer and Sam Firke") + +setup_subdirectory <- function(project_path, subfolder, proj_name, analyst_name) { + if (missing(project_path)) { + cli::cli_abort("Required argument {.var project_path} is missing. For your current project, run with {.code project_path = here::here()}.") + } + if (!dir.exists(project_path)) { + cli::cli_abort("Path {.val {project_path}} is not a valid directory.") + } + if (missing(subfolder)) { + cli::cli_abort("Required argument {.var subfolder} is missing. Please provide a name for your subfolder.") + } if (missing(proj_name)) { - stop("Specify the full name of the subfolder project as it should appear in the README") + cli::cli_abort("Required argument {.var proj_name} is missing. Please provide a full name for the subfolder project as it should appear in the README.") } if (missing(analyst_name)) { - stop("Specify the analyst(s) working on this subfolder project") + cli::cli_abort("Required argument {.var analyst_name} is missing. Please specify the analyst(s) working on this subfolder project.") } + # Fixes issues with ~ leading to different paths in different functions + project_path <- normalizePath(project_path) + # Check if project exists in main directory, if not create it - existing_files <- list.files(all.files = TRUE) + existing_files <- list.files(path = project_path, all.files = TRUE) if (!any(grepl(".Rproj$", existing_files))) { - usethis::create_project(path = getwd()) - unlink("R", recursive = TRUE) # create_project created "R" folder, we don't want + usethis::create_project(path = project_path) + unlink(file.path(project_path, "R"), recursive = TRUE) # create_project created "R" folder, we don't want } if (!any(grepl(".gitignore", existing_files))) { to_ignore <- c( ".Rhistory", ".RData", ".Rproj.user", "~$*" # set RStudio to not store .Rhistory # and .RData ... but just in case someone didn't ) - usethis::use_git_ignore(ignores = to_ignore) + usethis::with_project( + project_path, + usethis::use_git_ignore(ignores = to_ignore) + ) } # Create project directories - dirs_to_make <- paste( + dirs_to_make <- file.path( subfolder, - c( - "data", + c("data", "data/raw", "data/clean", "code", "code/prep", # these scripts should read from the data/raw directory "code/analysis", # these scripts should read from the data/clean directory - "output" - ), # Reports, with figures etc. in subdirectories as needed - sep = "/" - ) - invisible(lapply(dirs_to_make, usethis::use_directory)) + "output")) # Reports, with figures etc. in subdirectories as needed + invisible(lapply(dirs_to_make, \(dir) { + usethis::with_project(project_path, + usethis::use_directory(dir), + quiet = TRUE) + })) # Create subfolder readme - if (!any(grepl("README.Md", list.files(subfolder), ignore.case = TRUE))) { + if (!any(grepl("README.Md", list.files(file.path(project_path, subfolder)), ignore.case = TRUE))) { writeLines( create_subfolder_readme(proj_name, analyst_name), - paste0(subfolder, "/README.Md") + file.path(project_path, subfolder, "README.Md") ) } else { - warning(paste0( - "README.Md already exists in subdirectory ", - subfolder, - "; no new README.Md created" - )) + cli::cli_warn("{.val README.Md} already exists in subdirectory {.val {subfolder}}; no new {.val README.Md} created.") } } # Create the vector of info to generate a standard README.Md main repo template -create_repo_readme <- function(proj_name, analyst) { - repo_dir <- getwd() +create_repo_readme <- function(project_path, proj_name, analyst) { + repo_dir <- project_path repo_dir <- stringr::str_split(repo_dir, "/") repo_dir <- dplyr::last(repo_dir[[1]]) diff --git a/cran-comments.md b/cran-comments.md index 8de791e..cb93721 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,10 +2,11 @@ This is a resubmission. In this version I have: -* Clarified "TNTP" in the CMD check comments below -* Added documentatoin of values to theme_tntp.Rd and theme_tntp_2018.Rd +* Clarified "TNTP" in the R CMD check comments below +* Added documentation of values to theme_tntp.Rd and theme_tntp_2018.Rd * Removed \dontrun{} tags from all examples * Fixed the error in setup_subdirectory.Rd example code +* Adjusted the code for setup_repo() and setup_subdirectory() so they no longer include a default path of getwd() A comment on the original submission said: diff --git a/man/setup_repo.Rd b/man/setup_repo.Rd index 3e20532..343bed9 100644 --- a/man/setup_repo.Rd +++ b/man/setup_repo.Rd @@ -4,9 +4,11 @@ \alias{setup_repo} \title{Initialize a new repository, and a single subfolder, TNTP style.} \usage{ -setup_repo(subfolder, proj_name, analyst_name) +setup_repo(project_path, subfolder, proj_name, analyst_name) } \arguments{ +\item{project_path}{the path to the main project directory. To use the current project, use `project_path = here::here()`.} + \item{subfolder}{a character vector containing the concise name of a project subfolder. E.g., if the repository is the name of a city "Anywhere City", a project subfolder might be "ela_access" or "aps_talent_landscape").} @@ -31,11 +33,9 @@ that project and the analyst(s) working on it. These latter two values are used to create a README.Md file. } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -# After the user has created a repository "Anywhere City" and set their working -# directory to that folder: -setup_repo("ela_access", - proj_name = "Access to Grade-Level ELA Content", - analyst_name = "Dustin Pashouwer and Sam Firke") -\dontshow{\}) # examplesIf} +# Setting up in a temporary directory +setup_repo(project_path = tempdir(), + subfolder = "ela_access", + proj_name = "Access to Grade-Level ELA Content", + analyst_name = "Dustin Pashouwer and Sam Firke") } diff --git a/man/setup_subdirectory.Rd b/man/setup_subdirectory.Rd index 7881b98..5451f10 100644 --- a/man/setup_subdirectory.Rd +++ b/man/setup_subdirectory.Rd @@ -4,9 +4,11 @@ \alias{setup_subdirectory} \title{Initialize a new subdirectory in an existing repository, TNTP style.} \usage{ -setup_subdirectory(subfolder, proj_name, analyst_name) +setup_subdirectory(project_path, subfolder, proj_name, analyst_name) } \arguments{ +\item{project_path}{the path to the main project directory. To use the current project, use `project_path = here::here()`.} + \item{subfolder}{a character vector containing the concise name of a project subfolder. E.g., if the repository is the name of a city "Anywhere City", a project subfolder might be "ela_access" or "aps_talent_landscape").} @@ -34,11 +36,9 @@ and create the RProject and .gitignore files. Add subsequent analysis project f with this function. } \examples{ -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -# When there's already a repository "Anywhere City" with an RProject and a .gitignore -# and a new project analysis subfolder is needed within that repo: -setup_subdirectory("ela_access", - proj_name = "Equitable Access to Grade-Level ELA", - analyst_name = "Dustin Pashouwer and Sam Firke") -\dontshow{\}) # examplesIf} +# Setting up in a temporary directory +setup_subdirectory(tempdir(), + subfolder = "ela_access", + proj_name = "Equitable Access to Grade-Level ELA", + analyst_name = "Dustin Pashouwer and Sam Firke") } From e2fde0eb64307879d79676da05f475e7627e9bba Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Fri, 8 Mar 2024 17:34:43 -0500 Subject: [PATCH 05/10] Fixed note on length of tntp_style() example --- R/tntp_style.R | 3 ++- man/tntp_style.Rd | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/R/tntp_style.R b/R/tntp_style.R index a263e86..e9f372b 100644 --- a/R/tntp_style.R +++ b/R/tntp_style.R @@ -66,7 +66,7 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { #' @export #' @returns a ggplot theme object. #' -#' @examples +#' @examples \donttest{ #' library(dplyr) #' library(ggplot2) #' @@ -115,6 +115,7 @@ get_usable_family <- function(family, silent = FALSE, default_family = "sans") { #' base_size = 20, #' show_axis_titles = "x" #' ) +#' } #' tntp_style <- function(family = "Halyard Display", header_family = family, diff --git a/man/tntp_style.Rd b/man/tntp_style.Rd index 9dfc15e..ae51d0c 100644 --- a/man/tntp_style.Rd +++ b/man/tntp_style.Rd @@ -47,6 +47,7 @@ a ggplot theme object. A custom theme including TNTP fonts and other defaults for styling ggplot2 charts. } \examples{ +\donttest{ library(dplyr) library(ggplot2) @@ -95,5 +96,6 @@ frpl_experience |> base_size = 20, show_axis_titles = "x" ) + } } From a5da9206896923ea20bbe9107cb14f6f2fc2e9cb Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Mon, 11 Mar 2024 11:41:45 -0400 Subject: [PATCH 06/10] Minor change - testing Rstudio access --- README.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index 1a32cf6..3972aa5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -40,7 +40,7 @@ Some of the highlights of the package include: `tntp_palette()` functions - A TNTP ggplot2 theme using brand fonts (`tntp_style()`) - The `tntp_cred()` functions for securely managing credentials (passwords, - API keys, etc.) in R. + API keys, etc.). - TNTP-themed RMarkdown templates, for starting a new analysis with a shell that can already generate a TNTP-themed .docx report - Functions for initializing a new repository or project folder with From 80e0805262db53e04c52fc8e355e7f70efbeac6d Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Mon, 11 Mar 2024 12:17:23 -0400 Subject: [PATCH 07/10] Description fixes based on CRAN feedback. --- DESCRIPTION | 25 +++++++++++++++++-------- cran-comments.md | 10 +++++++++- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4285a3f..aba30b8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,23 @@ Type: Package Package: tntpr Title: Data Analysis Tools Customized for TNTP -Version: 1.0.1 -Author: Sam Firke [aut, cre], Jake Russ [aut, cre], Alex Spurrier [ctb], - Dustin Pashouwer [ctb], Kate Mullan [ctb], Shane Orr [ctb], Sam Talcott [ctb] -Maintainer: Dustin Pashouwer -Description: An internal TNTP R package that includes functions and - templates customized with TNTP branding. It is intended for this R - package to be a one-stop shop for R tools by analysts and other data - users at TNTP. +Version: 1.0.2 +Authors@R: c( + person("Dustin", "Pashouwer", role = c("aut", "cre"), + email = "dustin.pashouwer@tntp.org"), + person("Sam", "Firke", role = "aut"), + person("Jake", "Russ", role = "aut"), + person("Shane", "Orr", role = "aut", + email = "shane.orr@tntp.org"), + person("Sam", "Talcott", role = "aut", + email = "sam.talcott@tntp.org"), + person("Alex", "Spurrier", role = "ctb"), + person("Kate", "Mullan", role = "ctb") +) +Description: An assortment of functions and templates customized to meet + the needs of data analysts at the non-profit organization TNTP. + Includes functions for branded colors and plots, credentials management, + repository set-up, and other common analytic tasks. License: CC BY 4.0 URL: https://github.com/tntp/tntpr, https://tntp.github.io/tntpr/ Depends: diff --git a/cran-comments.md b/cran-comments.md index cb93721..feeb8a7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,11 @@ +## Resubmission Part 2 + +This is a second resubmission. In this version I have: + +* Further clarified "TNTP" in the R CMD check comments below (short version: it isn't an acronym anymore). +* Changed DESCRIPTION to use an Authors@R: field +* Re-wrote the Description: field in DESCRIPTION based on feedback from the last submission. + ## Resubmission This is a resubmission. In this version I have: @@ -18,5 +26,5 @@ This package doesn't reference academic publications, so there are no references 0 errors | 0 warnings | 1 notes -* Note: the word "TNTP" in README.md is the name of an organization, not an acronym or mis-spelled word. +* Note: the word "TNTP" in README.md and in DESCRIPTION is the name of an organization, not an acronym or mis-spelled word. Although TNTP used to stand for "The New Teacher Project", that name was dropped around 2013 (as the organization branched out into areas beyond new teacher training) and the current name is not an acronym for anything. * This is a new release. From 7cfa60f58684989e00ca1a66921c5e52150dcfb4 Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Mon, 11 Mar 2024 13:15:53 -0400 Subject: [PATCH 08/10] Minor changes to Authors and About section --- DESCRIPTION | 3 --- README.Rmd | 8 ++++---- README.md | 11 ++++++----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index aba30b8..2a37a49 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,13 +6,10 @@ Authors@R: c( person("Dustin", "Pashouwer", role = c("aut", "cre"), email = "dustin.pashouwer@tntp.org"), person("Sam", "Firke", role = "aut"), - person("Jake", "Russ", role = "aut"), person("Shane", "Orr", role = "aut", email = "shane.orr@tntp.org"), person("Sam", "Talcott", role = "aut", email = "sam.talcott@tntp.org"), - person("Alex", "Spurrier", role = "ctb"), - person("Kate", "Mullan", role = "ctb") ) Description: An assortment of functions and templates customized to meet the needs of data analysts at the non-profit organization TNTP. diff --git a/README.Rmd b/README.Rmd index 3972aa5..824d609 100644 --- a/README.Rmd +++ b/README.Rmd @@ -26,10 +26,10 @@ knitr::opts_chunk$set( About ----- -The `tntpr` package makes data science at TNTP easier and more accurate -by supplying tools that are needed for common TNTP analyses. Because -this package specifically serves the TNTP analysis community, functions -can be tailored to our exact use cases. +The `tntpr` package contains an assortment of functions and templates +customized to meet the needs of data analysts at the non-profit organization +TNTP. It includes functions for branded colors and plots, credentials +management, repository set-up, and other common analytic tasks. Package summary --------------- diff --git a/README.md b/README.md index 5e8506d..382eef2 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ alt="TNTP logo" /> ## About -The `tntpr` package makes data science at TNTP easier and more accurate -by supplying tools that are needed for common TNTP analyses. Because -this package specifically serves the TNTP analysis community, functions -can be tailored to our exact use cases. +The `tntpr` package contains an assortment of functions and templates +customized to meet the needs of data analysts at the non-profit +organization TNTP. It includes functions for branded colors and plots, +credentials management, repository set-up, and other common analytic +tasks. ## Package summary @@ -26,7 +27,7 @@ Some of the highlights of the package include: `tntp_palette()` functions - A TNTP ggplot2 theme using brand fonts (`tntp_style()`) - The `tntp_cred()` functions for securely managing credentials - (passwords, API keys, etc.) in R. + (passwords, API keys, etc.). - TNTP-themed RMarkdown templates, for starting a new analysis with a shell that can already generate a TNTP-themed .docx report - Functions for initializing a new repository or project folder with From 51cb1e4fb46a396737046ac062acb4cd54b2ad98 Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Mon, 11 Mar 2024 13:22:51 -0400 Subject: [PATCH 09/10] Fixed spacing on DESCRIPTION. --- DESCRIPTION | 16 ++++++++-------- man/tntpr.Rd | 11 +++++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2a37a49..8247165 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,14 +3,14 @@ Package: tntpr Title: Data Analysis Tools Customized for TNTP Version: 1.0.2 Authors@R: c( - person("Dustin", "Pashouwer", role = c("aut", "cre"), - email = "dustin.pashouwer@tntp.org"), - person("Sam", "Firke", role = "aut"), - person("Shane", "Orr", role = "aut", - email = "shane.orr@tntp.org"), - person("Sam", "Talcott", role = "aut", - email = "sam.talcott@tntp.org"), -) + person("Dustin", "Pashouwer", role = c("aut", "cre"), + email = "dustin.pashouwer@tntp.org"), + person("Sam", "Firke", role = "aut"), + person("Shane", "Orr", role = "aut", + email = "shane.orr@tntp.org"), + person("Sam", "Talcott", role = "aut", + email = "sam.talcott@tntp.org") + ) Description: An assortment of functions and templates customized to meet the needs of data analysts at the non-profit organization TNTP. Includes functions for branded colors and plots, credentials management, diff --git a/man/tntpr.Rd b/man/tntpr.Rd index e3d7e04..9560e66 100644 --- a/man/tntpr.Rd +++ b/man/tntpr.Rd @@ -18,3 +18,14 @@ Useful links: } } +\author{ +\strong{Maintainer}: Dustin Pashouwer \email{dustin.pashouwer@tntp.org} + +Authors: +\itemize{ + \item Sam Firke + \item Shane Orr \email{shane.orr@tntp.org} + \item Sam Talcott \email{sam.talcott@tntp.org} +} + +} From 4aeb84b7024dac268608c0e8a93007f7a2bf3423 Mon Sep 17 00:00:00 2001 From: Sam Talcott Date: Fri, 22 Mar 2024 08:41:46 -0400 Subject: [PATCH 10/10] Resubmission 3 comments --- cran-comments.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cran-comments.md b/cran-comments.md index feeb8a7..ccf28d3 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,7 @@ +## Resubmission Part 3 + +No changes have been made since the last resubmission on March 11, 2024, however we haven't received any communication since then and wanted to resubmit in case the last submission wasn't received. If the 3/11/24 submission is still in process please ignore! + ## Resubmission Part 2 This is a second resubmission. In this version I have: