summarise_by_lat: Summarise a 'raster' by latitude

View source: R/pretty_map_tools.R

summarise_by_latR Documentation

Summarise a raster by latitude

Description

This function summarises the values of a raster across latitudinal bands using a user-supplied function, such as mean.

Usage

summarise_by_lat(x, stat = mean)

Arguments

x

A raster.

stat

A function that summarises the values of x across latitudinal bands.

Details

This routine is implemented within add_profile_lat.

Value

The function returns a dataframe with the latitudinal coordinates of each band (‘y’) and the summary (‘stat’),

Author(s)

Edward Lavender

Examples

d <- summarise_by_lat(dat_gebco)
utils::head(d)

edwardlavender/prettyGraphics documentation built on Jan. 19, 2025, 2:47 p.m.