Learn R Programming

geostats (version 1.6)

countQuakes: count the number of earthquakes per year

Description

Counts the number of earthquakes per year that fall within a certain time interval.

Usage

countQuakes(qdat, minmag, from, to)

Value

a table with the number of earthquakes per year

Arguments

qdat

a data frame containing columns named mag and year.

minmag

minimum magnitude

from

first year

to

last year

Examples

Run this code
data(declustered,package='geostats')
quakesperyear <- countQuakes(declustered,minmag=5.0,from=1917,to=2016)
table(quakesperyear)

Run the code above in your browser using DataLab