prep_climatena: Prepare data for ClimateNA

Description Usage Arguments Details Value References Examples

Description

Prepare data to query climate values using ClimateNA (>= 5.0), with required formats and column names.

Usage

1
2
3
4
5
6
7
8
9
prep_climatena(
  ID1,
  ID2 = NA,
  lat,
  long,
  el = NA,
  file = "./to_climatena.csv",
  ...
)

Arguments

ID1

vector of primary identifier values (required)

ID2

vector of secondary identifier values (optional)

lat

latitude values, in decimal degrees (required)

long

longitude values, in decimal degrees (required)

el

vector of elevation values, in meters a.s.l. (optional)

file

filename for .csv output

...

further arguments currently ignored

Details

Works with ClimateNA (Wang et al. 2016) versions >= 5.0.

Value

Writes a csv file ready for ClimateNA querying.

References

Wang, T., Hamann, A., Spittlehouse, D.L., Carroll, C. 2016. Locally downscaled and spatially customizable climate data for historical and future periods for North America. PLoS ONE 11(6).

Examples

1
2
3
4
5
6
7
data(braun)
env <- braun$env
tmp <- tempfile(fileext = '.csv')
prep_climatena(ID1=rownames(env), ID2=NA, lat=env$lat,
               long=env$lon, el=NA, file=tmp)
head(read.csv(tmp), 10)
unlink(tmp)

phytomosaic/ecole documentation built on Jan. 2, 2022, 11:24 p.m.