Learn R Programming

iwaqr (version 1.8.4)

calculate_Napercent: Calculate Na percent

Description

This function calculates the percentage of sodium (Na

Usage

calculate_Napercent(df, convert_units = FALSE)

Value

A numeric vector containing Na percent values.

Arguments

df

A dataframe containing the necessary columns.

convert_units

Logical indicating whether to convert values from mg/l to meq/l.

Examples

Run this code
df <- data.frame(Ca = c(10, 20, 30),
Mg = c(5, 10, 15),
Na = c(15, 25, 35), K = c(3, 5, 6))

calculate_Napercent(df, convert_units = TRUE)

Run the code above in your browser using DataLab