Hemken / Statamarkdown

Functions to write Stata documentation with knitr
Other
59 stars 11 forks source link

Statamarkdown shows no output #13

Closed christian-engels closed 3 years ago

christian-engels commented 3 years ago

I really love Statamarkdown, but unfortunately on my new computer it does not show any output when I compile the R markdown document.

This is the output that R.version gives me:

platform x86_64-apple-darwin17.0
arch x86_64
os darwin17.0
system x86_64, darwin17.0
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10) nickname Bunny-Wunnies Freak Out

And this is an example code that is not working:

library(Statamarkdown)
statapath <- find_stata()
knitr::opts_chunk$set(engine.path=list(stata=statapath), comment=NA)
sysuse auto
summarize

Any help you could give would be greatly appreciated.

Thanks, Christian

Hemken commented 3 years ago

There are no error messages?

Could you give me a copy of the whole Rmarkdown file?

From: Christian Engels notifications@github.com Sent: Thursday, November 26, 2020 5:28 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

I really love Statamarkdown, but unfortunately on my new computer it does not show any output when I compile the R markdown document.

This is the output that R.version gives me:

platform x86_64-apple-darwin17.0 arch x86_64 os darwin17.0 system x86_64, darwin17.0 status major 4 minor 0.3 year 2020 month 10 day 10 svn rev 79318 language R version.string R version 4.0.3 (2020-10-10) nickname Bunny-Wunnies Freak Out

And this is an example code that is not working:

library(Statamarkdown)

statapath <- find_stata()

knitr::opts_chunk$set(engine.path=list(stata=statapath), comment=NA)

sysuse auto

summarize

Any help you could give would be greatly appreciated.

Thanks, Christian

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME6XC4PTVV2UIP55ZVDSRY3SXANCNFSM4UDTM5VQ.

christian-engels commented 3 years ago

Yes, no error messages. I attach both the markdown file and the html output. Thanks for looking into this. markdown_example.zip

Hemken commented 3 years ago

Really strange.

What versions of the following are you using? Statamarkdown Knitr RStudio

For some reason, your document is compiling for me, but not showing up in the RStudio preview window. That is, I get the proper HTML file saved on my computer, but an error message when RStudio tries to show it to me. I am using

Statamarkdown 0.5.4 Knitr 1.28 Rstudio 1.3.959 Windows 10

From: Christian Engels notifications@github.com Sent: Thursday, November 26, 2020 6:16 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Yes, no error messages. I attach both the markdown file and the html output. Thanks for looking into this. markdown_example.ziphttps://github.com/Hemken/Statamarkdown/files/5602871/markdown_example.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734265127, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME4Q5FPE2PDDGG4JONTSRZBJHANCNFSM4UDTM5VQ.

christian-engels commented 3 years ago

Statamarkdown 0.5.0 Knitr 1.30 RStudio 1.3.1093 macOS Catalina 10.15.7

I also tried with Statamarkdown 0.5.4 but no output there too.

Hemken commented 3 years ago

Please continue to use Statamarkdown 0.5.4

Your HTML file shows that you have the Stata executable installed, and that Statamarkdown can find it. Open Stata and verify that these commands produce the appropriate output there.

When you knit the document in RStudio, some messages appear in the R Markdown tab in RStudio – can you send me those?

From: Christian Engels notifications@github.com Sent: Thursday, November 26, 2020 7:44 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Statamarkdown 0.5.0 Knitr 1.30 RStudio 1.3.1093 macOS Catalina 10.15.7

I also tried with Statamarkdown 0.5.4 but no output there too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734305746, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBMEZ73DD6LBICCMB5TWTSRZLQPANCNFSM4UDTM5VQ.

christian-engels commented 3 years ago

Stata does indeed produce the correct output. Here's the output from the R Markdown tab.

R_Markdown_output.txt

Hemken commented 3 years ago

I expect to see something more like this:

running: C:/Program Files/Stata16/StataSE-64.exe /q /e do "C:\Users\Doug\Documents\R\stata5102a076954.do"

stata output from chunk unnamed-chunk-1 output file: Statamarkdown_example_no_output.knit.md

I think that might be telling me no log file is being read back into Stata.

Can we try a different version of your file, see attached. This should save a do file, a log file, and the markdown file.

From: Christian Engels notifications@github.com Sent: Thursday, November 26, 2020 8:20 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Stata does indeed produce the correct output. Here's the output from the R Markdown tab.

R_Markdown_output.txthttps://github.com/Hemken/Statamarkdown/files/5603509/R_Markdown_output.txt

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734323940, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2M4V6SRPFNTQ74BDDSRZPZTANCNFSM4UDTM5VQ.

christian-engels commented 3 years ago

I am afraid I cannot see your attachment. I added savedo=TRUE to the stata chunk and it created a do file but no log file. Is that what you were after? EDIT: here is the RMarkdown tab output: R_Markdown_output_savedo_TRUE.txt

remlapmot commented 3 years ago

I think you are running on macOS, which version are you on?

On 12th November Apple had a problem that programs were taking a long time to launch because of some kind of security server taking longer than usual to respond, e.g. as described here.

So I am wondering if this is the same issue, i.e. the Stata binary is just taking too long to launch and hence you see no output because it never makes it.

But this is just speculative.

I don't have a mac anymore, so can't investigate myself.

Hemken commented 3 years ago

Thanks, Tom. Christian, that is what I wanted to know, and it fits with Tom’s idea. Can you go to a Terminal and see what happens when you run Stata in batch mode?


From: Tom Palmer notifications@github.com Sent: Thursday, November 26, 2020 8:57:31 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

I think you are running on macOS, which version are you on?

On 12th November Apple had a problem that programs were taking a long time to launch because of some kind of security server taking longer than usual to respond, e.g. as described herehttps://www.theverge.com/2020/11/12/21563092/apple-mac-apps-load-slow-big-sur-downloads-outage-down-issues.

So I am wondering if this is the same issue, i.e. the Stata binary is just taking too long to launch and hence you see no output because it never makes it.

But this is just speculative.

I don't have a mac anymore, so can't investigate myself.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734343420, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME4MQIXFZWYOHJFCC7TSRZUFXANCNFSM4UDTM5VQ.

Hemken commented 3 years ago

The article suggests disconnecting from the internet. Do that and try knitting from RStudio?


From: Doug Hemken dehemken@wisc.edu Sent: Thursday, November 26, 2020 9:02:03 AM To: Hemken/Statamarkdown reply@reply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Thanks, Tom. Christian, that is what I wanted to know, and it fits with Tom’s idea. Can you go to a Terminal and see what happens when you run Stata in batch mode?


From: Tom Palmer notifications@github.com Sent: Thursday, November 26, 2020 8:57:31 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

I think you are running on macOS, which version are you on?

On 12th November Apple had a problem that programs were taking a long time to launch because of some kind of security server taking longer than usual to respond, e.g. as described herehttps://www.theverge.com/2020/11/12/21563092/apple-mac-apps-load-slow-big-sur-downloads-outage-down-issues.

So I am wondering if this is the same issue, i.e. the Stata binary is just taking too long to launch and hence you see no output because it never makes it.

But this is just speculative.

I don't have a mac anymore, so can't investigate myself.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734343420, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME4MQIXFZWYOHJFCC7TSRZUFXANCNFSM4UDTM5VQ.

christian-engels commented 3 years ago

Disconnecting from the internet does not work unfortunately.

I set the working directory to the document location and tried Stata in batch mode.

This gives an error: /Applications/Stata/StataSE.app/Contents/MacOS/Stata -q -e do unnamed-chunk-1.do "zsh: no such file or directory: /Applications/Stata/StataSE.app/Contents/MacOS/Stata"

This works and creates a log file. /Applications/Stata/StataSE.app/Contents/MacOS/StataSE -q -e do unnamed-chunk-1.do

If I then knit the document, the output appears. If I delete the log file, it again disappears.

EDIT: Apologies - I thought the first one is what appears in the R Markdown tab. But it actually runs the second one (StataSE).

christian-engels commented 3 years ago

Tom, I am on MacOS Catalina version 10.15.7 (19H15).

Hemken commented 3 years ago

I think I see. In your original .rmd replace

statapath <- find_stata()

with

statapath <- “/Applications/Stata/StataSE.app/Contents/MacOS/StataSE”

and tell me that it knits.

If that works, then I made a pretty simple error in my find_stata() code.

From: Christian Engels notifications@github.com Sent: Thursday, November 26, 2020 9:36 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Disconnecting from the internet does not work unfortunately.

I set the working directory to the document location and tried Stata in batch mode.

This gives an error: /Applications/Stata/StataSE.app/Contents/MacOS/Stata -q -e do unnamed-chunk-1.do "zsh: no such file or directory: /Applications/Stata/StataSE.app/Contents/MacOS/Stata"

This works and creates a log file. /Applications/Stata/StataSE.app/Contents/MacOS/StataSE -q -e do unnamed-chunk-1.do

If I then knit the document, the output appears. If I delete the log file, it again disappears.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734364008, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2ANOFVQYJHUCTN3X3SRZYULANCNFSM4UDTM5VQ.

christian-engels commented 3 years ago

I moved my R project out of my OneDrive folder and into the standard Documents folder - that fixed the issue. Your find_stata() function works perfectly.

I did a simple check using the logged commands from the R Markdown tab. The command /Applications/Stata//StataSE.app/Contents/MacOS/StataSE -q -e do '/Users/ce50/OneDrive - University of St Andrews/MN5320/tutorials/stata14c266f92a6f.do' does not produce a log file, but this command does: /Applications/Stata/StataSE.app/Contents/MacOS/StataSE -q -e do '/Users/ce50/Documents/tutorials/unnamed-chunk-1.do'

Thanks so much that you looked into this. I really appreciate it.

Hemken commented 3 years ago

I wonder if the OneDrive is mapped as a symbolic link, and Stata is failing to find the do file in the first place?

From: Christian Engels notifications@github.com Sent: Thursday, November 26, 2020 11:12 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; Comment comment@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

I moved my R project out of my OneDrive folder and into the standard Documents folder - that fixed the issue. Your find_stata() function works perfectly.

I did a simple check and the command /Applications/Stata//StataSE.app/Contents/MacOS/StataSE -q -e do '/Users/ce50/OneDrive - University of St Andrews/MN5320/tutorials/stata14c266f92a6f.do' does not produce a log file, but this command does. /Applications/Stata/StataSE.app/Contents/MacOS/StataSE -q -e do '/Users/ce50/Documents/tutorials/unnamed-chunk-1.do'

Thanks so much that you looked into this. I really appreciate it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-734410666, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME3UCUWCTLUZVO5UOE3SR2D6RANCNFSM4UDTM5VQ.

momozinho commented 3 years ago

Hi,

I have also been experiencing the same issue with no output displayed. I have attached an .Rmd file and the output to illustrate. stata_test.zip

The errors keep occurring despite the 'stata' engine being displayed as ready to use.

I attempted to create an empty profile.do which did not help.

I was also using OneDrive, and moved my project to another location, but that did not work either.

I also attempted to manually change the path to the Stata engine (even though the find_stata() function worked).

The commands on Stata work fine.

I am using the following versions:

Looking at the Project file, I saw system log files (attached) which display an error. NRP78log.txt

I hope that my request is clear, and that I haven't missed anything obvious. Please do not hesitate to request further information. I would really appreciate your help.

Best wishes,

Mo

Hemken commented 3 years ago

Try commenting out this line:

stataexe <- "/Applications/Stata/Stata.app/Contents/MacOS/Stata"

you shouldn’t need it.

I notice that Statamarkdown reports a slightly different path? i.e. /Applications/Stata//Stata.app/Contents/MacOS/Stata

Note the doubled forward slash?

Doug Hemken

Statistical consultant Social Science Computing Cooperative Univ. of Wisc. – Madison

dehemken@wisc.edumailto:dehemken@wisc.edu 608-262-4327

From: momozinho notifications@github.com Sent: Tuesday, January 19, 2021 12:08 PM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; State change state_change@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Hi,

I have also been experiencing the same issue with no output displayed. I have attached an .Rmd file and the output to illustrate. stata_test.ziphttps://github.com/Hemken/Statamarkdown/files/5837717/stata_test.zip

The errors keep occurring despite the 'stata' engine being displayed as ready to use.

I attempted to create an empty profile.do which did not help.

I was also using OneDrive, and moved my project to another location, but that did not work either.

I also attempted to manually change the path to the Stata engine (even though the find_stata() function worked).

The commands on Stata work fine.

I am using the following versions:

Looking at the Project file, I saw system log files (attached) which display an error. NRP78log.txthttps://github.com/Hemken/Statamarkdown/files/5837730/NRP78log.txt

I hope that my request is clear, and that I haven't missed anything obvious. Please do not hesitate to request further information. I would really appreciate your help.

Best wishes,

Mo

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-763022571, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME3EUEQPID2WJF4QNADS2XC65ANCNFSM4UDTM5VQ.

Hemken commented 3 years ago

Does the NRP78 file have anything to do with this project? If so, where does it come from?

Doug Hemken

Statistical consultant Social Science Computing Cooperative Univ. of Wisc. – Madison

dehemken@wisc.edumailto:dehemken@wisc.edu 608-262-4327

From: momozinho notifications@github.com Sent: Tuesday, January 19, 2021 12:08 PM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; State change state_change@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Hi,

I have also been experiencing the same issue with no output displayed. I have attached an .Rmd file and the output to illustrate. stata_test.ziphttps://github.com/Hemken/Statamarkdown/files/5837717/stata_test.zip

The errors keep occurring despite the 'stata' engine being displayed as ready to use.

I attempted to create an empty profile.do which did not help.

I was also using OneDrive, and moved my project to another location, but that did not work either.

I also attempted to manually change the path to the Stata engine (even though the find_stata() function worked).

The commands on Stata work fine.

I am using the following versions:

Looking at the Project file, I saw system log files (attached) which display an error. NRP78log.txthttps://github.com/Hemken/Statamarkdown/files/5837730/NRP78log.txt

I hope that my request is clear, and that I haven't missed anything obvious. Please do not hesitate to request further information. I would really appreciate your help.

Best wishes,

Mo

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-763022571, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME3EUEQPID2WJF4QNADS2XC65ANCNFSM4UDTM5VQ.

Hemken commented 3 years ago

If you are running this in RStudio, is there any output in the Rmarkdown tab (next to the Console)?

Doug Hemken

Statistical consultant Social Science Computing Cooperative Univ. of Wisc. – Madison

dehemken@wisc.edumailto:dehemken@wisc.edu 608-262-4327

From: momozinho notifications@github.com Sent: Tuesday, January 19, 2021 12:08 PM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; State change state_change@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Hi,

I have also been experiencing the same issue with no output displayed. I have attached an .Rmd file and the output to illustrate. stata_test.ziphttps://github.com/Hemken/Statamarkdown/files/5837717/stata_test.zip

The errors keep occurring despite the 'stata' engine being displayed as ready to use.

I attempted to create an empty profile.do which did not help.

I was also using OneDrive, and moved my project to another location, but that did not work either.

I also attempted to manually change the path to the Stata engine (even though the find_stata() function worked).

The commands on Stata work fine.

I am using the following versions:

Looking at the Project file, I saw system log files (attached) which display an error. NRP78log.txthttps://github.com/Hemken/Statamarkdown/files/5837730/NRP78log.txt

I hope that my request is clear, and that I haven't missed anything obvious. Please do not hesitate to request further information. I would really appreciate your help.

Best wishes,

Mo

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-763022571, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME3EUEQPID2WJF4QNADS2XC65ANCNFSM4UDTM5VQ.

momozinho commented 3 years ago

Hi,

Thanks for your quick reply!

I will bulk reply to your questions and comments below:

Try commenting out this line:

stataexe <- "/Applications/Stata/Stata.app/Contents/MacOS/Stata"

you shouldn’t need it.

I removed the line and tried to run the Stata commands in chunks after only loading the Statamarkdown package, but unfortunately it doesn't work.

I notice that Statamarkdown reports a slightly different path? i.e. /Applications/Stata//Stata.app/Contents/MacOS/Stata

Note the doubled forward slash?

Yes, indeed. Although I wasn't too worried as I received a reassuring response ## The 'stata' engine is ready to use..

Does the NRP78 file have anything to do with this project? If so, where does it come from?

Nope - it doesn't exist. The name of the project starts with "NRP78". Now I feel very silly indeed, because you alerted me to the fact that the project folder and project name did not have names that were appropriate according to naming conventions ("NRP78 R workflow"). So I proceeded to change the name of the project and the folder to "NRP78_R_workflow" and re-ran the .Rmd file, and guess what - it worked!!!

Thank you so very much for your help - I look forward to seamlessly integrate some Stata functions into R!!

Very best wishes,

Mo Abbas

P.S. regarding the last question

If you are running this in RStudio, is there any output in the Rmarkdown tab (next to the Console)?

FYI here is the Rmarkdown tab output prior to resolution of the problem R_Markdown_output.txt

Hemken commented 3 years ago

Lucky clue, then!

Doug Hemken

Statistical consultant Social Science Computing Cooperative Univ. of Wisc. – Madison

dehemken@wisc.edumailto:dehemken@wisc.edu 608-262-4327

From: momozinho notifications@github.com Sent: Tuesday, January 19, 2021 1:57 PM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; State change state_change@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Hi,

Thanks for your quick reply!

I will bulk reply to your questions and comments below:

Try commenting out this line:

stataexe <- "/Applications/Stata/Stata.app/Contents/MacOS/Stata"

you shouldn’t need it.

I removed the line and tried to run the Stata commands in chunks after only loading the Statamarkdown package, but unfortunately it doesn't work.

I notice that Statamarkdown reports a slightly different path? i.e. /Applications/Stata//Stata.app/Contents/MacOS/Stata

Note the doubled forward slash?

Yes, indeed. Although I wasn't too worried as I received a reassuring response ## The 'stata' engine is ready to use..

Does the NRP78 file have anything to do with this project? If so, where does it come from?

Nope - it doesn't exist. The name of the project starts with "NRP78". Now I feel very silly indeed, because you alerted me to the fact that the project folder and project name did not have names that were appropriate according to naming conventions ("NRP78 R workflow"). So I proceeded to change the name of the project and the folder to "NRP78_R_workflow" and re-ran the .Rmd file, and guess what - it worked!!!

Thank you so very much for your help - I look forward to seamlessly integrate some Stata functions into R!!

Very best wishes,

Mo Abbas

P.S. regarding the last question

If you are running this in RStudio, is there any output in the Rmarkdown tab (next to the Console)?

FYI here is the Rmarkdown tab output prior to resolution of the problem R_Markdown_output.txthttps://github.com/Hemken/Statamarkdown/files/5838261/R_Markdown_output.txt

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-763090734, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2G4IGBOEJCNRZGJODS2XPXBANCNFSM4UDTM5VQ.

kennchua commented 3 years ago

Hello, I wanted to echo that I was experiencing the same issue when working with an Rmd document stored in Google Drive (file stream; also on MacOS). When I run the same Rmd on a local folder (e.g. Desktop / Documents), the Stata output displays correctly. Is there a fix for Rmd files on the cloud?

Hemken commented 3 years ago

It helps me to decipher new problems if they are posted as new issues, rather than being tagged onto closed issues.

As Statamarkdown (i.e. knitr, with a Stata engine) processes a file, intermediate files are created at several points in the process. Knitr extracts Stata code, code block by code block, and saves these as “do” files. Each “do” file is processed as a separate Stata batch job, producing a Stata “log” file. Each Stata “log” is imported back into knitr and post-processed to produce the output you see in your document.

Both of these files – “do” and “log” – are saved beside your original Statamarkdown document.

If knitr is unable to find the Stata executable, or if Stata does not find the “do” file, or if Stata does not produce a “log” file in the correct folder, then you will have no output in your document. The output from knitr processing (in RStudio this shows up in a separate Rmarkdown tab beside the Console) can provide clues about where your processing is breaking down.

I have little ability to troubleshoot how cloud drives are mapped on other people’s computers, and little experience working on Macs. If you send me the Rmarkdown messages, I may be able to spot something. Sorry I can’t be of more help.

Doug Hemken

Statistical consultant Social Science Computing Cooperative Univ. of Wisc. – Madison

dehemken@wisc.edumailto:dehemken@wisc.edu 608-262-4327

From: knnchua notifications@github.com Sent: Saturday, February 13, 2021 10:42 PM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Doug Hemken dehemken@wisc.edu; State change state_change@noreply.github.com Subject: Re: [Hemken/Statamarkdown] Statamarkdown shows no output (#13)

Hello, I wanted to echo that I was experiencing the same issue when working with an Rmd document stored in Google Drive (file stream; also on MacOS). When I run the same Rmd locally (on Desktop / Documents), the STATA output displays correctly. Is there any fix for Rmd files stored on the cloud?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/13#issuecomment-778723847, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME4KUT3HF3CQZOM3R53S65IBPANCNFSM4UDTM5VQ.