get_ecocrop: get_ecocrop

Description Usage Arguments Details Examples

Description

get new ecocrop entry for a crop

Usage

1
get_ecocrop(cropname, field = NULL, ecocrop_object = FALSE)

Arguments

cropname

an ecocrop cropname

field

a field to select from the ecocrop database

ecocrop_object

whether to return results as an ecocrop object default FALSE

Details

data scraped from FAO website 2017, see scraping script in data-raw/21_ExtractEcoCropSheets.R

Examples

1
2
3
4
5
6
7
potato <- get_ecocrop('potato')
get_ecocrop('maize','phmin')
#comparing new & old versions of database
cropname <- 'maize'
library(dismo)
cropold <- dismo::getCrop(cropname)
cropnew <- get_ecocrop(cropname)

AndySouth/climcropr documentation built on May 20, 2019, 5:08 p.m.