### Install devtools package Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Install the devtools package, which is required for installing packages from GitHub. ```R install.packages("devtools") ``` -------------------------------- ### R - Get interactions by source taxon Source: https://docs.ropensci.org/rglobi/reference/get_interactions_by_taxa.html Retrieves all interactions where 'Rattus' is the source taxon. This is a basic usage example to get a broad overview of interactions. ```r # \donttest{ get_interactions_by_taxa(sourcetaxon = "Rattus") #> Error: cannot open the connection # } ``` -------------------------------- ### Get all interaction areas Source: https://docs.ropensci.org/rglobi/reference/get_interaction_areas.html Retrieves all interaction areas from the database. This is a basic usage example. ```r if (FALSE) { # interactive() get_interaction_areas () } ``` -------------------------------- ### Example Usage of get_interaction_matrix Source: https://docs.ropensci.org/rglobi/reference/get_interaction_matrix.html Demonstrates how to call `get_interaction_matrix` with specific source and target taxa and an interaction type. Note: This example may produce an error if a connection cannot be established. ```R # \donttest{ get_interaction_matrix("Homo sapiens", "Mammalia", "interactsWith") #> Error: cannot open the connection # } ``` -------------------------------- ### Get Predators of a Specific Taxon Source: https://docs.ropensci.org/rglobi/reference/get_predators_of.html Demonstrates how to use the `get_predators_of` function to find predators of 'Rattus rattus'. Note that this example may produce an error if a connection to the API cannot be established. ```r get_predators_of("Rattus rattus") #> Error: cannot open the connection ``` -------------------------------- ### Install rglobi from CRAN Source: https://docs.ropensci.org/rglobi/index.html Use this command to install the stable version of the rglobi package from the Comprehensive R Archive Network (CRAN). ```R install.packages("rglobi") ``` -------------------------------- ### Install rglobi Development Version Source: https://docs.ropensci.org/rglobi/index.html Install the latest development version of the rglobi package from GitHub using the devtools package. This is useful for accessing the newest features or bug fixes. ```R install.packages("devtools") devtools::install_github("ropensci/rglobi") ``` -------------------------------- ### Get Predators for a Broader Taxon Source: https://docs.ropensci.org/rglobi/reference/get_predators_of.html Shows how to use `get_predators_of` for a broader taxonomic group like 'Primates'. Similar to the specific taxon example, this may result in an error if the API connection fails. ```r get_predators_of("Primates") #> Error: cannot open the connection ``` -------------------------------- ### Get Species Interactions by Type - R Source: https://docs.ropensci.org/rglobi/reference/get_interactions_by_type.html Fetches species interactions for one or more specified interaction types. Ensure the GloBI API is accessible; examples may show connection errors if the service is unavailable. ```R # \donttest{ get_interactions_by_type(interactiontype = c("eats", "eatenBy")) #> Error: cannot open the connection get_interactions_by_type(interactiontype = "parasiteOf") #> Error: cannot open the connection # } ``` -------------------------------- ### Get Prey List for a Predator Taxon - R Source: https://docs.ropensci.org/rglobi/reference/get_prey_of.html Use this function to retrieve a list of prey for a specified predator taxon. Ensure you have the necessary setup for API calls. ```R get_prey_of(taxon = "Homo sapiens", ...) ``` ```R # \donttest{ get_prey_of("Homo sapiens") #> Error: cannot open the connection get_prey_of("Primates") #> Error: cannot open the connection # } ``` -------------------------------- ### Get Interaction Matrix Function Signature Source: https://docs.ropensci.org/rglobi/reference/get_interaction_matrix.html This is the signature for the `get_interaction_matrix` function, showing its default parameters and expected input types. ```R get_interaction_matrix( source.taxon.names = list("Homo sapiens"), target.taxon.names = list("Mammalia"), interaction.type = "eats", opts = list(), read_csv = read_csv_online ) ``` -------------------------------- ### Get Interactions for a Source Taxon Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Retrieves all interactions where a specified taxon is the source. Use `head()` to display the first few rows of the resulting data frame. ```r rattus <- get_interactions_by_taxa(sourcetaxon = "Rattus") head(rattus) ``` -------------------------------- ### Get interactions within a bounding box Source: https://docs.ropensci.org/rglobi/reference/get_interactions_in_area.html Use this function to retrieve all interactions within a specified geographic bounding box. The coordinates should be in EPSG:4326 decimal degrees format. The example shows a typical usage, but it may error if the connection to the API fails. ```r # \donttest{ get_interactions_in_area(bbox = c(-67.87, 12.79, -57.08, 23.32)) #> Error: cannot open the connection # } ``` -------------------------------- ### Get Predators Of Source: https://docs.ropensci.org/rglobi/reference/get_predators_of.html Fetches a list of predators for a specified prey taxon. The function queries the GloBI API to find all recorded interactions where the given taxon is prey. ```APIDOC ## get_predators_of ### Description Retrieves a list of predators for a given prey taxon from the Global Biotic Interactions (GloBI) database. ### Usage ```R get_predators_of(taxon = "Rattus rattus", ...) ``` ### Arguments * **taxon** (character) - The scientific name of the prey taxon. This can be any taxonomic rank (e.g., "Rattus rattus", "Decapoda"). * **...** - Additional arguments to configure the GloBI API. ### Value A list of recorded prey-predator interactions that involve the desired prey taxon. ### Examples ```R # Get predators of Rattus rattus get_predators_of("Rattus rattus") # Get predators of Primates get_predators_of("Primates") ``` ``` -------------------------------- ### R - Get interactions by source taxon with bounding box Source: https://docs.ropensci.org/rglobi/reference/get_interactions_by_taxa.html Retrieves interactions for 'Rattus rattus' within a specified geographic bounding box. This is useful for focusing on interactions in a particular region. ```r get_interactions_by_taxa(sourcetaxon = "Rattus rattus", bbox = c(-67.87,12.79,-57.08,23.32)) #> Error: cannot open the connection # } ``` -------------------------------- ### R - Get interactions by source and target taxa Source: https://docs.ropensci.org/rglobi/reference/get_interactions_by_taxa.html Retrieves interactions where 'Aves' is the source taxon and 'Rattus' is the target taxon. This helps to find specific predator-prey or host-parasite relationships. ```r get_interactions_by_taxa(sourcetaxon = "Aves", targettaxon = "Rattus") #> Error: cannot open the connection ``` -------------------------------- ### Get Supported Data Fields Source: https://docs.ropensci.org/rglobi/reference/get_data_fields.html Call this function to retrieve a data frame of all data fields supported by the GloBI database. It accepts optional configuration parameters. ```r get_data_fields() ``` -------------------------------- ### Get Prey of a Predator Taxon Source: https://docs.ropensci.org/rglobi/reference/get_prey_of.html Fetches a list of prey organisms for a specified predator taxon. This function interacts with the GloBI API to retrieve recorded predator-prey interactions. ```APIDOC ## get_prey_of ### Description Get a List of Prey for given Predator Taxon. ### Usage ```R get_prey_of(taxon = "Homo sapiens", ...) ``` ### Arguments * **taxon** (string) - Required - Scientific name of predator taxon. Can be any taxonomic rank (e.g. Homo sapiens, Animalia). * **...** - Optional - List of named options to configure GloBI API. ### Value List of recorded predator-prey interactions that involve the desired predator taxon. ### See also Other interactions: `get_interaction_matrix()`, `get_interaction_types()`, `get_interactions_by_taxa()`, `get_interactions_by_type()`, `get_interactions()`, `get_predators_of()` ### Examples ```R # \donttest{ get_prey_of("Homo sapiens") #> Error: cannot open the connection get_prey_of("Primates") #> Error: cannot open the connection # } ``` ``` -------------------------------- ### Get Interactions by Taxa with Observations Source: https://docs.ropensci.org/rglobi/index.html Fetch species interactions within a specified bounding box, filtering by source and target taxa, and return observation details including latitude and longitude. This is useful for spatial analysis of interactions. ```R obs <- get_interactions_by_taxa(sourcetaxon = "Aves", bbox=c(-125.53344800000002,32.750323,-114.74487299999998,41.574361), targettaxon = "Rodentia", returnobservations=TRUE) locations <- cbind(obs$target_taxon_name, obs$latitude, obs$longitude) ``` -------------------------------- ### Get Species Interactions - rglobi Source: https://docs.ropensci.org/rglobi/reference/get_interactions.html Retrieve species interactions for a given taxon and interaction type. Requires specifying the source taxon and the type of interaction (e.g., 'preysOn', 'parasiteOf'). ```R # get_interactions("Homo sapiens", "preysOn") # get_interactions("Insecta", "parasiteOf") ``` -------------------------------- ### Get All Interaction Types Source: https://docs.ropensci.org/rglobi/reference/get_interaction_types.html Call this function to retrieve a data frame listing all supported interaction types, their source and target roles, and their associated URIs. This is useful for understanding the scope of interactions available in the GloBI database. ```R # \donttest{ get_interaction_types() #> interaction source target #> 1 eats consumer food #> 2 eatenBy food consumer #> 3 preysOn predator prey #> 4 preyedUponBy prey predator #> 5 kills killer victim #> 6 killedBy victim killer #> 7 parasiteOf parasite host #> 8 hasParasite host parasite #> 9 endoparasiteOf endoparasite host #> 10 hasEndoparasite host endoparasite #> 11 ectoparasiteOf ectoparasite host #> 12 hasEctoparasite host ectoparasite #> 13 parasitoidOf parasitoid host #> 14 hasParasitoid host parasitoid #> 15 hostOf host symbiont #> 16 hasHost symbiont host #> 17 pollinates pollinator plant #> 18 pollinatedBy plant pollinator #> 19 pathogenOf pathogen host #> 20 allelopathOf pathogen host #> 21 hasPathogen host pathogen #> 22 vectorOf vector pathogen #> 23 hasVector pathogen vector #> 24 dispersalVectorOf vector seed #> 25 hasDispersalVector seed vector #> 26 rootparasiteOf parasite plantRoot #> 27 hemiparasiteOf parasite plant #> 28 hasHabitat inhabitant habitat #> 29 createsHabitatFor habitat inhabitant #> 30 epiphyteOf plant/algae host plant #> 31 hasEpiphyte plant plant/algae #> 32 ectomycorrhizalHostOf plant root fungus #> 33 hasEctomycorrhizalHost fungus plant root #> 34 arbuscularMycorrhizalHostOf plant root fungus #> 35 hasArbuscularMycorrhizalHost fungus plant root #> 36 providesNutrientsFor host consumer #> 37 acquiresNutrientsFrom consumer host #> 38 symbiontOf symbiont symbiont #> 39 mutualistOf mutualist mutualist #> 40 commensalistOf commensalist commensalist #> 41 flowersVisitedBy plant visitor #> 42 visitsFlowersOf visitor plant #> 43 visitedBy host visitor #> 44 visits visitor host #> 45 ecologicallyRelatedTo source target #> 46 coOccursWith source target #> 47 coRoostsWith source target #> 48 interactsWith source target #> 49 adjacentTo source target #> termIRI #> 1 http://purl.obolibrary.org/obo/RO_0002470 #> 2 http://purl.obolibrary.org/obo/RO_0002471 #> 3 http://purl.obolibrary.org/obo/RO_0002439 #> 4 http://purl.obolibrary.org/obo/RO_0002458 #> 5 http://purl.obolibrary.org/obo/RO_0002626 #> 6 http://purl.obolibrary.org/obo/RO_0002627 #> 7 http://purl.obolibrary.org/obo/RO_0002444 #> 8 http://purl.obolibrary.org/obo/RO_0002445 #> 9 http://purl.obolibrary.org/obo/RO_0002634 #> 10 http://purl.obolibrary.org/obo/RO_0002635 #> 11 http://purl.obolibrary.org/obo/RO_0002632 #> 12 http://purl.obolibrary.org/obo/RO_0002633 #> 13 http://purl.obolibrary.org/obo/RO_0002208 #> 14 http://purl.obolibrary.org/obo/RO_0002209 #> 15 http://purl.obolibrary.org/obo/RO_0002453 #> 16 http://purl.obolibrary.org/obo/RO_0002454 #> 17 http://purl.obolibrary.org/obo/RO_0002455 #> 18 http://purl.obolibrary.org/obo/RO_0002456 #> 19 http://purl.obolibrary.org/obo/RO_0002556 #> 20 http://purl.obolibrary.org/obo/RO_0002555 #> 21 http://purl.obolibrary.org/obo/RO_0002557 #> 22 http://purl.obolibrary.org/obo/RO_0002459 ``` -------------------------------- ### Get Prey of a Species Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Use `get_prey_of()` to retrieve a list of species that are prey to a given species. The output includes detailed taxonomic information for both source and target species. ```r hsapiens <- get_prey_of("Homo sapiens") head(hsapiens) ``` -------------------------------- ### Get Interaction Matrix Function Source: https://docs.ropensci.org/rglobi/reference/get_interaction_matrix.html Constructs an interaction matrix indicating whether source taxa (rows) or target taxa (columns) are known to interact with a given type. ```APIDOC ## get_interaction_matrix ### Description Constructs an interaction matrix indicating whether source taxa (rows) or target taxa (columns) are known to interact with a given type. ### Usage ```R get_interaction_matrix( source.taxon.names = list("Homo sapiens"), target.taxon.names = list("Mammalia"), interaction.type = "eats", opts = list(), read_csv = read_csv_online ) ``` ### Arguments * **source.taxon.names** (list) - List of source taxon names (e.g. list('Mammalia', 'Aves', 'Ariopsis felis')) * **target.taxon.names** (list) - List of target taxon names * **interaction.type** (string) - The preferred interaction type (e.g. preysOn) * **opts** (list) - List of options to configure GloBI API * **read_csv** (function) - Function used to find csv associated to query url, defaulting to online query method ### Value Matrix representing species interactions between source and target taxa ### Examples ```R # \donttest{ get_interaction_matrix("Homo sapiens", "Mammalia", "interactsWith") #> Error: cannot open the connection # } ``` ``` -------------------------------- ### Get Interactions with Source, Target, and Bounding Box Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Retrieves interactions between a source taxon and a target taxon within a specified geographic bounding box. The bounding box coordinates are in decimal degrees (EPSG:4326) and follow the order: west, south, east, north. ```r aves_crustacea_northern_hemisphere <- get_interactions_by_taxa( sourcetaxon = "Aves", targettaxon = "Crustacea", bbox=c(-180, 0, 180, 90 )) head(aves_crustacea_northern_hemisphere) ``` -------------------------------- ### Get interaction areas within a bounding box Source: https://docs.ropensci.org/rglobi/reference/get_interaction_areas.html Retrieves interaction areas within a specified bounding box defined by coordinates. The coordinates are in EPSG:4326 decimal degrees format: left, bottom, right, top. ```r if (FALSE) { # interactive() get_interaction_areas (bbox=c(-67.87,12.79,-57.08,23.32)) } ``` -------------------------------- ### Get Interaction Types Source: https://docs.ropensci.org/rglobi/reference/get_interaction_types.html Retrieves a data frame containing all supported interaction types in the GloBI database. This function can optionally accept a list of named options to configure the GloBI API and a custom function for reading CSV data. ```APIDOC ## Function: get_interaction_types ### Description Returns a data frame of supported interaction types from the GloBI database. ### Usage ```R get_interaction_types(opts = list(), read_csv = read_csv_online) ``` ### Arguments * `opts` (list): A list of named options to configure the GloBI API. * `read_csv` (function): The function used to find the CSV associated with a query URL. Defaults to `read_csv_online`. ### Value A data frame of supported interaction types. ### Examples ```R # Get all interaction types interaction_types <- get_interaction_types() print(interaction_types) ``` ``` -------------------------------- ### Generate Documentation with roxygen2 Source: https://docs.ropensci.org/rglobi/index.html Use roxygen2 to generate the package's documentation files (.Rd) and NAMESPACE file. This is a standard step in R package development for creating help pages. ```R library(roxygen2) roxygenize(".") ``` -------------------------------- ### Load rglobi library Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Load the rglobi library into the R session to make its functions available. ```R library("rglobi") ``` -------------------------------- ### Run Package Tests Source: https://docs.ropensci.org/rglobi/index.html Execute the test suite for the rglobi package using devtools. Ensure you are in the package's root directory before running these commands. This helps verify the package's integrity. ```R # workdir should be rglobi repo root directory (check with getwd()) # install dependencies devtools::install('.') devtools::test() ``` -------------------------------- ### List Supported Interaction Types Source: https://docs.ropensci.org/rglobi/index.html Obtain a list of all interaction types that are supported by the rglobi package and can be queried. ```R get_interaction_types() ``` -------------------------------- ### Find interactions involving Homo sapiens (preysOn) Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Use the get_interactions function to find all species that 'Homo sapiens' preys on. The results are displayed using head(). ```R hsapiens <- get_interactions(taxon = "Homo sapiens", interaction.type = "preysOn") head(hsapiens) ``` -------------------------------- ### Displaying Species Occurrences Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html This snippet shows how to display the first few rows of species occurrence data, typically obtained from a search function. ```r ## Latitude Longitude ## 1 29.34695 -92.98061 ## 2 29.03260 -92.28701 ## 3 28.03673 -96.11108 ## 4 27.62409 -95.77403 ## 5 26.33146 -96.03294 ## 6 30.25024 -86.13114 ``` -------------------------------- ### BibTeX Entry for rglobi Source: https://docs.ropensci.org/rglobi/authors.html A BibTeX entry for citing the rglobi R package in academic work. ```BibTeX @Manual{ title = {rglobi: Interface to Global Biotic Interactions}, author = {Jorrit Poelen and Stephen Gosnell and Sergey Slyusarev and Helen Waters}, year = {2026}, note = {R package version 0.3.4}, url = {https://docs.ropensci.org/rglobi/}, } ``` -------------------------------- ### rglobi Package Citation Source: https://docs.ropensci.org/rglobi/authors.html This is the citation information for the rglobi R package as found in the DESCRIPTION file. ```R Poelen J, Gosnell S, Slyusarev S, Waters H (2026). _rglobi: Interface to Global Biotic Interactions_. R package version 0.3.4, https://docs.ropensci.org/rglobi/. ``` -------------------------------- ### get_interactions() Source: https://docs.ropensci.org/rglobi/reference/index.html Retrieves species interaction data directly from the GloBI database. This is a general function for fetching interaction records. ```APIDOC ## get_interactions() ### Description Get Species Interaction from GloBI. ### Function Signature `get_interactions()` ### Parameters This function may accept various parameters to filter interactions, but they are not detailed in the source. ### Returns Species interaction data. ``` -------------------------------- ### get_interactions Source: https://docs.ropensci.org/rglobi/reference/get_interactions.html Fetches species interactions from GloBI based on a specified taxon and interaction type. Additional options can be passed to configure the GloBI API. ```APIDOC ## get_interactions ### Description Retrieves species interactions between source and target taxa from the Global Biotic Interactions (GloBI) database. ### Method ``` get_interactions(taxon = "Homo sapiens", interaction.type = "preysOn", ...) ``` ### Parameters #### Arguments - **taxon** (string) - Required - Canonical scientific name of the source taxon (e.g., "Homo sapiens"). - **interaction.type** (string) - Required - The preferred interaction type (e.g., "preysOn"). - **...** - Optional - List of options to configure the GloBI API. ### Value Species interactions between source and target taxa. ### Examples ```R # \donttest{ get_interactions("Homo sapiens", "preysOn") #> Error: cannot open the connection get_interactions("Insecta", "parasiteOf") #> Error: cannot open the connection # } ``` ``` -------------------------------- ### get_interactions_in_area Source: https://docs.ropensci.org/rglobi/reference/get_interactions_in_area.html Fetches all interactions within a specified bounding box. The bounding box coordinates should be in EPSG:4326 decimal degrees format. ```APIDOC ## get_interactions_in_area ### Description Returns all interactions in the database within the area specified by the bounding box. ### Method GET ### Endpoint /interactions ### Parameters #### Query Parameters - **bbox** (numeric vector) - Required - Coordinates in EPSG:4326 decimal degrees defining "left, bottom, right, top" of the bounding box. - **...** (list) - Optional - A list of named options to configure the GloBI API. ### Response #### Success Response (200) - **data** (data.frame) - A data frame containing the interactions found within the specified area. ### Request Example ```r get_interactions_in_area(bbox = c(-67.87, 12.79, -57.08, 23.32)) ``` ### Response Example ```r # Example response structure (actual data will vary) # "sourceTaxon" "targetTaxon" "sourceTaxonId" "targetTaxonId" "interactionType" "year" "month" "day" "location" "datasetId" # "Homo sapiens" "Aedes aegypti" "urn:uuid:1234" "urn:uuid:5678" "feedsOn" "2023" "10" "26" "some_location" "dataset_abc" ``` ``` -------------------------------- ### get_interaction_matrix() Source: https://docs.ropensci.org/rglobi/reference/index.html Constructs an interaction matrix that indicates the relationships between source taxa (rows) and target taxa (columns), specifying whether they are known to interact based on a given interaction type. ```APIDOC ## get_interaction_matrix() ### Description Constructs an interaction matrix indicating whether source taxa (rows) or target taxa (columns) are known to interact with a given type. ### Function Signature `get_interaction_matrix()` ### Parameters This function may accept parameters to specify interaction types or taxa, but they are not detailed in the source. ### Returns An interaction matrix. ``` -------------------------------- ### get_prey_of() Source: https://docs.ropensci.org/rglobi/reference/index.html Retrieves a list of all known prey items for a given predator taxon from the GloBI database. ```APIDOC ## get_prey_of() ### Description Get a List of Prey for given Predator Taxon. ### Function Signature `get_prey_of(predator_taxon)` ### Parameters * **predator_taxon** (character) - Required - The predator taxon for which to find prey. ``` -------------------------------- ### get_interaction_types() Source: https://docs.ropensci.org/rglobi/reference/index.html Lists all the different types of biological interactions that have been identified and cataloged within the GloBI database. ```APIDOC ## get_interaction_types() ### Description Lists interactions identified in the GloBI database. ### Function Signature `get_interaction_types()` ### Returns A list or vector of interaction type names. ``` -------------------------------- ### get_data_fields() Source: https://docs.ropensci.org/rglobi/reference/index.html Lists all available data fields that are identified within the GloBI database. This function helps users understand the types of information they can query. ```APIDOC ## get_data_fields() ### Description Lists data fields identified in the GloBI database. ### Function Signature `get_data_fields()` ### Returns A list or vector of available data field names. ``` -------------------------------- ### Find Prey of a Species Source: https://docs.ropensci.org/rglobi/index.html Retrieve a list of unique prey names for a given species. This is a shortcut for get_interactions_by_taxa when looking for prey relationships. ```R 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 ``` -------------------------------- ### get_interactions_by_taxa() Source: https://docs.ropensci.org/rglobi/reference/index.html Returns all species interactions that involve specific taxa, allowing users to query relationships for particular organisms. ```APIDOC ## get_interactions_by_taxa() ### Description Return interactions involving specific taxa. ### Function Signature `get_interactions_by_taxa(taxa)` ### Parameters * **taxa** (character or vector) - Required - The taxa for which to find interactions. ``` -------------------------------- ### List All Available Interaction Areas Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Retrieve a list of all geographic areas for which interaction data is available in GloBI. This can be useful for understanding the scope of the database. ```r areas <- get_interaction_areas() head(areas) ``` -------------------------------- ### Find Interactions in a Geographic Area using Bounding Box Source: https://docs.ropensci.org/rglobi/articles/rglobi_vignette.html Use this function to retrieve all interactions within a specified rectangular bounding box. Coordinates must be in decimal degrees (EPSG:4326) and provided as west, south, east, north. ```r gulfinteractions <- get_interactions_in_area( bbox=c(-97.0, 17.5, -81, 31)) head(gulfinteractions) ``` -------------------------------- ### get_interactions_by_type Source: https://docs.ropensci.org/rglobi/reference/get_interactions_by_type.html Fetches species interactions from the GloBI database for a given interaction type. This function allows for flexible querying by specifying one or more interaction types and can accept additional options to configure the GloBI API request. ```APIDOC ## get_interactions_by_type ### Description Retrieves species interactions from the Global Biotic Interactions (GloBI) database based on specified interaction types. ### Usage ```R get_interactions_by_type(interactiontype = c("interactsWith"), ...) ``` ### Arguments #### interactiontype - **interactiontype** (character vector) - The requested interaction type(s) (e.g., "preysOn", "parasiteOf"). Defaults to c("interactsWith"). #### ... - **...** (list) - Additional options to configure the GloBI API request. ### Value Returns species interactions matching the provided interaction type(s). ### See also Other interactions: `get_interaction_matrix()`, `get_interaction_types()`, `get_interactions_by_taxa()`, `get_interactions()`, `get_predators_of()`, `get_prey_of()` ### Examples ```R # Example 1: Get interactions for 'eats' and 'eatenBy' types # get_interactions_by_type(interactiontype = c("eats", "eatenBy")) # Example 2: Get interactions for 'parasiteOf' type # get_interactions_by_type(interactiontype = "parasiteOf") ``` ``` -------------------------------- ### get_interactions_in_area() Source: https://docs.ropensci.org/rglobi/reference/index.html Returns all species interactions that have been recorded within a specified geographical area. ```APIDOC ## get_interactions_in_area() ### Description Return all interactions in a specified area. ### Function Signature `get_interactions_in_area(area)` ### Parameters * **area** (character or spatial object) - Required - The geographical area to query for interactions. ``` -------------------------------- ### get_data_fields Source: https://docs.ropensci.org/rglobi/reference/get_data_fields.html Retrieves a data frame containing all supported data fields available in the GloBI database. This function can be configured with custom options and a specific CSV reading function. ```APIDOC ## get_data_fields ### Description Returns a data frame with supported data fields from the GloBI database. ### Usage ```R get_data_fields(opts = list(), read_csv = read_csv_online) ``` ### Arguments * **opts** (list) - A list of named options to configure the GloBI API. * **read_csv** (function) - The function used to find CSV associated with a query URL. Defaults to the online query method. ### Value Returns a data frame of supported data fields. ### Examples ```R # Example of calling the function get_data_fields() ``` ``` -------------------------------- ### get_interaction_areas Source: https://docs.ropensci.org/rglobi/reference/get_interaction_areas.html Fetches all interaction locations from the GloBI database. Users can optionally specify a bounding box to filter results or provide custom functions for reading CSV data and configuring the API. ```APIDOC ## get_interaction_areas ### Description Returns all locations (latitude,longitude) of interactions in data base or area specified in arguments. ### Usage ``` get_interaction_areas(bbox = NULL, read_csv = read_csv_online, ...) ``` ### Arguments * **bbox** (numeric vector) - Coordinates in EPSG:4326 decimal degrees defining "left, bottom, right, top" of bounding box. * **read_csv** (function) - Function used to find csv associated to query url, defaulting to online query method. * **...** - List of named options to configure GloBI API. ### Value Returns data frame of coordinates. ### Examples ```R # Get all interaction areas get_interaction_areas () # Get interaction areas within a specific bounding box get_interaction_areas (bbox=c(-67.87,12.79,-57.08,23.32)) ``` ``` -------------------------------- ### get_interactions_by_taxa Source: https://docs.ropensci.org/rglobi/reference/get_interactions_by_taxa.html Returns interactions involving specific taxa. This function allows users to query for ecological interactions by specifying source taxa, and optionally target taxa, interaction types, and spatial bounding boxes. It also supports filtering by data source and selecting specific fields to return. ```APIDOC ## Function: get_interactions_by_taxa ### Description Returns interactions involving specific taxa. Secondary (target) taxa and spatial boundaries may also be set. ### Parameters #### Arguments - **sourcetaxon** (character) - Required - Taxa of interest (consumer, predator, parasite); may be specified as "Genus species" or higher level (e.g., Genus, Family, Class). - **targettaxon** (character) - Optional - Taxa of interest (prey, host); may be specified as "Genus species" or higher level (e.g., Genus, Family, Class). - **interactiontype** (character) - Optional - Interaction types of interest (prey, host); may be specified as listed by get_interaction_types(). - **accordingto** (character) - Optional - Data source of interest. - **showfield** (list of character) - Optional - Data fields of interest (e. g. source_taxon_external_id, source_taxon_name); may be specified as listed by get_data_fields(). - **otherkeys** (list) - Optional - List of key-value pairs to query any field not covered by other parameters; keys may be specified as listed by get_data_fields(). - **bbox** (numeric vector) - Optional - Coordinates in EPSG:4326 decimal degrees defining "left, bottom, right, top" of bounding box. - **returnobservations** (logical) - Optional - If true, all individual observations are returned, else only distinct relationships. - **opts** (list) - Optional - List of named options to configure GloBI API. - **read_csv** (function) - Optional - Function used to find csv associated to query url, defaulting to online query method. ### Value Returns data frame of interactions. ### Note For data sources in which type of interactions were not specified, the interaction is labeled "interacts_with". ### See Also Other interactions: `get_interaction_matrix()`, `get_interaction_types()`, `get_interactions_by_type()`, `get_interactions()`, `get_predators_of()`, `get_prey_of()` ### Examples ```R # \donttest{ get_interactions_by_taxa(sourcetaxon = "Rattus") get_interactions_by_taxa(sourcetaxon = "Aves", targettaxon = "Rattus") get_interactions_by_taxa(sourcetaxon = "Rattus rattus", bbox = c(-67.87,12.79,-57.08,23.32)) # } ``` ``` -------------------------------- ### get_interaction_areas() Source: https://docs.ropensci.org/rglobi/reference/index.html Finds and returns the geographical locations where biological interactions have been observed and recorded in the GloBI database. ```APIDOC ## get_interaction_areas() ### Description Finds locations at which interactions were observed. ### Function Signature `get_interaction_areas()` ### Returns A list or data frame of geographical areas with observed interactions. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.