search for: opts_knit

Displaying 20 results from an estimated 21 matches for "opts_knit".

2017 Jun 08
3
Paths in knitr
...rt for the management and decided to use RMarkdown and knitr. I compiled all needed plots (using separate R scripts) before compiling the report, thus all plots reside in my graphics directory. The RMarkdown report needs to access these files. I have defined ```{r setup, include = FALSE} knitr::opts_knit$set( echo = FALSE, xtable.type = "html", base.dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", root_dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", fig.path = "results/graphics") # relative path required, see http://yihui.name/kni...
2013 Jun 19
2
knitr without R studio
...-size:16px; text-align:center"> Graph 1 <#location1> Graph 2 <#location2> </p> ```{r table1, comment=NA, results='asis'} library(xtable) data(iris) print(xtable(head(iris, 10)), type = "html", include.rownames = T) ``` ```{r, include=FALSE} opts_knit$set(progress = TRUE, verbose = TRUE) opts_chunk$set(fig.width=20, fig.height=12) knit_hooks$set(fig.bg = function(before, options, envir) { if (before) par(bg = options$fig.bg) }) ``` ```{r graphs,fig.keep=?last?} for (x in 1:10) plot(rnorm(100), col = x) ``` ```{r graph1} plot(rn...
2017 Sep 06
4
post_processor in rmarkdown not working
...ketitle + 1):(end_first_page - 1)], "\\end{fmtext}", "\\maketitle", text[(end_first_page + 1):length(text)] ) writeLines(enc2utf8(text), output_file, useBytes = TRUE) } output_file } output_format( knitr = knitr_options( opts_knit = list( width = 60, concordance = TRUE ), opts_chunk = opts_chunk, knit_hooks = knit_hooks ), pandoc = pandoc_options( to = "latex", latex_engine = "xelatex", args = args, keep_tex = keep_tex ), post_proce...
2017 Sep 07
0
post_processor in rmarkdown not working
...d{fmtext}", > "\\maketitle", > text[(end_first_page + 1):length(text)] > ) > writeLines(enc2utf8(text), output_file, useBytes = TRUE) > } > output_file > } > > output_format( > knitr = knitr_options( > opts_knit = list( > width = 60, > concordance = TRUE > ), > opts_chunk = opts_chunk, > knit_hooks = knit_hooks > ), > pandoc = pandoc_options( > to = "latex", > latex_engine = "xelatex", > args = arg...
2013 Oct 23
1
Scripting call to R-Studio compile PDF
Hey everyone, I have several RStudio (.rnw) files that I am using a script to assemble into a composite document. For this purpose, it would be helpful if the script could automatcially make a call to whatever is called when a user opens up one of these files and manually clicks "Compile PDF". Basically, this would allow me to refresh all of the reports before assimilating their
2017 Sep 07
0
post_processor in rmarkdown not working
...uot;, > "\\maketitle", > text[(end_first_page + 1):length(text)] > ) > writeLines(enc2utf8(text), output_file, useBytes = TRUE) > } > output_file > } > > output_format( > knitr = knitr_options( > opts_knit = list( > width = 60, > concordance = TRUE > ), > opts_chunk = opts_chunk, > knit_hooks = knit_hooks > ), > pandoc = pandoc_options( > to = "latex", > latex_engine = "xelatex", >...
2017 Jun 12
2
Paths in knitr
...d plots (using separate R scripts) > before > > > compiling the report, thus all plots reside in my graphics directory. > The > > > RMarkdown report needs to access these files. I have defined > > > > > > ```{r setup, include = FALSE} > > > knitr::opts_knit$set( > > > echo = FALSE, > > > xtable.type = "html", > > > base.dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", > > > root_dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", > > > fig.path = "re...
2017 Sep 07
3
post_processor in rmarkdown not working
...uot;, >> text[(end_first_page + 1):length(text)] >> ) >> writeLines(enc2utf8(text), output_file, useBytes = TRUE) >> } >> output_file >> } >> >> output_format( >> knitr = knitr_options( >> opts_knit = list( >> width = 60, >> concordance = TRUE >> ), >> opts_chunk = opts_chunk, >> knit_hooks = knit_hooks >> ), >> pandoc = pandoc_options( >> to = "latex", >> latex_engine...
2017 Jun 09
0
Paths in knitr
...ed plots (using separate R scripts) > before > > > compiling the report, thus all plots reside in my graphics directory. > The > > > RMarkdown report needs to access these files. I have defined > > > > > > ```{r setup, include = FALSE} > > > knitr::opts_knit$set( > > > echo = FALSE, > > > xtable.type = "html", > > > base.dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", > > > root_dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", > > > fig.path = "re...
2017 Jun 12
0
Paths in knitr
...s) >> before >> > > compiling the report, thus all plots reside in my graphics > directory. >> The >> > > RMarkdown report needs to access these files. I have defined >> > > >> > > ```{r setup, include = FALSE} >> > > knitr::opts_knit$set( >> > > echo = FALSE, >> > > xtable.type = "html", >> > > base.dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", >> > > root_dir = "H:/2017/Analysen/Kundenzufriedenheit/Auswertung", >> > >...
2012 Mar 28
2
Making Knitr work
Might not be the best place to ask, but i could get lucky.. I have setup an eclipse environment to write sweave files lately and wanted to switch to knitr. I could get it to work on easy files, but my earlier written sweave file fails to be knit properly. Here is the error message: Quitting from lines 273-276: Error in setwd(base.dir) : kann Arbeitsverzeichnis nicht wechseln (it says: cannot
2017 Sep 07
0
post_processor in rmarkdown not working
...st_page + 1):length(text)] > ? ? ? ?) > ? ? ? ?writeLines(enc2utf8(text), output_file, useBytes = TRUE) > ? ? ?} > ? ? ?output_file > ? ?} > > ? ?output_format( > ? ? ?knitr = knitr_options( > ? ? ? ?opts_knit = list( > ? ? ? ? ?width = 60, > ? ? ? ? ?concordance = TRUE > ? ? ? ?), > ? ? ? ?opts_chunk = opts_chunk, > ? ? ? ?knit_hooks = knit_hooks > ? ? ?), > ? ? ?pandoc = pandoc_options( > ? ? ? ?to = "l...
2012 May 01
0
knitr + markdown: simplemente útil
...([source](https://github.com/yihui/knitr/blob/master/inst/examples/knitr-minimal.Rmd)), and **knitr** will automatically determine the output filename to be `knitr-minimal.md` (`*.Rmd --> *.md`). I used the code below to make sure **knitr** writes correct URL's for my images. ``` {r setup} opts_knit$set(base.url='https://github.com/yihui/knitr/raw/master/inst/examples/') ```` ## Calculado * Now we write some code chunks in this markdown file: ``` {r} ## a simple calculator 1+1 ## boring random numbers set.seed(123) rnorm(5) ```` * We can also produce plots: ``` {r md-cars-scatter,...
2012 May 04
1
add sessionInfo() option to "save"
Hi All, I was wondering if there would be any interest in adding an option to the "save" function in R that I think would be useful. I was thinking that it might be useful to have an option that would generate a ".sessionInfo" variable that contains the output of "sessionInfo()", and adds it to the list of objects to be saved. This way, whenever an RData object is
2017 Sep 07
2
post_processor in rmarkdown not working
...? ? ? ?) >> ? ? ? ?writeLines(enc2utf8(text), output_file, useBytes = TRUE) >> ? ? ?} >> ? ? ?output_file >> ? ?} >> >> ? ?output_format( >> ? ? ?knitr = knitr_options( >> ? ? ? ?opts_knit = list( >> ? ? ? ? ?width = 60, >> ? ? ? ? ?concordance = TRUE >> ? ? ? ?), >> ? ? ? ?opts_chunk = opts_chunk, >> ? ? ? ?knit_hooks = knit_hooks >> ? ? ?), >> ? ? ?pandoc = pandoc_options...
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks, I'm surprised, but I didn't find this question addressed anywhere. I'd like to generate a LaTeX caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks!
2012 Feb 20
2
Computing plot size in Sweave
Sometimes you want to compute the physical size of a plot based on data. In R itself this is no problem. But is there a way to compute the values of height and width in S-weave, say: <<graph,fig=TRUE,height=xx,width=yy>>= where xx and yy are computed and not physically written in the document? Bendix ______________________________________________ Bendix Carstensen Senior
2017 Sep 08
0
post_processor in rmarkdown not working
...writeLines(enc2utf8(text), output_file, useBytes = TRUE) >>> } >>> output_file >>> } >>> >>> output_format( >>> knitr = knitr_options( >>> opts_knit = list( >>> width = 60, >>> concordance = TRUE >>> ), >>> opts_chunk = opts_chunk, >>> knit_hooks = knit_hooks >>> ), >>>...
2018 May 10
2
anchura chunk en pdf
Estimados compañeros y comapñeras he intentado de todas las maneras hacer que la salida en pdf de unos apuntes escritos con RMarkdown estén los chunk con la misma longitud que el texto escrito y no lo logro. El ejemplo es la figura adjunta. Sabe alguien como puedo solucionar el problema o algún ejemplo donde esté solucionado, es decir, acotada la longitud (con results='asis' no funciona)
2018 May 10
2
anchura chunk en pdf
Buenas! La solución es modificar la anchura del.output: opts_knit$set(width = 80) El numero indica el ancho en caracteres. La orden se suele poner en el primer chunk con include=FALSE en las opciones del chunk. Aquí tienes mas información https://yihui.name/knitr/options/ Espero que te sirva! El jue., 10 may. 2018 19:27, Javier Nieto <mac_javi en hotmail.c...