create_query: Create a weather request query string

Description Usage Arguments Value Examples

Description

Create a query string with multiple options

Usage

1
2
create_query(latitude, longitude, x = NULL, y = NULL, date = NULL,
  attribute = NULL, gdd_method = NULL)

Arguments

latitude

A decimal-formmated number indicate the latitude of a location

longitude

A decimal-formmated number indicate the longitude of a location

x

Optional, number of grids on x axis (latitude)

y

Optional, number of grids on y axis (longitude)

date

Optional, a matrix with start date, end date and plant date generated by set_date. Without given start date, the package will use Sys.Date() as a start date.

attribute

Optional, a vector with weather attributes. Generated by get_attribute. By default, it will use minTemperature, maxTemperature and precip.

gdd_method

Optional,

Value

A query object if succesful, otherwise failure

Examples

1
2
3
4
5
6
create_query(latitude, longitude)
create_query(latitude, longitude, x = 5, y = 5)
create_query(latitude, longitude, x = 5, y = 5, set_date(start_date, end_date))
create_query(latitude, longitude, date = set_date(start_date, plant_date =
plant_date), attribute = get_attribute(c("^acc", "gdd$")), gdd_method =
set_gdd(gdd_method = "modifiedstandard"))

yizhexu/weatherawhere documentation built on May 4, 2019, 5:29 p.m.