summ_half_degree: summ_half_degree

Description Usage Arguments Value Examples

Description

to summarise a half degree grid to land area, country or region, gives n, mean and percent. If you pass a 0/1 raster to it it will give the perecnt of cells that are 1. Probably should go in another package, but here for a start.

Usage

1
summ_half_degree(input, by = "region")

Arguments

input

either a raster of half degree cells or a data frame with 259200 cells in the order output by raster

by

'region', 'land' or 'country' - later can offer other options, e.g. 'continent'

Value

dataframe with results summarised by region or country

Examples

1
2
3
#summ_half_degree()
ec_out_potato <- raster(system.file("extdata", "ec_out_potato.grd", package = "climcropr"))
summ_half_degree(ec_out_potato)

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