Skip to content

Commit

Permalink
Merge pull request #33 from jrdnbradford/cran-initial-release
Browse files Browse the repository at this point in the history
CRAN initial release
  • Loading branch information
jrdnbradford authored Sep 17, 2024
2 parents 2561fe5 + 9f433d9 commit fda2b9c
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^docs$
^pkgdown$
^README\.Rmd$
^cran-comments\.md$
^CRAN-SUBMISSION$
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ vignettes/*.pdf
# pkgdown site
docs/
docs

/.quarto/

# CRAN
CRAN-SUBMISSION
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Package: readMDTable
Title: Read Markdown Tables into Tibbles
Version: 0.1.0.9001
Version: 0.1.1
Authors@R:
person("Jordan", "Bradford", , "[email protected]", role = c("aut", "cre", "cph"))
Description: Read markdown tables from a string, file, or URL into tibbles.
Description: Functions for reading raw markdown tables from a
string, file, or URL into tibbles. It includes options to
warn users about potential issues with the markdown table
format, ensuring robust data handling even if the table has
minor formatting errors.
Imports:
cli,
httr2,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# readMDTable (development version)

# readMDTable 0.1.1

* Fixed an issue on Windows where a warning was incorrectly raised on valid separator lines (#28)
* Move from {httr} to {httr2} (#26)
* Added example with warning for `read_md_table`
* Fixed an issue with rendering the PDF manual due to unicode characters

# readMDTable 0.1.0

Expand Down
12 changes: 7 additions & 5 deletions R/read_md_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#' leading or trailing pipes, warnings will be raised
#' but the data will be read correctly.
#' [`readr::read_delim`] will provide its own warnings
#' if there are potential issue.
#' if there are potential issues.
#'
#' @param file Either a path to a file, a connection, or
#' literal data (either a single string or a raw vector).
#' Files starting with http://⁠, ⁠https://,
#' ⁠ftp://⁠, or ftps:// will be automatically downloaded.
#' Files starting with `http://`, `https://`, `ftp://`,
#' or `ftps://` will be automatically downloaded.
#'
#' @param warn Boolean. Should `read_md_table` warn
#' about possible issues with the passed `file`?
Expand All @@ -36,9 +36,11 @@
#' # Read from a string
#' read_md_table("| H1 | H2 | \n|-----|-----|\n| R1C1 | R1C2 |\n| R2C1 | R2C2 |")
#'
#' \dontrun{
#' \donttest{
#' # Read from a URL
#' read_md_table("https://raw.githubusercontent.com/jrdnbradford/readMDTable/main/inst/extdata/iris.md")
#' read_md_table(
#' "https://raw.githubusercontent.com/jrdnbradford/readMDTable/main/inst/extdata/iris.md"
#' )
#' }
#'
#' # Get warnings for malformed tables
Expand Down
8 changes: 4 additions & 4 deletions R/read_md_table_example.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#' @title Get Path to readMDTable Examples
#'
#' @details readMDTable comes bundled with a number of sample files
#' in `inst/extdata` directory. This function makes them easy to access.
#' @details readMDTable comes with a number of well-known
#' datasets as example markdown tables in the `inst/extdata`
#' directory. `read_md_table_example` will list the file
#' names or return the path of a specified file.
#'
#' @param file Name of file. If `NULL`, the example files will be listed.
#'
Expand All @@ -18,8 +20,6 @@
#' # Read in an example file
#' mtcars_path <- read_md_table_example("mtcars.md")
#' read_md_table(mtcars_path)
#' @references This function and setup follows [`readr::readr_example`].
#'
#' @export
read_md_table_example <- function(file = NULL) {
if (is.null(file)) {
Expand Down
15 changes: 9 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![R-CMD-check](https://github.com/jrdnbradford/readMDTable/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jrdnbradford/readMDTable/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/readMDTable)](https://CRAN.R-project.org/package=readMDTable)
[![Dev status](https://img.shields.io/github/r-package/v/jrdnbradford/readMDTable/main?label=Dev%20Version&logo=github&labelColor=3e474f&logoColor=959da5)](https://github.com/jrdnbradford/readMDTable)
[![GitHub License](https://img.shields.io/github/license/jrdnbradford/readMDTable?logo=GNU&label=License)](https://www.gnu.org/licenses/gpl-3.0)
[![Codecov test coverage](https://codecov.io/gh/jrdnbradford/readMDTable/graph/badge.svg)](https://app.codecov.io/gh/jrdnbradford/readMDTable)
Expand All @@ -25,18 +26,20 @@ Many sites (like GitHub) convert markdown tables into HTML tables. For these typ

## Installation

Install from GitHub:
Install the latest CRAN release with:
```{r, eval=FALSE}
devtools::install_github("jrdnbradford/readMDTable")
install.packages("readMDTable")
```

## Docs
Install the development version from GitHub using pak:
```{r, eval=FALSE}
pak::pkg_install("jrdnbradford/readMDTable")
```

Review the [package index reference](https://jrdnbradford.github.io/readMDTable/reference/index.html) or use
or devtools:
```{r, eval=FALSE}
?readMDTable
devtools::install_github("jrdnbradford/readMDTable")
```
for documentation.

## Usage

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ these types of tables you’re probably better off using

## Installation

Install from GitHub:
Install the latest CRAN release with:

``` r
devtools::install_github("jrdnbradford/readMDTable")
install.packages("readMDTable")
```

## Docs

Review the [package index
reference](https://jrdnbradford.github.io/readMDTable/reference/index.html)
or use
Install the development version from GitHub using pak:

``` r
?readMDTable
pak::pkg_install("jrdnbradford/readMDTable")
```

for documentation.
or devtools:

``` r
devtools::install_github("jrdnbradford/readMDTable")
```

## Usage

Expand Down
7 changes: 7 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.

* `devtools::check(remote = TRUE, manual = TRUE)` noted "tibble(s)" as potentially misspelled.
2 changes: 1 addition & 1 deletion man/readMDTable-package.Rd

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

12 changes: 7 additions & 5 deletions man/read_md_table.Rd

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

9 changes: 4 additions & 5 deletions man/read_md_table_example.Rd

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

0 comments on commit fda2b9c

Please sign in to comment.