Skip to content

Commit

Permalink
moving to install_missing_packages and updating one apweb change
Browse files Browse the repository at this point in the history
  • Loading branch information
wcornwell committed Jan 12, 2016
1 parent f9c5f01 commit 122d7fe
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: taxonlookup
Title: A dynamically-updating versioned taxonomic resource for vascular plants
Version: 1.0.1
Date: 2015-11-18
Version: 1.0.2
Date: 2016-01-12
Description: This is a taxon lookup table for land plants. It is built from a
set of scripts that dynamically build a versioned genus-family-order-higher taxa
lookup table from canonical sources on the web. It uses semantic versioning to
Expand Down
2 changes: 1 addition & 1 deletion R/plant_lookup.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ plant_lookup_versions <- function(local=TRUE, path=NULL) {
##' @export
##' @rdname plant_lookup
plant_lookup_version_current <- function(local=TRUE, path=NULL) {
datastorr::github_release_version_current(plant_lookup_info(info), local)
datastorr::github_release_version_current(plant_lookup_info(path), local)
}

##' @export
Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lookup_table(c("Pinus ponderosa","Quercus agrifolia"),by_species=TRUE)
| Pinus ponderosa | Pinus | Pinaceae | Pinales | Gymnosperms|
| Quercus agrifolia | Quercus | Fagaceae | Fagales | Angiosperms|

There are a few other functions to get species diversity numbers and other (non-Linnean) high clades if you want that information. If you use this package in a published paper, **please note the version number**. This will allow others to reproduce your work later.
There are a few other functions to get species diversity numbers and other (non-Linnean) high clades if you want that information. **If you use this package in a published paper, please note the version number**. This will allow others to reproduce your work later.

That's it, really. Below is information about the data sources and the versioned data distribution system (which we think is really cool), feel free to check it out, but you don't need to read the rest of this to use the package.

Expand Down Expand Up @@ -75,23 +75,16 @@ However, if there have been some recent changes to taxonomy that are both impor

# Rebuilding the lookup table

To build the lookup table, first clone this repository. Then install the required packages from CRAN:
To build the lookup table, first clone this repository. Then download and install `remake` from github:

```r
install.packages(c("R6","yaml","digest","devtools","downloader"))
```

Download and install 3 additional packages from github:

```r
devtools::install_github("richfitz/storr")
devtools::install_github("richfitz/remake")
devtools::install_github("ropensci/taxize")
```

This will require a recent version of taxize, so if you have that already installed an older version, please re-install. Then run the following command from within R. Make sure the home directory is within the repository:
Then run the following commands from within R. Make sure the home directory is within the repository:

```r
remake::install_missing_packages()
remake::make()
```

Expand Down
1 change: 0 additions & 1 deletion createlookup.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ matchPlantListFamiliesToApweb<-function(tplGenera){
tplGenera$order[is.na(tplGenera$order)]<-apFamilies$order[match(tplGenera$family,apFamilies$family)[is.na(tplGenera$order)]]
#fixing Vivianiaceae problem
tplGenera$order[tplGenera$family=="Vivianiaceae"]<-"Geraniales"

#"Bryophytes" are a problem
tplGenera$order[tplGenera$group=="Bryophytes"]<-"undeter_peristomate_moss"
#Sphagnopsida is generally thought to be the basal branch within the mosses
Expand Down
2 changes: 1 addition & 1 deletion plant_lookup.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14316,7 +14316,7 @@ number.of.species,genus,family,apweb.family,order,group
2,Sphenoclea,Sphenocleaceae,Sphenocleaceae,Solanales,Angiosperms
1,Tetracentron,Trochodendraceae,Trochodendraceae,Trochodendrales,Angiosperms
1,Trochodendron,Trochodendraceae,Trochodendraceae,Trochodendrales,Angiosperms
5,Vahlia,Vahliaceae,Vahliaceae,unplaced Asterid I,Angiosperms
5,Vahlia,Vahliaceae,Vahliaceae,Vahliales,Angiosperms
1,Acareosperma,Vitaceae,Vitaceae,Vitales,Angiosperms
96,Ampelocissus,Vitaceae,Vitaceae,Vitales,Angiosperms
24,Ampelopsis,Vitaceae,Vitaceae,Vitales,Angiosperms
Expand Down
5 changes: 5 additions & 0 deletions remake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ sources:

packages:
- taxize
- R6
- yaml
- digest
- devtools
- downloader

targets:
all:
Expand Down
2 changes: 1 addition & 1 deletion remake_sources.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
taxize:
source: github
repo: ropensci/taxize
repo: ropensci/taxize
1 change: 1 addition & 0 deletions tests/testthat/test-plant-lookup.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ test_that("table sane", {
expect_that(any(is.na(lookup)), is_false())
expect_that(any(lookup == ""), is_false())
expect_that(any(duplicated(lookup$genus)), is_false())
expect_is(plant_lookup_version_current(),"character")
})

0 comments on commit 122d7fe

Please sign in to comment.