balanced | R Documentation |
Makes a function balance the removal of NA
s across multiple input vectors.
balanced(f, ...)
f |
A function. |
... |
Deprecated. Additional arguments to |
A function like f
with a new argument na.rm
. If na.rm = TRUE
then
complete.cases()
is used to remove missing values across all inputs
prior to calling f
.
Other operators:
grouped()
,
quantity_index()
p2 <- price6[[3]]
p1 <- price6[[2]]
q2 <- quantity6[[3]]
q1 <- quantity6[[2]]
# Balance missing values for a Fisher index.
fisher <- balanced(fisher_index)
fisher(p2, p1, q2, replace(q1, 3, NA), na.rm = TRUE)
fisher_index(p2[-3], p1[-3], q2[-3], q1[-3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.