knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
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"
earthquakes_energy(x, y = "erg")
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.