sizefrequency {geostats}R 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)))

[Package geostats version 1.6 Index]