I know others have had something similar, but all their solutions didn't seem to work on what's happening with my code.
I have this code:
frq(GSS$HEALTH1)
and I've made sure the sjmisc package is installed and running for that function.
When I run that chunk on its own, I get the table.
x <integer>
# total N=5215 valid N=5215 mean=0.72 sd=1.38
Value | N | Raw % | Valid % | Cum. %
---------------------------------------
0 | 3767 | 72.23 | 72.23 | 72.23
1 | 292 | 5.60 | 5.60 | 77.83
2 | 449 | 8.61 | 8.61 | 86.44
3 | 440 | 8.44 | 8.44 | 94.88
4 | 207 | 3.97 | 3.97 | 98.85
5 | 27 | 0.52 | 0.52 | 99.37
8 | 3 | 0.06 | 0.06 | 99.42
9 | 30 | 0.58 | 0.58 | 100.00
<NA> | 0 | 0.00 | <NA> | <NA>
But when I knit, I get the following error:
Error in frq(GSS$HEALTH1) : could not find function "frq" Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval Execution halted
Anyone got thoughts to get this to run?