midpoints: Mid-point of a class

Description Usage Arguments Examples

View source: R/functions.r View source: R/midpoints.r

Description

Calculate the mid-point of a class produced by the cut() command

Usage

1
midpoints(x, dp = 2)

Arguments

x

The classes variable

dp

Integer giving the decimal digits of the output

Examples

1
2
3
4
5
6
7
8
## Load the data
data(fluxes)

## Split the wind data into 20 classes
fluxes$wind_class<-cut(fluxes$wind_dir,breaks=seq(0,365,20))

## Find the midpoint of each wind class
fluxes$wind_mid_points<-midpoints(fluxes$wind_class)

FREddyPro documentation built on May 29, 2017, 7:22 p.m.