Learn R Programming

⚠️There's a newer version (0.3.4) of this package.Take me there.

=======

R library to access species interaction data of http://globalbioticinteractions.org

To install rglobi from CRAN:

install.packages("rglobi")

Or install development version:

install.packages("devtools")
devtools::install_github("ropensci/rglobi")

Getting Data

library(rglobi)
# find all unique prey names of Homo sapiens
prey_of("Homo sapiens")$target_taxon_name
# is a shortcut of
get_interactions_by_taxa(sourcetaxon='Homo sapiens', interactiontype='preysOn')$target_taxon_name

# list of supported interactions types
get_interaction_types()

# all known prey names and locations (latitude, longitude) where birds (Aves) preyed on rodents (Rodentia) in California
obs <- get_interactions_by_taxa(sourcetaxon = "Aves", bbox=c(-125.53344800000002,32.750323,-114.74487299999998,41.574361), targettaxon = "Rodentia", returnobservations=T)
locations <- cbind(obs$target_taxon_name, obs$latitude, obs$longitude)

Please see R help pages (e.g. ?get_interactions_by_taxa and vignettes for more information.

Tests

Tests can be executed using devtools package.

# workdir should be rglobi repo root directory (check with getwd())
devtools::test()

This should reload the library, executes the test_that testcases and show test reports.

Documentation

roxygen2 is used to generate .Rd and NAMESPACE by running:

 library(roxygen2)
 roxygenize(".")

Vignettes are generated using knitr and markdown packages.

Meta

Please report any issues or bugs.

This package is part of the rOpenSci project.

Copy Link

Version

Install

install.packages('rglobi')

Monthly Downloads

228

Version

0.2.9

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jorrit Poelen

Last Published

March 8th, 2016

Functions in rglobi (0.2.9)

get_interaction_matrix

Get Interaction Matrix. Constructs an interaction matrix indicating whether source taxa (rows) or target taxa (columns) are known to interact with given type.
query

Executes a Cypher Query Against GloBI's Neo4j Instance
get_interactions_in_area

Return all interactions in specified area
get_interaction_table

Returns all known child taxa with known interaction of specified source and target taxa on any rank.
get_prey_of

Get a List of Prey for given Predator Taxon
get_predators_of

Get a List of Predators of a Given Prey Taxon
get_data_fields

List data fields identified in GloBI database
get_interactions_by_taxa

Return interactions involving specific taxa
get_child_taxa

Returns all known child taxa with known interaction of specified taxa and rank.
get_interaction_types

List interactions identified in GloBI database
get_interactions

Get Species Interaction from GloBI
get_interaction_areas

Find locations at which interactions were observed