diff --git a/DESCRIPTION b/DESCRIPTION index 497be07..6c78c52 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 diff --git a/R/plant_lookup.R b/R/plant_lookup.R index eb7f322..cec10ec 100644 --- a/R/plant_lookup.R +++ b/R/plant_lookup.R @@ -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 diff --git a/README.md b/README.md index e80411b..c31a7c5 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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() ``` diff --git a/createlookup.R b/createlookup.R index cd6001f..d18ec0a 100644 --- a/createlookup.R +++ b/createlookup.R @@ -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 diff --git a/plant_lookup.csv b/plant_lookup.csv index 55ebb7b..83f5b65 100644 --- a/plant_lookup.csv +++ b/plant_lookup.csv @@ -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 diff --git a/remake.yml b/remake.yml index 13e1cb0..9762841 100644 --- a/remake.yml +++ b/remake.yml @@ -3,6 +3,11 @@ sources: packages: - taxize + - R6 + - yaml + - digest + - devtools + - downloader targets: all: diff --git a/remake_sources.yml b/remake_sources.yml index e069e6a..cb13873 100644 --- a/remake_sources.yml +++ b/remake_sources.yml @@ -1,3 +1,3 @@ taxize: source: github - repo: ropensci/taxize \ No newline at end of file + repo: ropensci/taxize diff --git a/tests/testthat/test-plant-lookup.R b/tests/testthat/test-plant-lookup.R index 3d64ff2..662f83b 100644 --- a/tests/testthat/test-plant-lookup.R +++ b/tests/testthat/test-plant-lookup.R @@ -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") })