sizefrequency: calculate the size-frequency distribution of things

View source: R/fractals.R

sizefrequencyR Documentation

calculate the size-frequency distribution of things

Description

Count the number of items exceeding a certain size.

Usage

sizefrequency(dat, n = 10, log = TRUE)

Arguments

dat

a numerical vector

n

the number of sizes to evaluate

log

logical. If TRUE, uses a log spacing for the sizes at which the frequencies are evaluated

Value

a data frame with two columns size and frequency

Examples

data(Finland,package='geostats')
sf <- sizefrequency(Finland$area)
plot(frequency~size,data=sf,log='xy')
fit <- lm(log(frequency) ~ log(size),data=sf)
lines(x=sf$size,y=exp(predict(fit)))

geostats documentation built on Jan. 7, 2023, 5:32 p.m.