tbl_summary Error message in UseMethod("ungroup") - r-markdown

I have a tbl_summary which outputs great when run in a script, however I am writing a report in rmarkdown and every time I knit to pdf I get an error message:
Error in UseMethod("ungroup")
(see image below)
Why is this happening? All the variables are continuous except for 'Region' which is what I'm grouping by. Again it outputs fine until I go to knit the file.

Related

Problem with filepath and rendering a stargazer table

a newbe here.
I'm writing an essay in Rmarkdown and I want to render a PDF. When I try to import an excel sheet with the commands:
dat1 <- read.xlsx("Seminararbeit.xlsx", 2L)
and then create a table with stargazer, I keep on getting this Error:
Error in basename(filePath) :
unable to translate 'my-file-path-goes-here' to native encoding
It looks like the table is actually created with stargazer, but it doesn't show up when I knit the file. I tried to Reinstall R and Rstudio (I believe I have the newest version of both) but nothing worked. Is the file path too long? I have a MacOS, is that the problem?
Please help, it's driving me nuts!

rmarkdown when I print table in a loop adds "Loading [MathJax]/extensions/MathZoom.js" to my pdf

I am trying to make a pdf with tables using a loop in rmarkdown.
But I get this "Loading [MathJax]/extensions/MathZoom.js" added to the bottom of the pdf.
How do I get rid of this message?
Here is my rmd code
title: "Some tables"
output: html_document
for(i in 1:2){
mytable = kbl(head(mtcars))
cat( print(mytable))
}
I make the pdf by typing the following in the console (typically I run this from another R program).
library(kableExtra)
rmarkdown::render("tables_in_loop.rmd")
pagedown::chrome_print("tables_in_loop.html")
How do I get rid of the loading message?
When I just use
kbl(head(mtcars))
I don't get the message but I want to print out lots of tables with a loop.
I know Rmd can do pdfs, but I get an error about running pdflatex.exe from
C:\AppData\Roaming\TinyTeX\bin\win32
I don't have administrative rights to execute this. If you have suggestions about this they are much appreciated.
Also I have a 64 bit windows 10 computer and I'm running R in 64.
Thank you so much,
Jennifer
I figured it out, I need to just use cat(mytable) not cat(print(mytable))

Reports are not getting generated in Newman when any one test fails

When any one request of a Postman collection fails, reports are not getting generated in Newman. Execution will end showing error containing text "response.toJSON"
Issue can be resolved by making below changes:
Open the HTML file (path: npm\node_modules\newman\lib\reporters\html)
Comment the line reducedExecution.response = reducedExecution.response.toJSON();
Save the file and re-execute the script.
That's it!

cfdocument tag suddenly throwing "This function should be called while holding treeLock." error

I have an application that contains a form which, until recently, I was able to save as a PDF using cfdocument. A few weeks ago we swapped out a server. The old server was running CF 9.0.1. The new server is CF 10. Since then, I've been getting this error when I try to save this particular form as a PDF.
--
An exception occurred when performing document processing. The cause
of this exception was that:
coldfusion.document.spi.DocumentExportException:
java.lang.IllegalStateException: This function should be called while
holding treeLock.
--
I have another page in the application that saves PDFs just fine. It's just this page that's throwing the error. I can't find anything about TreeLock anywhere on the web (at least, nothing that pertains to ColdFusion).
Has anyone else run into this, and if so, how did you fix it? Thanks!
I started getting the error upon promoting a new version. Rendered the content in HTML. Found I had forgotten to promote an image (got the dreaded X for image). Promoted the image, cfdocument pdf works again. (I'm using localUrl="yes")
In other words, you can debug CF errors that halt the process but cfdocument pdf blithely assumes HTML content you supply is correct and complete.
I had the same problem and by process of elimination found that cfdocument doesn't like textarea elements within the form. It is fine with input type=text, but whenever I tried to add textarea elements it fell over with this error. Hope this helps someone

False cfheader error

Every time a page on the site is visited I am getting the error message:
ColdFusion was unable to add the header you specified to the output stream. This is probably because you have already used a cfflush tag in your template or buffered output is turned off.
But, the header is being added. The line that is causing the error is <cfheader name="Content-Encoding" value="gzip">. If I remove the line then I don't get an error, but gibberish is displayed because the gzip is not decompressed.
I am not using any cfflush tags on the site. I also saw a suggestion that cftimer tags could cause problems, but I am not using any of those either.
You can also get this error if your resulting HTTP output is larger than your output buffer.
Check the "Maximum Output Buffer size" setting in CF Administrator and compare that to the size of your output.