Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging in Rmd interactive: Rstudio seems to catch every print() of a data.table #124

Open
jakob-r opened this issue Jan 13, 2021 · 1 comment

Comments

@jakob-r
Copy link
Sponsor Member

jakob-r commented Jan 13, 2021

... and puts it as some weird output under a chunk in the default settings.

R Console has incomplete output:
image

Output is shown in extra items:
image

Origin:

bbotk/R/OptimInstance.R

Lines 151 to 153 in a892bae

lg$info("Result of batch %i:", self$archive$n_batch)
lg$info(capture.output(print(cbind(xdt, ydt),
class = FALSE, row.names = FALSE, print.keys = FALSE)))

This is no bug of bbotk but apparently RStudio crashes if a chunk generates many data table outputs.

It looks like the following is not getting caught:

x = capture.output(data.table:::print.data.table(data.table(1,2), class = FALSE, row.names = FALSE, print.keys = FALSE))
print(x)

as well as

x = capture.output(print.data.frame(data.table(1,2), class = FALSE, row.names = FALSE, print.keys = FALSE))
print(x)
@jakob-r
Copy link
Sponsor Member Author

jakob-r commented Jan 13, 2021

Let's see what if the RStudio issue has an effect: rstudio/rstudio#8732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant