amarder / stata-tutorial

MIT License
17 stars 8 forks source link

Hiding syntax of stata #1

Open nksingh62 opened 9 years ago

nksingh62 commented 9 years ago

Is there way to hide some Stata syntax (in markdown file) used in .domd file? What is rule to parse .domd file?

amarder commented 9 years ago

Currently there is no way to hide the Stata code blocks. If we wanted to follow knitr's syntax it would look something like this:

```{do, echo=FALSE}
display "Only the output of this code block will show up in the resulting markdown file."


I haven't been working on this project since R's knitr project is so good. I think implementing this functionality in Stata will be quite challenging.
nksingh62 commented 9 years ago

Whether we can use knitr in R Studio to write Stata code (like SAS code) in markdown format?

amarder commented 9 years ago

It looks like knitr version 1.10 will have a stata engine:

https://github.com/yihui/knitr/blob/master/NEWS.md#new-features

I tried using it with the development version of knitr:

devtools::install_github('yihui/knitr', build_vignettes = TRUE)

but I couldn't get it to work smoothly. I think the best long-term solution is to improve stata support in knitr.

nksingh62 commented 9 years ago

There is little chance that Stata will support Knitr for older version of Stata. Markdoc which create markdown (or .dtcx file) file for stata is working with Stata 11 and later version. Fortunately this knitr.do is free from version of Stata. I shall wait release of knitr version 1.10. Thanks