Can I suppress output after knitting Rmd? - r-markdown

I want to 'Knit with Parameters' in Rmarkdown, but suppress output. Specifically, I'm knitting to powerpoint, but I do not want it to open when knitting is finished. Any ideas?

Related

Is there a way to fill a LATEX template from a txt file?

I wonder if there is a way to do a LATEX template with different section, tables, enums, etc. and fill all of that with a corresponding txt or json file, so that I can compile different pdf with just changing the input file.
I know there is the textinput command but I would like to have one file for different input fields.
Like so:
%foo.tex
\section{\secOne}
\textOne
\section{\secTwo}
\begin{enumerate}
\item \it21
\item \it21
\end{enumerate}
#foo.txt
secOne:
first section
secTwo:
second section
textOne:
this is a test
it21:
foo
it21:
bar
What are options here?
Is it common to use a .tex file to achive this?
Or can I also just use a formated txt file and seperate lines to fill out the template?
If I am not wrong you are planning on making a compiler that will translate your text document to latex format tex file. You can make your own compiler using python. I was working on a similar project but not with latex but with power point it is more of a populator. If you want to have a glance here is the repo https://github.com/altair00/XL-PPTX
I don't know if this will help you but this will give you an idea how to do what you are planning on doing.

Is there a way to suppress chunk name in figure captions when using R markdown?

Is there a way to set R markdown so that the chunk name does not get included with the figure caption.
Below is an example. I would like to use "Figure Caption" as the caption instead of "chunkname Figure Caption". I just want to use chunkname as a reference for navigating through the markdown file when editing.
```{r chunkname, fig.cap="Figure Caption"}
knitr::include_graphics("image.png")
```
I was using blogdown. The error was caused by using an underscore in the chunk name.
https://github.com/rstudio/bookdown/issues/336
I'm not sure what the proper etiquette on this site is. Should I remove this post?
Not exactly sure what your other code looks like in the Rmarkdown file, but that is not how Rmarkdown normally works, when I use your Code, I get the outcome you are wanting

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))

Chapter(s) before table of contents in Bookdown PDF output

I'd like for a chapter to appear before the table of contents (but after the title page) in the pdf_book output of Bookdown.
One way to do this is to add the chapter to a .tex file and and link it using before_body:. However, this means the chapter will not appear in gitbook (which I also need). I'd prefer not to keep both a .tex and .Rmd version of the same chapter.
An ideal solution would be if the chapter could be kept in a .Rmd file, and its contents extracted into the before_body for pdf_book. That way it's still available for gitbook. Though I'm not sure how I might do that, or indeed if it's possible?
Is there a solution? Or is it exceeding the limits of Bookdown's flexibility?
Any help would be greatly appreciated, thanks!
One can trigger ToC creation manually in the document, which gives more control over its placement. Of course, automatic table of contents creation should be disabled:
---
title: "MWE"
output:
bookdown::pdf_book:
toc: False
---
```{r child = 'file-you-want-to-include.Rmd'}
```
```{=latex}
% Trigger ToC creation in LaTeX
\tableofcontents
```
# Rest of your document starts here
The downside is that this only works with PDF output, not HTML.

Weka -- Download the csv form

When I tried to open Twitter.csv in Weka, I get an error that the "attribute names are not unique".
Does anyone know how to fix it?
The problem seems to be of unique name of the attributes. Please, remove prohibited characters.
Also please refer
Weka csv to arff special characters caue error
For Invoking a CSVLoader to open CSV File In the WEKA Workbench:
Open File > Open > Select 'invoke options dialog' > Select the file and Open > Opens weka.gui.GenericObjectEditor with weka.core.converters.CSVLoader
Fill-up required options for attributes like numeric, nominal, string, missing values, date etc. Which should work.
However, if still problem persists you need to check any errors in the lines in CSV using NotePad++ or Excel rectify errors in delimiters, attribute type, etc.
manually with lot of care. This should rectify the problems.
If not check the validity of CSV file with available online or desktop tools.