knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Description

This function calculate the energy of a magnitude earthquake in erg or juoles, and return the value of the energy. This function can be use to calculate the energy of the data.frame of the package "mxearthquakes"

Usage

earthquakes_energy(x, y = "erg")

Arguments

x a magnitude of earthquake in Richter magnitude scale

y a character to select units of energy: "erg" or "joule"

library(mxearthquakes)

Examples

earthquakes_energy(6, "erg")
earthquakes_energy(6, "joule")


ComunidadBioInfo/mxearthquakes documentation built on Oct. 30, 2019, 5:45 a.m.