Skip to content

Commit

Permalink
All files have had permissions changed for some reason. It's really a…
Browse files Browse the repository at this point in the history
…nnoying.

In addition, there is a change to `compile_downloads()` as a result of a user bug report.  This fixes an error where a single sample download returns a result with as many rows as columns.
  • Loading branch information
SimonGoring committed Jul 19, 2018
1 parent ca81a6f commit b85dfda
Show file tree
Hide file tree
Showing 132 changed files with 117 additions and 100 deletions.
Empty file modified .Rbuildignore
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .travis.yml
100644 → 100755
Empty file.
Empty file modified DESCRIPTION
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified NAMESPACE
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions NEWS
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
neotoma 1.7.1
====================
o Bugfix for `compile_download`, single sample downloads were failing to compile properly.

neotoma 1.7.0
====================
o Added `plot_leaflet` to allow interactive exploration of downloaded Neotoma data. Integrates with the Neotoma Explorer.
Expand Down
Empty file modified R/.gitignore
100644 → 100755
Empty file.
Empty file modified R/Stratiplot.download.R
100644 → 100755
Empty file.
Empty file modified R/ages.R
100644 → 100755
Empty file.
Empty file modified R/bind.R
100644 → 100755
Empty file.
Empty file modified R/browse.R
100644 → 100755
Empty file.
Empty file modified R/clamodel.R
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions R/compile_downloads.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ compile_downloads <- function(downloads) {
lat = x$dataset$site$lat,
long = x$dataset$site$long,
dataset = x$dataset$dataset.meta$dataset.id,
x$counts[good_counts,])
as.data.frame(x$counts)[good_counts,])
}
else{
# Dummy data for empty sites.
Expand All @@ -102,7 +102,6 @@ compile_downloads <- function(downloads) {
site.info
}


if (inherits(downloads, 'download_list')) {
site.info <- plyr::ldply(downloads, down.to.df)
}
Expand Down
Empty file modified R/compile_taxa.R
100644 → 100755
Empty file.
Empty file modified R/counts.R
100644 → 100755
Empty file.
Empty file modified R/depths.R
100644 → 100755
Empty file.
Empty file modified R/download.R
100644 → 100755
Empty file.
Empty file modified R/get_chroncontrol.R
100644 → 100755
Empty file.
Empty file modified R/get_closest.R
100644 → 100755
Empty file.
Empty file modified R/get_contact.R
100644 → 100755
Empty file.
Empty file modified R/get_dataset.R
100644 → 100755
Empty file.
171 changes: 86 additions & 85 deletions R/get_download.R
100644 → 100755

Large diffs are not rendered by default.

Empty file modified R/get_geochron.R
100644 → 100755
Empty file.
Empty file modified R/get_publication.R
100644 → 100755
Empty file.
Empty file modified R/get_site.R
100644 → 100755
Empty file.
Empty file modified R/get_table.R
100644 → 100755
Empty file.
Empty file modified R/get_taxa.R
100644 → 100755
Empty file.
Empty file modified R/gp.table.R
100644 → 100755
Empty file.
Empty file modified R/param_check.R
100644 → 100755
Empty file.
Empty file modified R/plot-methods.R
100644 → 100755
Empty file.
Empty file modified R/plot_leaflet.R
100644 → 100755
Empty file.
Empty file modified R/pollen.equiv.R
100644 → 100755
Empty file.
Empty file modified R/print.chroncontrol.R
100644 → 100755
Empty file.
Empty file modified R/print.dataset.R
100644 → 100755
Empty file.
Empty file modified R/print.dataset_list.R
100644 → 100755
Empty file.
Empty file modified R/print.download.R
100644 → 100755
Empty file.
Empty file modified R/print.download_list.R
100644 → 100755
Empty file.
Empty file modified R/print.geochronologic.R
100644 → 100755
Empty file.
Empty file modified R/print.geochronologic_list.R
100644 → 100755
Empty file.
Empty file modified R/print.site.R
100644 → 100755
Empty file.
Empty file modified R/read_bacon.R
100644 → 100755
Empty file.
Empty file modified R/read_methods.R
100644 → 100755
Empty file.
Empty file modified R/sysdata.rda
100644 → 100755
Empty file.
21 changes: 12 additions & 9 deletions R/taxa.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
##' @export
##' @rdname taxa
`taxa.download` <- function(obj, ...) {
ret <- as.data.frame(obj$taxon.list)
ret <- as.data.frame(obj$taxon.list,
stringsAsFactors = FALSE)
class(ret) <- c("neo_taxa", "data.frame")
ret
}
Expand All @@ -39,14 +40,16 @@
##' @rdname taxa
`taxa.download_list` <- function(obj, collapse = TRUE, hierarchy = FALSE, ...) {
ret <- lapply(obj, '[[', 'taxon.list')
ret <- lapply(ret, as.data.frame, stringsAsFactors = FALSE)

ret <- lapply(ret,
as.data.frame,
stringsAsFactors = FALSE)

# if (hierarchy == TRUE) {
# taxonomy <- get_table("Taxa")

# match_taxa <- function(tax){
# row <- match(tax, taxonomy$TaxonName)
#
#
# output <- taxonomy[row,]
# if (taxonomy$TaxonID[row] == taxonomy$HigherTaxonID[row]) {
# return(taxonomy[row,])
Expand All @@ -56,19 +59,19 @@
# }
# return(output)
# }

# }

if (collapse == TRUE) {
ret <- dplyr::bind_rows(ret)
ret <- ret[!duplicated(ret[,c(1:3)]),]

# if(hierarchy == TRUE) {
# taxonhier <- do.call(rbind.data.frame, lapply(ret$taxon.name, match_taxa))
# taxonhier <- taxonhier[!duplicated(taxonhier), c("TaxonID", "TaxonName", "TaxaGroupID", "HigherTaxonID")]
# }
}

class(ret) <- c("neo_taxa_list", "list")
ret
}
Empty file modified R/taxon.table.R
100644 → 100755
Empty file.
Empty file modified R/translate.table.R
100644 → 100755
Empty file.
Empty file modified R/write_agefile.R
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ More functions are available through the package help. These represent the core
+ `get_chroncontrol` - Get chronological information used to build the age-depth model for the record. [API](http://api.neotomadb.org/doc/resources/chroncontrol)

### Recent Changes
+ unreleased: Added the `taxa` function to extract taxa lists from large download objects.
+ 1.7.1: Bugfix for `compile_download`, single sample downloads were failing to compile properly, added the `taxa` function to extract taxa lists from large download objects.
+ 1.7.0: Added `plot_leaflet` to allow interactive exploration of downloaded Neotoma data. Integrates with the Neotoma Explorer. Minor bugfix for `get_download` to allow records to be sent to Neotoma and to be filtered.
+ 1.6.2: Improved the basic `plot` method based on tests against Tilia files in the Neotoma Holding Tank & built more robust interpolation in `read_bacon` so that age models without interpolated dates can still be imported. `browse` now opens multiple datastes in the Neotoma Explorer at once.
+ 1.6.1: New `Stratiplot` method, using the `analogue` package to plot dataset diagrams from `download` and `download_list` objects, bug fixes for `write_agefile` and a new function, `read_bacon`, to read in and integrate Bacon chronologies into `download` objects.
Expand Down
Empty file modified appveyor.yml
100644 → 100755
Empty file.
Empty file modified code_of_conduct.md
100644 → 100755
Empty file.
Empty file modified cran-comments.md
100644 → 100755
Empty file.
Empty file modified download.out
100644 → 100755
Empty file.
Empty file modified inst/CITATION
100644 → 100755
Empty file.
Empty file modified inst/Cores/THREEPINES/THREEPINES.csv
100644 → 100755
Empty file.
Empty file modified inst/Cores/THREEPINES/THREEPINES_depths.txt
100644 → 100755
Empty file.
Empty file modified inst/crystal.tlx
100644 → 100755
Empty file.
Empty file modified inst/img/histogramplot.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified inst/img/inkspot_neotoma.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified inst/img/mammothsites.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified man/Stratiplot.download.Rd
100644 → 100755
Empty file.
Empty file modified man/Stratiplot.download_list.Rd
100644 → 100755
Empty file.
Empty file modified man/ages.Rd
100644 → 100755
Empty file.
Empty file modified man/bind.Rd
100644 → 100755
Empty file.
Empty file modified man/browse.Rd
100644 → 100755
Empty file.
Empty file modified man/browse.dataset.Rd
100644 → 100755
Empty file.
Empty file modified man/browse.dataset_list.Rd
100644 → 100755
Empty file.
Empty file modified man/browse.default.Rd
100644 → 100755
Empty file.
Empty file modified man/browse.download.Rd
100644 → 100755
Empty file.
Empty file modified man/browse.download_list.Rd
100644 → 100755
Empty file.
Empty file modified man/compile_downloads.Rd
100644 → 100755
Empty file.
Empty file modified man/compile_taxa.Rd
100644 → 100755
Empty file.
Empty file modified man/counts.Rd
100644 → 100755
Empty file.
Empty file modified man/depths.Rd
100644 → 100755
Empty file.
Empty file modified man/download.Rd
100644 → 100755
Empty file.
Empty file modified man/get_chroncontrol.Rd
100644 → 100755
Empty file.
Empty file modified man/get_chroncontrol.dataset.Rd
100644 → 100755
Empty file.
Empty file modified man/get_chroncontrol.dataset_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_chroncontrol.default.Rd
100644 → 100755
Empty file.
Empty file modified man/get_chroncontrol.download.Rd
100644 → 100755
Empty file.
Empty file modified man/get_chroncontrol.download_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_closest.Rd
100644 → 100755
Empty file.
Empty file modified man/get_contact.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.default.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.download.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.download_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.geochronologic.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.geochronologic_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_dataset.site.Rd
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions man/get_download.Rd
100644 → 100755

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

Empty file modified man/get_download.dataset.Rd
100644 → 100755
Empty file.
Empty file modified man/get_download.dataset_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_download.default.Rd
100644 → 100755
Empty file.
Empty file modified man/get_download.site.Rd
100644 → 100755
Empty file.
Empty file modified man/get_geochron.Rd
100644 → 100755
Empty file.
Empty file modified man/get_publication.Rd
100644 → 100755
Empty file.
Empty file modified man/get_publication.dataset.Rd
100644 → 100755
Empty file.
Empty file modified man/get_publication.dataset_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_publication.default.Rd
100644 → 100755
Empty file.
Empty file modified man/get_publication.download.Rd
100644 → 100755
Empty file.
Empty file modified man/get_publication.download_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.dataset.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.dataset_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.default.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.download.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.download_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.geochronologic.Rd
100644 → 100755
Empty file.
Empty file modified man/get_site.geochronologic_list.Rd
100644 → 100755
Empty file.
Empty file modified man/get_table.Rd
100644 → 100755
Empty file.
Empty file modified man/get_taxa.Rd
100644 → 100755
Empty file.
Empty file modified man/gp.table.Rd
100644 → 100755
Empty file.
Empty file modified man/param_check.Rd
100644 → 100755
Empty file.
Empty file modified man/plot_leaflet.Rd
100644 → 100755
Empty file.
Empty file modified man/pollen.equiv.Rd
100644 → 100755
Empty file.
Empty file modified man/read.tilia.Rd
100644 → 100755
Empty file.
Empty file modified man/read_bacon.Rd
100644 → 100755
Empty file.
Empty file modified man/taxa.Rd
100644 → 100755
Empty file.
Empty file modified man/taxon.list.Rd
100644 → 100755
Empty file.
Empty file modified man/translate.table.Rd
100644 → 100755
Empty file.
Empty file modified man/write_agefile.Rd
100644 → 100755
Empty file.
Empty file modified package_check.R
100644 → 100755
Empty file.
Empty file modified revdep/.gitignore
100644 → 100755
Empty file.
Empty file modified revdep/check.R
100644 → 100755
Empty file.
Empty file modified tests/.gitignore
100644 → 100755
Empty file.
Empty file modified tests/local_dont_run/download_tester.R
100644 → 100755
Empty file.
Empty file modified tests/local_dont_run/error_tests.RDS
100644 → 100755
Empty file.
Empty file modified tests/test-all.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_examples.R
100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions tests/testthat/test_neotoma.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
# library("testthat")
# library("neotoma")
#
# context('Get closest is working')
# test_that('the right number of samples are returned',
# {
# cl_smp <- get_closest(x = c(-89.4012, 43.0731), n = 5, buffer = 5, datasettype = "pollen")
# expect_is(cl_smp, 'dataset_list')
# expect_equal(length(cl_smp), 5)
# })
#
# context('The API itself is working properly')
# test_that('The API is returning data as expected from its documentation',
# {
Expand Down Expand Up @@ -136,6 +144,8 @@
# expect_is(compile_downloads(get_download(4559:4564)), 'data.frame')
# expect_is(compile_taxa(get_download(100), 'P25'), 'download_list')
# expect_is(compile_taxa(get_download(100)[[1]], 'P25'), 'download')
# expect_equal(nrow(compile_downloads(get_download(4565))), 1)
#
# })
#
# #-----------------------------------------------------
Expand Down
Empty file modified tests/testthat/test_simple_paper.R
100644 → 100755
Empty file.

0 comments on commit b85dfda

Please sign in to comment.