Skip to content

Commit

Permalink
minor fixes for CRAN resubmission
Browse files Browse the repository at this point in the history
  • Loading branch information
luisDVA committed Jan 30, 2025
1 parent ba72d26 commit 712c900
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 34 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^pkgdown$
^\.github$
^cran-comments\.md$
^CRAN-SUBMISSION$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.quarto
docs
forgts.Rproj
inst/doc
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.0.1
Date: 2025-01-28 18:16:08 UTC
SHA: ba72d268c6ce86d607d3e8115ebc7342cefdd247
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version: 0.0.1
Authors@R:
person("Luis D.", "Verde Arregoitia", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-9520-6543"))
Description: Reads data plus formatting from a spreadsheet file and creates a gt object with the same data and formatting.
Description: Reads cell contents plus formatting from a spreadsheet file and creates an editable 'gt' object with the same data and formatting. Supports the most commonly-used cell and text styles including colors, fills, font weights and decorations, and borders.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/dataset_documentation.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' Open XML Format Spreadsheet with 1 sheet, 5 columns, and 8 rows. Toy dataset
#' with data on measurements for rodent specimens, extracted from Verde
#' Arregoitia et al. (2017; https://doi.org/10.5281/zenodo.201147). Cells and
#' Arregoitia et al. (2017; \doi{doi:10.5281/zenodo.201147}). Cells and
#' cell content have formatting added at random for demonstration purposes.
#'
#'
Expand Down
6 changes: 3 additions & 3 deletions R/forgts_main.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#' @export
#'
#' @examples
#' \dontrun{
#' forgts("yourpath/yourspreadsheet.xlsx")
#' }
#' example_spreadsheet <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
#' forgts(example_spreadsheet)
#'
forgts <- function(file, sheet = NULL) {
if (is.null(sheet)) {
sheet <- 1L
Expand Down
6 changes: 3 additions & 3 deletions R/get_formatting.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#'
#' @importFrom rlang .data
#' @examples
#' \dontrun{
#' get_formatting("yourpath/yourspreadsheet.xlsx")
#' }
#' example_file <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
#' get_formatting(example_file)
#'
#' @export
#'
get_formatting <- function(xlfilepath, sheet = NULL) {
Expand Down
7 changes: 3 additions & 4 deletions R/styling.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
#' @export
#'
#' @examples
#' \dontrun{
#' sprdsht_data <- read_excel("yourpath/yourspreadsheet.xlsx")
#' example_spreadsheet <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
#' sprdsht_data <- readxl::read_excel(example_spreadsheet)
#' gt_table <- gt::gt(sprdsht_data)
#' format_long <- get_formatting("yourpath/yourspreadsheet.xlsx")
#' format_long <- get_formatting(example_spreadsheet)
#' format_ready <- translate_defs(format_long)
#' apply_styling(gt_table, format_ready)
#' }
#'
#' @importFrom gt gt
apply_styling <- function(gt_object, formatRdy) {
Expand Down
6 changes: 3 additions & 3 deletions R/translate_formatting.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#' @importFrom dplyr case_when if_else mutate
#'
#' @examples
#' \dontrun{
#' format_long <- get_formatting("yourpath/yourspreadsheet.xlsx")
#' example_spreadsheet <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
#' format_long <- get_formatting(example_spreadsheet)
#' translate_defs(format_long)
#' }
#'
translate_defs <- function(format_long) {
# match styling arguments
format_long_stl <- dplyr::mutate(format_long,
Expand Down
10 changes: 6 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
## R CMD check results

0 errors | 0 warnings | 2 notes
0 errors | 0 warnings | 0 notes
Winbuilder: OK

notes pertain to new submission

## Rhub v2 checks: ALL OK
Test environments:
* linux x86_64-pc-linux-gnu Ubuntu 24.04.1 LTS
* macOS Ventura 13.7.2
* Windows Server 2022 x64 (build 20348)

* This is a new release.
## Resubmission notes

* More descriptive text in 'Description' field
* Package names quoted in Title field
* All exported functions now with working examples that run OK
7 changes: 3 additions & 4 deletions man/apply_styling.Rd

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

2 changes: 1 addition & 1 deletion man/forgts-package.Rd

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

6 changes: 3 additions & 3 deletions man/forgts.Rd

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

6 changes: 3 additions & 3 deletions man/get_formatting.Rd

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

2 changes: 1 addition & 1 deletion man/rodentsheet.xlsx.Rd

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

6 changes: 3 additions & 3 deletions man/translate_defs.Rd

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

0 comments on commit 712c900

Please sign in to comment.