Skip to content

Commit

Permalink
include CRAN in install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Apr 15, 2024
1 parent 1ad0d4a commit dd53650
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 20 deletions.
8 changes: 7 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ There are a number of tools out there that address similar and complementary pro

## Installation

You can install the latest version of DataPackageR from [github](https://github.com/ropensci/DataPackageR) with:
You can install the latest [CRAN](https://cran.r-project.org/package=DataPackageR) release of DataPackageR with:

```{r, eval=FALSE}
install.packages("DataPackageR")
```

You can install the latest version of DataPackageR from [GitHub](https://github.com/ropensci/DataPackageR) with:

```{r, eval=FALSE}
library(remotes)
Expand Down
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,16 @@ See the [publication](#publication) for further discussion.

## Installation

You can install the latest
[CRAN](https://cran.r-project.org/package=DataPackageR) release of
DataPackageR with:

``` r
install.packages("DataPackageR")
```

You can install the latest version of DataPackageR from
[github](https://github.com/ropensci/DataPackageR) with:
[GitHub](https://github.com/ropensci/DataPackageR) with:

``` r
library(remotes)
Expand Down Expand Up @@ -226,8 +234,8 @@ datapackage_skeleton(
code_files = processing_code,
r_object_names = "cars_over_20",
path = tempdir())
#> ✔ Creating '/tmp/RtmpJoB0Xr/mtcars20/'
#> ✔ Setting active project to '/tmp/RtmpJoB0Xr/mtcars20'
#> ✔ Creating 'C:/Users/dslager/AppData/Local/Temp/Rtmp4eVyRE/mtcars20/'
#> ✔ Setting active project to 'C:/Users/dslager/AppData/Local/Temp/Rtmp4eVyRE/mtcars20'
#> ✔ Creating 'R/'
#> ✔ Writing 'DESCRIPTION'
#> Package: mtcars20
Expand All @@ -243,7 +251,7 @@ datapackage_skeleton(
#> RoxygenNote: 7.3.1
#> ✔ Writing 'NAMESPACE'
#> ✔ Setting active project to '<no active project>'
#> ✔ Setting active project to '/tmp/RtmpJoB0Xr/mtcars20'
#> ✔ Setting active project to 'C:/Users/dslager/AppData/Local/Temp/Rtmp4eVyRE/mtcars20'
#> ✔ Added DataVersion string to 'DESCRIPTION'
#> ✔ Creating 'data-raw/'
#> ✔ Creating 'data/'
Expand Down Expand Up @@ -273,19 +281,19 @@ package_build(packageName = file.path(tempdir(),"mtcars20"), install = FALSE,
#> Writing 'mtcars20.Rd'
#> Writing 'cars_over_20.Rd'
#> ── R CMD build ─────────────────────────────────────────────────────────────────
#> * checking for file ‘/tmp/RtmpJoB0Xr/mtcars20/DESCRIPTION ... OK
#> * preparing mtcars20:
#> * checking DESCRIPTION meta-information ... OK
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * looking to see if a data/datalist file should be added
#> NB: this package now depends on R (>= 3.5.0)
#> WARNING: Added dependency on R >= 3.5.0 because serialized objects in
#> serialize/load version 3 cannot be read in older versions of R.
#> File(s) containing such objects:
#> mtcars20/data/cars_over_20.rda
#> * building mtcars20_1.0.tar.gz
#>
#> checking for file 'C:\Users\dslager\AppData\Local\Temp\Rtmp4eVyRE\mtcars20/DESCRIPTION' ... checking for file 'C:\Users\dslager\AppData\Local\Temp\Rtmp4eVyRE\mtcars20/DESCRIPTION' ... ✔ checking for file 'C:\Users\dslager\AppData\Local\Temp\Rtmp4eVyRE\mtcars20/DESCRIPTION' (383ms)
#> preparing 'mtcars20':
#> checking DESCRIPTION meta-information ... checking DESCRIPTION meta-information ... ✔ checking DESCRIPTION meta-information
#> checking for LF line-endings in source and make files and shell scripts
#> checking for empty or unneeded directories
#> looking to see if a 'data/datalist' file should be added
#> NB: this package now depends on R (>= NB: this package now depends on R (>= 3.5.0)
#> WARNING: Added dependency on R >= 3.5.0 because serialized objects in
#> serialize/load version 3 cannot be read in older versions of R.
#> File(s) containing such objects:
#> 'mtcars20/data/cars_over_20.rda' 'mtcars20/data/cars_over_20.rda'
#> building 'mtcars20_1.0.tar.gz'
#>
#> Next Steps
#> 1. Update your package documentation.
#> - Edit the documentation.R file in the package source data-raw subdirectory and update the roxygen markup.
Expand All @@ -297,7 +305,7 @@ package_build(packageName = file.path(tempdir(),"mtcars20"), install = FALSE,
#> - Set up a github repository for your pacakge.
#> - Add the github repository as a remote of your local package repository.
#> - git push your local repository to gitub.
#> [1] "/tmp/RtmpJoB0Xr/mtcars20_1.0.tar.gz"
#> [1] "C:/Users/dslager/AppData/Local/Temp/Rtmp4eVyRE/mtcars20_1.0.tar.gz"

# Update the autogenerated roxygen documentation in data-raw/documentation.R.
# edit(file.path(tempdir(),"mtcars20","R","mtcars20.R"))
Expand All @@ -311,7 +319,7 @@ document(file.path(tempdir(),"mtcars20"), install = FALSE,

# Let's use the package we just created.
install.packages(file.path(tempdir(),"mtcars20_1.0.tar.gz"), type = "source", repos = NULL)
#> Installing package into '/tmp/RtmpXKy9h5/temp_libpath6ff32fb78dc2'
#> Installing package into 'C:/Users/dslager/AppData/Local/Temp/RtmpuAN4wY/temp_libpath3a5c1ce4597'
#> (as 'lib' is unspecified)
library(mtcars20)
data("cars_over_20") # load the data
Expand Down

0 comments on commit dd53650

Please sign in to comment.