Closed grantmcdermott closed 2 years ago
Yeah, you can make a notes.txt
file similar to commands.txt
like this:
data_cleaning
cat_id
text to include...
And I'll make it work in the helpers.R file
great, thanks
Hmmm. I don't seem to be able to get this working. Do you mind pushing an example using this text for the collapse section.
Note: In R, any missing (i.e. "NA") values will propagate during aggregating functions. If you have NA values in your real-life dataset — we don't in this example dataset — you probably want to add
, na.rm=TRUE
to remove these on the fly. E.g.mean(var1, na.rm=TRUE)
orlapply(.SD, mean, na.rm=TRUE)
.
It shouldn't work, I haven't written any code to extract those and place them in the correct spot in the HTML code :-) But put the notes there and they will be included after that!
@kylebutts is there a way to add a (short) text block below a section? This would be useful for adding some additional context or qualifying text. E.g. In the current
collapse
section we don't usena.rm=TRUE
anywhere because it's not necessary. But I can imagine this tripping up some Stata users in RL, so a short note would be helpful.EDIT: Obvs doesn't have to be at the bottom. Just looking for some way to add text that isn't a header (maybe italics?) and lives outside of the two-column code chunks.