Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Feb 19, 2015
1 parent 5ff0411 commit 63ca1e3
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
9 changes: 9 additions & 0 deletions R/locations.R
@@ -1,3 +1,5 @@
## Consider information from: Countries | FAO areas | Ecosystems | Occurrences | Point map | Introductions | Faunaf

#' locations
#'
#' return a table of species locations as reported in FishBASE.org FAO location data
Expand All @@ -7,6 +9,8 @@
#' @export
#' @examples
#' locations(species_list(Genus='Labroides'))
#' @details currently this is ~ FAO areas table (minus "note" field)
#' e.g. http://www.fishbase.us/Country/FaoAreaList.php?ID=5537
locations <- function(species_list, server = SERVER, limit = 100){
codes <- speccodes(species_list)
bind_rows(lapply(codes, faoareas))
Expand Down Expand Up @@ -36,3 +40,8 @@ faoarrefs <- function(area_code, server = SERVER, limit = 100){
data <- check_and_parse(resp)
}



## FIXME: Reproduce the ECOSYSTEMS table:
# see `ecosystems` sql-table
# http://www.fishbase.us/trophiceco/EcosysList.php?ID=5537
1 change: 0 additions & 1 deletion R/species_info.R
Expand Up @@ -2,7 +2,6 @@
#'
#' Provide wrapper to work with species lists.
#' @param species_list A vector of scientific names (each element as "genus species").
#' (FishBase SpecCodes can be given as numeric values in place of a scientific name.)
#' @param limit The maximum number of matches from a single API call (e.g. per species). Function
#' will warn if this needs to be increased, otherwise can be left as is.
#' @param server base URL to the FishBase API, should leave as default.
Expand Down
3 changes: 1 addition & 2 deletions man/commonnames.Rd
Expand Up @@ -8,8 +8,7 @@ commonnames(species_list, limit = 100, server = SERVER,
fields = c("ComName", "Language", "C_Code", "SpecCode"))
}
\arguments{
\item{species_list}{A vector of scientific names (each element as "genus species").
(FishBase SpecCodes can be given as numeric values in place of a scientific name.)}
\item{species_list}{A vector of scientific names (each element as "genus species").}

\item{limit}{The maximum number of matches from a single API call (e.g. per species). Function
will warn if this needs to be increased, otherwise can be left as is.}
Expand Down
3 changes: 1 addition & 2 deletions man/ecology.Rd
Expand Up @@ -7,8 +7,7 @@
ecology(species_list, server = SERVER, limit = 100, fields = NULL)
}
\arguments{
\item{species_list}{A vector of scientific names (each element as "genus species").
(FishBase SpecCodes can be given as numeric values in place of a scientific name.)}
\item{species_list}{A vector of scientific names (each element as "genus species").}

\item{server}{base URL to the FishBase API, should leave as default.}

Expand Down
7 changes: 5 additions & 2 deletions man/locations.Rd
Expand Up @@ -7,8 +7,7 @@
locations(species_list, server = SERVER, limit = 100)
}
\arguments{
\item{species_list}{A vector of scientific names (each element as "genus species").
(FishBase SpecCodes can be given as numeric values in place of a scientific name.)}
\item{species_list}{A vector of scientific names (each element as "genus species").}

\item{server}{base URL to the FishBase API, should leave as default.}

Expand All @@ -18,6 +17,10 @@ will warn if this needs to be increased, otherwise can be left as is.}
\description{
return a table of species locations as reported in FishBASE.org FAO location data
}
\details{
currently this is ~ FAO areas table (minus "note" field)
e.g. http://www.fishbase.us/Country/FaoAreaList.php?ID=5537
}
\examples{
locations(species_list(Genus='Labroides'))
}
Expand Down
3 changes: 1 addition & 2 deletions man/species_info.Rd
Expand Up @@ -7,8 +7,7 @@
species_info(species_list, server = SERVER, limit = 100, fields = NULL)
}
\arguments{
\item{species_list}{A vector of scientific names (each element as "genus species").
(FishBase SpecCodes can be given as numeric values in place of a scientific name.)}
\item{species_list}{A vector of scientific names (each element as "genus species").}

\item{server}{base URL to the FishBase API, should leave as default.}

Expand Down
3 changes: 1 addition & 2 deletions man/synonyms.Rd
Expand Up @@ -9,8 +9,7 @@ synonyms(species_list, limit = 50, server = SERVER, fields = c("SynGenus",
"SpecCode", "SynCode", "CoL_ID", "TSN", "WoRMS_ID"))
}
\arguments{
\item{species_list}{A vector of scientific names (each element as "genus species").
(FishBase SpecCodes can be given as numeric values in place of a scientific name.)}
\item{species_list}{A vector of scientific names (each element as "genus species").}

\item{limit}{The maximum number of matches from a single API call (e.g. per species). Function
will warn if this needs to be increased, otherwise can be left as is.}
Expand Down

0 comments on commit 63ca1e3

Please sign in to comment.