Closed remlapmot closed 1 year ago
Thanks for the heads up
From: Tom Palmer notifications@github.com Sent: Tuesday, December 1, 2020 3:39 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Hemken/Statamarkdown] Possible problems with output from the display command in a stata chunk (#14)
I think I notice that
An example Rmd file is below - pdf output attached stmd-test.pdfhttps://github.com/Hemken/Statamarkdown/files/5621596/stmd-test.pdf
I am not sure where the error is for these, and maybe there are 2 or more little errors.
I tried to investigate
Warning messages:
1: In min(grep("[[:alnum:]]", y)) :
no non-missing arguments to min; returning Inf
I have Stata 15.1 (but don't think this is anything to do with the Stata version).
Sorry I can't propose fixes.
Example Rmd file code
title: "display command output examples"
output: pdf_document
# remotes::install_github("hemken/statamarkdown")
library(Statamarkdown)
library(sessioninfo)
Output for this chunk is missing
display "Hello 1"
Output correctly displayed with the first blank line removed
di "Hello 2"
Output from the first command omitted
di "Hello 3"
di "Hello 4"
Checking if these occur without the use of string quotes in the command
display 1
di 2
di 3
di 4
sessioninfo::session_info()
— 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/14, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2VIZ2AOX6GGB7FVATSSS2T3ANCNFSM4UIYOW5A.
Well, you’ve demonstrated that it’s not the quotes, and I can tell you that the problem is prior to the output hook.
From: Tom Palmer notifications@github.com Sent: Tuesday, December 1, 2020 3:39 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Hemken/Statamarkdown] Possible problems with output from the display command in a stata chunk (#14)
I think I notice that
An example Rmd file is below - pdf output attached stmd-test.pdfhttps://github.com/Hemken/Statamarkdown/files/5621596/stmd-test.pdf
I am not sure where the error is for these, and maybe there are 2 or more little errors.
I tried to investigate
Warning messages:
1: In min(grep("[[:alnum:]]", y)) :
no non-missing arguments to min; returning Inf
I have Stata 15.1 (but don't think this is anything to do with the Stata version).
Sorry I can't propose fixes.
Example Rmd file code
title: "display command output examples"
output: pdf_document
# remotes::install_github("hemken/statamarkdown")
library(Statamarkdown)
library(sessioninfo)
Output for this chunk is missing
display "Hello 1"
Output correctly displayed with the first blank line removed
di "Hello 2"
Output from the first command omitted
di "Hello 3"
di "Hello 4"
Checking if these occur without the use of string quotes in the command
display 1
di 2
di 3
di 4
sessioninfo::session_info()
— 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/14, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2VIZ2AOX6GGB7FVATSSS2T3ANCNFSM4UIYOW5A.
A quick work around is to have a profile.do (even an empty one). The deeper problem lies back in knitr, so I will have to get Yihui to modify a line or two of code (that I contributed – my error!)
From: Tom Palmer notifications@github.com Sent: Tuesday, December 1, 2020 3:39 AM To: Hemken/Statamarkdown Statamarkdown@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Hemken/Statamarkdown] Possible problems with output from the display command in a stata chunk (#14)
I think I notice that
An example Rmd file is below - pdf output attached stmd-test.pdfhttps://github.com/Hemken/Statamarkdown/files/5621596/stmd-test.pdf
I am not sure where the error is for these, and maybe there are 2 or more little errors.
I tried to investigate
Warning messages:
1: In min(grep("[[:alnum:]]", y)) :
no non-missing arguments to min; returning Inf
I have Stata 15.1 (but don't think this is anything to do with the Stata version).
Sorry I can't propose fixes.
Example Rmd file code
title: "display command output examples"
output: pdf_document
# remotes::install_github("hemken/statamarkdown")
library(Statamarkdown)
library(sessioninfo)
Output for this chunk is missing
display "Hello 1"
Output correctly displayed with the first blank line removed
di "Hello 2"
Output from the first command omitted
di "Hello 3"
di "Hello 4"
Checking if these occur without the use of string quotes in the command
display 1
di 2
di 3
di 4
sessioninfo::session_info()
— 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/14, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2VIZ2AOX6GGB7FVATSSS2T3ANCNFSM4UIYOW5A.
that's brilliant - thanks
Resolved in an upcoming update to knitr
Thanks indeed - I tested with the development version of knitr with your commit and this is fixed.
Thanks for closing this, I hadn't gotten around to testing this specific report myself.
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Tom Palmer @.> Sent: Thursday, January 26, 2023 7:56:52 AM To: Hemken/Statamarkdown @.> Cc: Doug Hemken @.>; Comment @.> Subject: Re: [Hemken/Statamarkdown] Possible problems with output from the display command in a stata chunk (#14)
Closed #14https://github.com/Hemken/Statamarkdown/issues/14 as completed.
— Reply to this email directly, view it on GitHubhttps://github.com/Hemken/Statamarkdown/issues/14#event-8364842079, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME4PAYUXVE3HYRC6NNTWUKGDJANCNFSM4UIYOW5A. You are receiving this because you commented.Message ID: @.***>
I think I notice that
display
command produces no outputdisplay
command produces output as expecteddisplay
command followed by subsequentdisplay
commands omits the output from the firstdisplay
command.An example Rmd file is below - pdf output attached stmd-test.pdf
I am not sure where the error is for these, and maybe there are 2 or more little errors.
I tried to investigate
at the end of
stata_engine()
, I included aprint(knitr::engine_output(options, options$code, out))
and that looks ok to me.when I include a
print(x)
at the beginning ofstataoutputhook()
there looks to be an issue relating to how character strings are parsed/joined, maybe because thedisplay
output includes string quotes.I also wondered if there was a second small error for the loss of the single/first line, and was wondering if the
firsttext
code has a problem because I see the warningI have Stata 15.1 (but don't think this is anything to do with the Stata version).
Sorry I can't propose fixes.
Example Rmd file code
Output for this chunk is missing
Output correctly displayed with the first blank line removed
Output from the first command omitted
Checking if these occur without the use of string quotes in the command