I cant seem to get the following code chunk to work in PDF markdown, it only works in HTML. I tried re-installing latex through tinytex, but still nothing is working. Here the following error I get: Error: ncol(obj1) is not NULL or ncol(obj2) is not NULL or ncol(obj1) not equal to ncol(obj2)
This is the code chunk in question, because without this, the document knits. Thank you for any insight you might give.
SPSST %>%
tab_cells(edu.RC, race.RC, relig.RC, age.RC) %>% #rows
tab_cols(total(), income.RC) %>% #columns
tab_weight(popwght) %>% #weights
tab_stat_rpct() %>% #column percents
tab_pivot() %>% #make pivot table (think excel)
set_caption("Cross Tables of Recoded Variables (WEIGHTED)")