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])
Run the code above in your browser using DataLab