I want to use stargazer to export a table as .html:
iso <- c("AUT", "AUT", "BEG", "BEG", "BEG")
year <- c(2005, 2006, 2003, 2006, 2007)
tab1 <- table(iso, year)
stargazer(tab1, type = "html", summary = FALSE, out = "table1.html")
this gives me the following error:
Error in names(x) <- value : 'names' attribute [4] must be the same length as the vector [3]
I don't understand what this means, is it because I have 4 distinct years? How can I get the code to work?