moles <- function(mol.weight=NULL, mass=NULL, moles=NULL)
{
if(is.null(mol.weight))
{
out <- moles*mass
}
if(is.null(mass))
{
out <- mol.weight/moles
}
if(is.null(moles))
{
out <- mass/mol.weight
}
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.