Skip to content

Commit

Permalink
Fixed various notes from rhub::check_for_cran()
Browse files Browse the repository at this point in the history
  • Loading branch information
sambtalcott committed Feb 22, 2024
1 parent e7e2711 commit cfb1135
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 34 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: tntpr
Title: Data Analysis Tools Customized for TNTP
Version: 0.2.2
Version: 1.0.0
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 <[email protected]>
Expand Down
19 changes: 4 additions & 15 deletions R/bar_chart_counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,19 @@
#' # All examples use font = "sans" to avoid triggering font warnings
#' mtcars |>
#' bar_chart_counts(var = cyl,
#' var_color = "orange",
#' title = "Number of mtcars by cylinder",
#' font = "sans")
#'
#' # Use a grouping variable
#' # Use a grouping variable with custom colors
#' mtcars |>
#' bar_chart_counts(var = cyl,
#' group_var = vs,
#' group_colors = c("orange", "navy"),
#' labels = "pct",
#' title = "% of V vs. Straight engines by # of cylinders",
#' font = "sans")
#'
#' # Change default color
#' mtcars |>
#' bar_chart_counts(var = cyl,
#' var_color = "orange",
#' title = "Number of mtcars by cylinder",
#' font = "sans")
#'
#' # Specify color by group
#' mtcars |>
#' bar_chart_counts(am, cyl,
#' group_colors = c("orange", "green", "navy"),
#' labels = "pct",
#' font = "sans")
#"

bar_chart_counts <- function(df,
var,
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(
[![R-CMD-check](https://github.com/tntp/tntpr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tntp/tntpr/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

<a href="https://www.tntp.org" target="_blank">
<a href="https://tntp.org" target="_blank">
![TNTP logo](man/figures/logo.png){width=70px height=70px}
</a>

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![R-CMD-check](https://github.com/tntp/tntpr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tntp/tntpr/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

<a href="https://www.tntp.org" target="_blank">
<a href="https://tntp.org" target="_blank">
<img src="man/figures/logo.png" width="70" height="70"
alt="TNTP logo" /> </a>

Expand Down
18 changes: 3 additions & 15 deletions man/bar_chart_counts.Rd

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

2 changes: 1 addition & 1 deletion vignettes/visualization-cookbook.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The `family` parameter lets you set the text font family. This changes the font

You will need to manually import additional fonts, including the Halyard fonts, using the `extrafont` package before they are available to R. Follow these steps to import fonts:

1. Download the Halyard Display Fonts in .ttf forms from the [Data Analytics Sharepoint](https://tntp.sharepoint.com/sites/DataAnalytics/Shared%20Documents/Forms/AllItems.aspx) under the "Fonts" category.
1. Download the Halyard Display Fonts in .ttf forms from the Data Analytics Sharepoint Document Library under the "Fonts" category.
2. Open the fonts folder on your laptop (Settings -> Personalization -> Fonts) and drag and drop the Halyard Fonts there to install them on your computer.
3. In RStudio, install the `extrafont` package with `install.packages('extrafont)`.
4. Import fonts into the extrafont database with `extrafont::font_import()`. This only needs to be done once. The process is long, and can be significantly shortened by only importing the Halyard fonts using `extrafont::font_import(pattern = 'Halyard')`.
Expand Down

0 comments on commit cfb1135

Please sign in to comment.