I've a dataset of macroeconomic data like GDP, inflation, etc... where Rows=different macroeconomic indicators and columns=years
Since some values are missing (ex: the GDP of any country in any year), they are charged as "NA".
When I perform these operations:
#
data = read.table("14varnumeros.txt", header = FALSE, sep = "", na.strings = "NA", dec = ".", strip.white = TRUE)
benford(data, number.of.digits = 1, sign = "both", discrete=TRUE, round=3)
#
It gives me this error:
Error in extract.digits(data, number.of.digits, sign, second.order, discrete = discrete, :
Data must be a numeric vector
I assume that this is because of the NA strings, but I do not know how to solve it.