Learn R Programming

malariaAtlas (version 0.0.4)

isAvailable_vec: Check whether Vector Occurrence points are available for a given location

Description

isAvailable_vec checks whether the MAP database contains Vector Occurrence points for the specified country/location.

Usage

isAvailable_vec(sourcedata = "vector points", country = NULL, ISO = NULL,
  continent = NULL, full_results = FALSE)

Arguments

sourcedata

by default this is "vector points", highlighting the dataset to be searched

country

string containing name of desired country, e.g. c("Country1", "Country2", ...) (use one of country OR ISO OR continent, not combined)

ISO

string containing ISO3 code for desired country, e.g. c("XXX", "YYY", ...) (use one of country OR ISO OR continent, not combined)

continent

string containing name of continent for desired data, e.g. c("Continent1", "Continent2", ...)(use one of country OR ISO OR continent, not combined)

full_results

By default this is FALSE meaning the function only gives a message outlining whether specified country is available, if full_results == TRUE, the function returns a named list outlining data availability.

Value

isAvailable_Vec returns a named list of input locations with information regarding data availability.

if full_results == TRUE, a named list is returned with the following elements:

  1. location - specified input locations

  2. is_available- 1 or 0; indicating whether data is available for this location

  3. possible_match- agrep-matched country names indicating potential mispellings of countries where is_available == 0; NA if data is available for this location.

Examples

Run this code
# NOT RUN {
isAvailable_vec(country = "Suriname")
x <- isAvailable_vec(ISO = "NGA", full_results = TRUE)
x <- isAvailable_vec(continent = "Oceania", full_results = TRUE)
# }

Run the code above in your browser using DataLab