[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-348237-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-348237-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","rmarkdown-cheatsheet-20","rmarkdown Cheatsheet 2.0","","A concise reference for using R Markdown to create reproducible, self-contained research reports. Covers what R Markdown files (.Rmd) are, how to edit templates and knit documents, preview output, publish optionally, and inspect build logs. Provides key commands like rmarkdown::render(), major render arguments, YAML structure, code chunk syntax, inline code, parameters, and how to build interactive Shiny documents from the same workflow.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/rmarkdown-cheatsheet-20/348237/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/rmarkdown-cheatsheet-20/348237.png","ImageObject",300,407,{"name":42,"@type":43},"Jasmine","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-09-22",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",15,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is an R Markdown (.Rmd) file used for?","Question",{"text":63,"@type":64},"An R Markdown (.Rmd) file stores research code plus narration so readers can understand the work and the results can be reproduced.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How do you generate a report from an .Rmd file?",{"text":68,"@type":64},"Edit the template and knit the document using the Knit button or render() / rmarkdown::render() to produce output such as HTML or PDF.",{"name":70,"@type":61,"acceptedAnswer":71},"What are code chunks and how are they written in R Markdown?",{"text":72,"@type":64},"Code chunks are sections of embedded R code that begin with triple backticks like ```{r} and end with ```, and their results are appended to the document after running.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},348237,1790436598,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":26,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":97,"preview_page_count":26,"preview_urls":145},2336478487870,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","R Markdown : : CHEAT SHEET File path to output document  \n5  \nWhat is R Markdown?  \n. Rmd files · An R Markdown (.Rmd) file is a record of your research. It contains the code that a scientist needs to reproduce your work along with the narration that a reader needs to understand your work. Reproducible Research · Atthe click of a button, or the typeof a command, you can rerun the code in an R Markdown file to reproduce your work and export the results as a finished report.  \nDynamic Documents · You can choose to export the finished report in a variety of formats, including html, pdf, MSWord, or RTF documents; html or pdf based slides, Notebooks, and more.  \nWorkflow  \n1 Open a new .Rmd file at File ▶ New File ▶ R Markdown. Use the wizard that opens to prepopulate the file with a template  \n2 Write document by editing template  \n3 Knit document to create report; use knit button or render() to knit  \n4 Preview Output in IDE window  \n5 Publish (optional) to web server  \n6 Examine build log in R Markdown console  \n7 Use output file that is saved along side . Rmd  \n1  \n2  \n3  \nset lporecvatiiewon  \ninsert code chunk  \nFind in document  \nsynch publish button to accounts at [rpubs.com](rpubs.com), [shinyapps.io](shinyapps.io)[ ](shinyapps.io)RStudio Connect  \nReload document  \nrun all  \nprevious  \nchunks modify chunk options  \nrun current chunk  \n6  \n7  \nrender  \nUse rmarkdown::render() to render/knit at cmd line. Important args:  \n\n| input-file to render output_format | output_optionsList of render options (as in YAML) | output_file\u003Cbr>output_dir | params-list of\u003Cbr>params to use | envir-environment to evaluate code chunks in |\n| --- | --- | --- | --- | --- |\n\nencoding-of input file  \n\n| Embed code with knitr syntax |  | GLOBAL OPTIONS\u003Cbr>Set with knitr::opts_chunk$set(), e.g.\u003Cbr>```{r include=FALSE}\u003Cbr>knitr::opts_chunk$set(echo = TRUE)``` |\n| --- | --- | --- |\n| INLINE CODE\u003Cbr>Insert with `r \u003Ccode>` . Results appear as text without code.\u003Cbr>Built with `r getRversion()`  Built with 3.2.3 | CODE CHUNKS\u003Cbr>One or more lines surrounded with ```{r} and ``` . Place chunk\u003Cbr>options within curly braces, after r. Insert with\u003Cbr>```{r echo=TRUE} getRversion()```\u003Cbr>\u003Cbr>\u003Cbr>|  |\n\nIMPORTANT CHUNK OPTIONS  \ncache-cache results for future knits (default = FALSE)  \ncache.path-directory to save cached results in (default = \"cache/\")  \nchild-file(s) to knit and then include (default = NULL)  \ncollapse-collapse all output into single block (default = FALSE)  \ncomment-prefix for each line of results (default = '\\#\\#')  \ndependson-chunk dependencies for caching (default = NULL)  \necho-Display code in output document (default = TRUE)  \nengine-code language used in chunk (default ='R')  \nerror-Display error messages in doc (TRUE) or stop render when errors occur (FALSE) (default = FALSE)  \neval-Run code in chunk (default = TRUE)  \nf'idgeaaglt - 'left', 'right', or 'center' (default =  \nfig.cap-figure caption as character string (default = NULL)  \nfig.height, fig.width-Dimensions of plots in inches  \nhighlight-highlight source code (default = TRUE) include-Include chunk in doc after running (default = TRUE)  \nmessage-display code messages in document (default = TRUE)  \nresults (default = 'markup')'asis' -passthrough results  \n'hide' -do not display results'hold' -put all results below all code  \ntidy-tidy code for display (default = FALSE) warning-display code warnings in document (default = TRUE)  \nOptions not listed above: R.options, aniopts, autodep, background, cache.comments, cache.lazy, cache. rebuild, cache.vars, dev, dev.args, dpi,  \nengine.opts, engine.path, fig.asp, fig.env, fig.ext, fig.keep, fig.lp, fig.path, fig.pos, fig.process, fig. retina, fig.scap, [fig.show](fig.show), fig.showtext, fig.subcap, interval, out.extra, out.height, out.width, prompt, purl, ref.label, render, size, split, tidy.opts  \n.rmd Structure rmarkdown  \nYAML Header  \nOptional section of render (e.g. pandoc)  \noptions written as key:value pairs (YAML) .  \nAt start of ","cbCaieeNdLrrmiDM","https://ap.wps.com/l/cbCaieeNdLrrmiDM","pdf",2549561,"English","# What is R Markdown?\n# Workflow\n# Rendering with rmarkdown::render()\n## Important chunk options\n# .rmd Structure and YAML Header\n# Parameters\n# Interactive Documents (Shiny)","[{\"question\":\"What is an R Markdown (.Rmd) file used for?\",\"answer\":\"An R Markdown (.Rmd) file stores research code plus narration so readers can understand the work and the results can be reproduced.\"},{\"question\":\"How do you generate a report from an .Rmd file?\",\"answer\":\"Edit the template and knit the document using the Knit button or render() / rmarkdown::render() to produce output such as HTML or PDF.\"},{\"question\":\"What are code chunks and how are they written in R Markdown?\",\"answer\":\"Code chunks are sections of embedded R code that begin with triple backticks like ```{r} and end with ```, and their results are appended to the document after running.\"}]","rmarkdown Cheatsheet 2.0 | PDF",1790071904,[146,150],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/5927bc1e521f584310fc71b595b7acbf.webp",983,759,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/1da25e5e671a9ae8f8f2e05897609a29.webp",982,758]