Returns the first element in a vector, but only if all the other elements are identical to the first one (the vector only has a zingle value). If the elements are not all identical, it throws an error. The vector must contain at least one non-na value, or the function errors out as well.
This is a useful function in aggregations when all values in a given group should be identical, but you want to make sure.
Optionally takes a na.rm parameter, similarly to sum, mean and other aggregate functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.