[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-703189-105":59,"doc-detail-703189-en":130,"doc-similar-703189":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","r-markdown-tutorial-basic-knowledge-codes-and-tables","R Markdown Tutorial - Basic Knowledge - Codes and Tables","","R Markdown tutorial explaining how to generate reports from an .Rmd file by combining a header, R code chunks, and formatted narrative text. Covers inserting code chunks, configuring chunk-level options (include, echo, message, warning, figure caption), setting global knitr options, and using inline code. Also introduces supported code languages, guidance for alternate chunk languages, and table rendering behavior including raw and specialized table helpers like kable, pander, and grid.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/r-markdown-tutorial-basic-knowledge-codes-and-tables/703189/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/r-markdown-tutorial-basic-knowledge-codes-and-tables/703189.png","ImageObject",300,407,{"name":92,"@type":93},"ahduag","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-24","2026-11-13",true,{"@type":102,"interactionType":103,"userInteractionCount":81},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How do you generate a report from an .Rmd file in R Markdown?","Question",{"text":112,"@type":113},"Use the render command (e.g., rmarkdown::render('tutorial.Rmd')) or the render button in the editor to execute the document and produce the final PDF report.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What are common chunk options used to control code and output?",{"text":117,"@type":113},"You can set options such as include, echo, message, warning, and fig.cap in the chunk header to decide whether the code appears, whether messages/warnings show, and how figures are captioned.",{"name":119,"@type":110,"acceptedAnswer":120},"How can inline code and inline expressions be used in an .Rmd file?",{"text":121,"@type":113},"Inline code is inserted within the text and is executed by knitr; the rendered result displays in the document while the surrounding inline formatting is applied to the output.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},703189,1794562577,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":81,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":19,"preview_urls":145},3985747870414,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","R markdown tutorial  \n———PDF Documents  \nEva  \nNovember 10, 2017  \nContents  \n1 Basic Knowledge 2  \n2 Code Chunks 2  \n2. 1 Insert Chunks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2  \n2.2 Chunk Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2  \n2.3 Global Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2  \n3 Inline Code 3  \n4 Code Languages 3  \n5 Tables 4  \n5. 1 Raw Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n5.2 Other Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n5.2. 1 kable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n5.2.2 pander . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n5.2.3 grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8  \n5.3 Save table into csv ﬁle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9  \n5.4 Plot multiple graphes together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9  \n6 Markdown Basics 10  \n7 Header 1 11  \n7. 1 Header 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11  \n7.1. 1 Header 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11  \n8 Header 1 12  \n8. 1 Header 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12  \n8.1. 1 Header 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12  \n9 Output as a pdf document 12  \n10 Add References 13  \nSchool of Mathematics and Statistics, Melbourne Integrative Genomics Bld 184 | The University of Melbourne, VIC 3010 [http://mixomics.org/](http://mixomics.org/ |)[ |](http://mixomics.org/ |) [http://lecao-lab.science.unimelb.edu.au/](http://lecao-lab.science.unimelb.edu.au/)  \n1 Basic Knowledge  \nThe “* .Rmd” ﬁle contains three types of content:  \n• a header surrounded by   \n• R code chunks surrounded by   \n• text mixed with simple text formatting To generate a report from the ﬁle:  \n• press the button   \n• run the render command  \nlibrary (rmarkdown) render ( ' tutorial .Rmd ' )  \n2 Code Chunks  \n2.1 Insert Chunks  \n• the keyboard shortcut Cmd + Option + I (Windows: Ctrl + Alt + I)  \n• the Add Chunk command in the editor toolbar  \n• typing the chunk delimiters  and   \nWhen you render the * .Rmd ﬁle, R markdown will run each code chunk and embed the results from the code chunk in the ﬁnal pdf report.  \n2.2 Chunk Options  \nChunk output can be customized with knitr options, arguments set in the {} of a chunk header, such as:  \n• include = FALSE, knitr will run the chunk but not include the chunk in the ﬁnal document. The results can be used by other chunks.  \n• echo = FALSE, knitr will not display the code in the code chunk above it’s results in the ﬁnal document. This is a useful way to embed ﬁgures.  \n• message = FALSE, knitr will not display any messages generated by the code.  \n• warning = FALSE, knitr will not display any warning messages genderated by the code.  \n• ﬁg.cap = “. . .”, the character string will be used as a ﬁgure caption in LaTex.  \nSee the R Markdown Reference Guide for a complete list of knitr chunk options.  \n2.3 Global Options  \nTo set global options that apply to every chunk in your ﬁle, call knitr::opts_chunk$set in a code chunk. Knitr will treat each option that you pass to knitr::opts_chunk$set as a global default that can be overwritten in individual chunk headers.  \nExample:  \nSchool of Mathematics and Statistics, Melbourne Integrative Genomics Bld 184 | The University of Melbourne, VIC 3010 [http://mixomics.org/](http://mixomics.org/ |)[ |](http://mixomics.org/ |) [http://lecao-lab.science.unimelb.edu.au/](","cbCaib6SHc9Ebfhy","https://ap.wps.com/l/cbCaib6SHc9Ebfhy","pdf",439820,14,"English","# Basic Knowledge\n# Code Chunks\n## Insert Chunks\n## Chunk Options\n## Global Options\n# Inline Code\n# Code Languages\n# Tables\n## Raw Table\n## Other Tables\n### kable\n### pander\n### grid\n## Save table into csv file\n## Plot multiple graphs together\n# Markdown Basics\n# Header 1\n## Header 2\n### Header 3\n# Output as a pdf document\n# Add References","[{\"question\":\"How do you generate a report from an .Rmd file in R Markdown?\",\"answer\":\"Use the render command (e.g., rmarkdown::render('tutorial.Rmd')) or the render button in the editor to execute the document and produce the final PDF report.\"},{\"question\":\"What are common chunk options used to control code and output?\",\"answer\":\"You can set options such as include, echo, message, warning, and fig.cap in the chunk header to decide whether the code appears, whether messages/warnings show, and how figures are captioned.\"},{\"question\":\"How can inline code and inline expressions be used in an .Rmd file?\",\"answer\":\"Inline code is inserted within the text and is executed by knitr; the rendered result displays in the document while the surrounding inline formatting is applied to the output.\"}]","R Markdown Tutorial - Basic Knowledge - Codes and Tables | PDF",35,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-13/e9c211f4b7a2fd119be78d22600b79b9.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-13/7cd6b81e89471c0d68884c206bf8d62a.webp",982,1270,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-13/cc042bba05300a33f95c25c1bb34f6a5.webp",981,1269,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-13/fb791668a97cc7a92275513da5679436.webp",980,1268,{"list":163,"token":66},[164,170,177,183,189,195,201,207,213,219],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":81,"category_name":30,"create_tm":169},685847,"R Markdown - An Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999698626/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=Ua7RiVfBJRg2NjflnMwwhLOkLfM%3D","r-markdown-an-introduction",1794019543,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":175,"category_name":30,"create_tm":176},348237,"rmarkdown Cheatsheet 2.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911603589/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=AVcfsd6FIHvys%2F9fEZMfX%2BzOjKk%3D","rmarkdown-cheatsheet-20",15,1790071904,{"doc_id":178,"doc_title":179,"file_type":137,"home_preview_img_url":180,"slug":181,"view_count":81,"category_name":30,"create_tm":182},701086,"Getting Started with R Markdown - A Short Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011578532/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=QBMpnfXxpdHwIt5DSMc7M7BiqJE%3D","getting-started-with-r-markdown-a-short-introduction",1794523303,{"doc_id":184,"doc_title":185,"file_type":137,"home_preview_img_url":186,"slug":187,"view_count":19,"category_name":30,"create_tm":188},685848,"WRITING YOUR ESSAY USING R MARKDOWN - SOMETHING FOR EVERYONE - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000227888/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=tn9esuqTnXDUn97ZokGWm5udIkE%3D","writing-your-essay-using-r-markdown-something-for-everyone-introduction",1794019545,{"doc_id":190,"doc_title":191,"file_type":137,"home_preview_img_url":192,"slug":193,"view_count":52,"category_name":30,"create_tm":194},657500,"CS&SS 569 Visualizing Data and Models - Lab 2 - Intro to LATEX with R Markdown and Overleaf","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975094700/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=gI1A8Dzf8XkuXbtgAZqhwrU5ApI%3D","csss-569-visualizing-data-and-models-lab-2-intro-to-latex-with-r-markdown-and-overleaf",1792981475,{"doc_id":196,"doc_title":197,"file_type":137,"home_preview_img_url":198,"slug":199,"view_count":81,"category_name":30,"create_tm":200},732862,"rmarkdown - Dynamic Documents for R Version 2.31","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031780075/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=wr3RU70mMoj6xZ90YN82y%2BcxO1k%3D","rmarkdown-dynamic-documents-for-r-version-231",1795382571,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":81,"category_name":30,"create_tm":206},701084,"R Markdown: The Definitive Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011578502/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=xTPjFnyuG3gvQrrtv6aDkoLpc6k%3D","r-markdown-the-definitive-guide",1794523292,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":81,"category_name":30,"create_tm":212},698002,"Generate Mind Maps - Convert Documents with mindr - Version 1.4.1","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010155841/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=ukkC%2FqXcSJ19rxI1EfZ3KqmyiDI%3D","generate-mind-maps-convert-documents-with-mindr-version-141",1794446940,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":24,"category_name":30,"create_tm":218},685841,"Markdown Syntax Guide - Quick Reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000227664/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=ohMHCVo9a3v6YbSWmUr%2F%2FLeJNaU%3D","markdown-syntax-guide-quick-reference",1794019531,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":19,"category_name":30,"create_tm":224},697999,"gluedown - Title Wrap Vectors in Markdown Formatting Version 1.0.9 - Package description and R functions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010155709/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=hzSU91oek1vVNCO8DAbpJgOKb5M%3D","gluedown-title-wrap-vectors-in-markdown-formatting-version-109-package-description-and-r-functions",1794446933]