
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
kinter and markdown cheat sheet
Typology: Cheat Sheet
1 / 1
This page cannot be seen from the preview
Don't miss anything!
format start end inline output Rnw <<*>>= @ \Sexpr{x} TEX Rmd {r *}
r x
MD Rhtml HTML Rrst .. {r *} .. .. :r:x
reST Rtex % begin.rcode * % end.rcode \rinline{x} TEX Rasciidoc // begin.rcode * // end.rcode +r x+ AsciiDoc Rtextile ### begin.rcode * ### end.rcode @r x@ Textile brew <% x %> text
r 1+2
(MD stands for Markdown)\documentclass{article} \begin{document}
Below is a code chunk. <<foo, echo=TRUE>>= z = 1+ plot(cars) @
The value of z is \Sexpr{z}. \end{document}
Hi markdown!
z = 1+ plot(cars)
The value of z is r z
.
The value of pi is <% pi %>.
opts_chunk controls global chunk options, e.g. opts_chunk$set(tidy = FALSE), which can be overridden by local chunk options. See all options at https: //yihui.org/knitr/options/; some frequently used options:
eval whether to evaluate the chunk echo whether to echo source code results 'markup', 'asis', 'hold', 'hide' tidy whether to reformat R code cache whether to cache results g.width, g.height, out.width, out.height device and output size of gures include whether to include the chunk results in output child lenames of child documents engine language name (R, python,... )
knit() the main function in this package; knit input document and write output purl() extract R code from an input document spin() spin goat's hair (an R script with roxygen comments) into wool (a literate programming document to be passed to knit()) stitch() insert an R script into a template and compile the document knit_hooks$set() set or reset chunk and output hooks
homepage: https://yihui.org/knitr/ development repository: https://github.com/yihui/knitr (CRAN, examples: https://github.com/yihui/knitr-examples stackoverow: http://stackoverflow.com/tags/knitr/ mailing list: https://groups.google.com/group/knitr