Usagehighlighter

highlighter  时间:2021-04-12  阅读:()
Package'rmarkdown'February19,2021TypePackageTitleDynamicDocumentsforRVersion2.
7MaintainerYihuiXieDescriptionConvertRMarkdowndocumentsintoavarietyofformats.
DependsR(>=3.
0)Importstools,utils,knitr(>=1.
22),yaml(>=2.
1.
19),htmltools(>=0.
3.
5),evaluate(>=0.
13),jsonlite,tinytex(>=0.
11),xfun(>=0.
15),methods,stringr(>=1.
2.
0)Suggestsshiny(>=1.
6.
0),tufte,testthat(>=3.
0.
0),digest,dygraphs,vctrs,tibble,fs,rsconnect,withr(>=2.
3.
0),bslib(>=0.
2.
4),sassSystemRequirementspandoc(>=1.
14)-http://pandoc.
orgURLhttps://github.
com/rstudio/rmarkdown,https://rmarkdown.
rstudio.
com/docs/BugReportshttps://github.
com/rstudio/rmarkdown/issuesLicenseGPL-3RoxygenNote7.
1.
1EncodingUTF-8VignetteBuilderknitrNeedsCompilationnoAuthorJJAllaire[aut],YihuiXie[aut,cre](),JonathanMcPherson[aut],JavierLuraschi[aut],KevinUshey[aut],AronAtkins[aut],HadleyWickham[aut],JoeCheng[aut],WinstonChang[aut],12Rtopicsdocumented:RichardIannone[aut](),AndrewDunning[ctb](),AtsushiYasumoto[ctb,cph](,NumbersectionsLualter),BarretSchloerke[ctb],CarsonSievert[ctb](),ChristopheDervieux[ctb],FrederikAust[ctb](),JeffAllen[ctb],JooYoungSeo[ctb](),MalcolmBarrett[ctb],RobHyndman[ctb],RomainLesur[ctb],RoyStorey[ctb],RubenArslan[ctb],SergioOller[ctb],RStudio,PBC[cph],jQueryFoundation[cph](jQuerylibrary),jQuerycontributors[ctb,cph](jQuerylibrary;authorslistedininst/rmd/h/jquery-AUTHORS.
txt),jQueryUIcontributors[ctb,cph](jQueryUIlibrary;authorslistedininst/rmd/h/jqueryui-AUTHORS.
txt),MarkOtto[ctb](Bootstraplibrary),JacobThornton[ctb](Bootstraplibrary),Bootstrapcontributors[ctb](Bootstraplibrary),Twitter,Inc[cph](Bootstraplibrary),AlexanderFarkas[ctb,cph](html5shivlibrary),ScottJehl[ctb,cph](Respond.
jslibrary),IvanSagalaev[ctb,cph](highlight.
jslibrary),GregFranko[ctb,cph](tocifylibrary),JohnMacFarlane[ctb,cph](Pandoctemplates),Google,Inc.
[ctb,cph](ioslideslibrary),DaveRaggett[ctb](slidylibrary),W3C[cph](slidylibrary),DaveGandy[ctb,cph](Font-Awesome),BenSperry[ctb](Ionicons),Drifty[cph](Ionicons),AidanLister[ctb,cph](jQueryStickyTabs),BenctPhilipJonsson[ctb,cph](pagebreakLualter),AlbertKrewinkel[ctb,cph](pagebreakLualter)RepositoryCRANDate/Publication2021-02-1908:10:02UTCRtopicsdocumented:rmarkdown-package4all_output_formats5Rtopicsdocumented:3beamer_presentation5compile_notebook8context_document9default_output_format11draft12nd_external_resources13nd_pandoc14github_document15html-dependencies17html_document18html_document_base23html_fragment24html_notebook26html_notebook_metadata28html_notebook_output28html_vignette29includes31ioslides_presentation32knitr_options38knitr_options_html39knitr_options_pdf40knit_params_ask40latex-dependencies41latex_dependency42md_document42metadata44odt_document44output_format46output_metadata48paged_table48pandoc_args49pandoc_available50pandoc_citeproc_convert51pandoc_convert52pandoc_exec53pandoc_options53pandoc_path_arg55pandoc_self_contained_html55pandoc_template56parse_html_notebook56pdf_document57pkg_le_lua60powerpoint_presentation60publish_site62relative_to63render63render_delayed67render_site684rmarkdown-packagerender_supporting_les71resolve_output_format72rmarkdown_format72rmd_metadata73rtf_document74run75shiny_prerendered_chunk77shiny_prerendered_clean77site_resources78slidy_presentation78tufte_handout81word_document82Index85rmarkdown-packageRMarkdownDocumentConversionDescriptionConvertRMarkdowndocumentsintoavarietyofformatsincludingHTML,MSWord,PDF,andBeamer.
DetailsThermarkdownpackageincludeshighlevelfunctionsforconvertingtoavarietyofformats.
Forexample:render("input.
Rmd",html_document())render("input.
Rmd",pdf_document())Youcanalsospecifyaplainmarkdownleinwhichcaseknittingwillbebypassed:render("input.
md",html_document())Additionaloptionscanbespeciedalongwiththeoutputformat:render("input.
Rmd",html_document(toc=TRUE))render("input.
Rmd",pdf_document(latex_engine="lualatex"))render("input.
Rmd",beamer_presentation(incremental=TRUE))Youcanalsoincludearbitrarypandoccommandlineargumentsalongwiththeotheroptions:render("input.
Rmd",pdf_document(toc=TRUE,pandoc_args="--listings"))SeeAlsorender,html_document,pdf_document,word_document,beamer_presentationall_output_formats5all_output_formatsDeterminealloutputformatsforanRMarkdowndocumentDescriptionReadtheYAMLmetadata(andanycommonoutputYAMLle)forthedocumentandreturntheoutputformatsthatwillbegeneratedbyacalltorender.
Usageall_output_formats(input,output_yaml=NULL)ArgumentsinputInputle(Rmdorplainmarkdown)output_yamlPathstoYAMLlesspecifyingoutputformatsandtheircongurations.
Therstexistingoneisused.
Ifnonearefound,thenthefunctionsearchesYAMLlesspeciedtotheoutput_yamltop-levelparameterintheYAMLfrontmatter,_output.
ymlor_output.
yaml,andthenusestherstexistingone.
DetailsThisfunctionisusefulforfront-endtoolsthatrequireadditionalknowledgeoftheoutputtobeproducedbyrender(e.
g.
tocustomizethepreviewexperience).
ValueAcharactervectorwiththenamesofalloutputformats.
beamer_presentationConverttoaBeamerpresentationDescriptionFormatforconvertingfromRMarkdowntoaBeamerpresentation.
Usagebeamer_presentation(toc=FALSE,slide_level=NULL,number_sections=FALSE,incremental=FALSE,fig_width=10,fig_height=7,6beamer_presentationfig_crop=TRUE,fig_caption=TRUE,dev="pdf",df_print="default",theme="default",colortheme="default",fonttheme="default",highlight="default",template="default",keep_tex=FALSE,keep_md=FALSE,latex_engine="pdflatex",citation_package=c("default","natbib","biblatex"),self_contained=TRUE,includes=NULL,md_extensions=NULL,pandoc_args=NULL)ArgumentstocTRUEtoincludeatableofcontentsintheoutput(onlylevel1headerswillbeincludedinthetableofcontents).
slide_levelTheheadinglevelwhichdenesindividualslides.
Bydefaultthisisthehighestheaderlevelinthehierarchythatisfollowedimmediatelybycontent,andnotanotherheader,somewhereinthedocument.
Thisdefaultcanbeoverriddenbyspecifyinganexplicitslide_level.
number_sectionsTRUEtonumbersectionheadingsincrementalTRUEtorenderslidebulletsincrementally.
Notethatifyouwanttoreversethedefaultincrementalbehaviorforanindividualbulletyoucanprecedeitwith>.
Forexample:>-BulletTextfig_widthDefaultwidth(ininches)forguresfig_heightDefaultheight(ininches)forguresfig_cropTRUEtoautomaticallyapplythepdfcroputility(ifavailable)topdfguresfig_captionTRUEtorendergureswithcaptionsdevGraphicsdevicetouseforgureoutput(defaultstopdf)df_printMethodtobeusedforprintingdataframes.
Validvaluesinclude"default","kable","tibble",and"paged".
The"default"methodusesacorrespondingS3methodofprint,typicallyprint.
data.
frame.
The"kable"methodusestheknitr::kablefunction.
The"tibble"methodusesthetibblepackagetoprintasummaryofthedataframe.
The"paged"methodcreatesapaginatedHTMLtable(notethatthismethodisonlyvalidforformatsthatproduceHTML).
Inadditiontothenamedmethodsyoucanalsopassanarbitraryfunctiontobeusedforprintingdataframes.
Youcandisablethedf_printbehaviorentirelybysettingtheoptionrmarkdown.
df_printtoFALSE.
SeeDataframeprintingsectioninbookdownbookforexamples.
beamer_presentation7themeBeamertheme(e.
g.
"AnnArbor").
colorthemeBeamercolortheme(e.
g.
"dolphin").
fontthemeBeamerfonttheme(e.
g.
"structurebold").
highlightSyntaxhighlightingstyle.
Supportedstylesinclude"default","tango","pyg-ments","kate","monochrome","espresso","zenburn",and"haddock".
PassNULLtopreventsyntaxhighlighting.
templatePandoctemplatetouseforrendering.
Pass"default"tousethermarkdownpack-agedefaulttemplate;passNULLtousepandoc'sbuilt-intemplate;passapathtouseacustomtemplatethatyou'vecreated.
Seethedocumentationonpandoconlinedocumentationfordetailsoncreatingcustomtemplates.
keep_texKeeptheintermediatetexleusedintheconversiontoPDFkeep_mdKeepthemarkdownlegeneratedbyknitting.
latex_engineLaTeXengineforproducingPDFoutput.
Optionsare"pdatex","lualatex",and"xelatex".
citation_packageTheLaTeXpackagetoprocesscitations,natbiborbiblatex.
Usedefaultifneitherpackageistobeused,whichmeanscitationswillbeprocessedviathecommandpandoc-citeproc.
self_containedWhethertogenerateafullLaTeXdocument(TRUE)orjustthebodyofaLa-TeXdocument(FALSE).
NotetheLaTeXdocumentisanintermediateleunlesskeep_tex=TRUE.
includesNamedlistofadditionalcontenttoincludewithinthedocument(typicallycre-atedusingtheincludesfunction).
md_extensionsMarkdownextensionstobeaddedorremovedfromthedefaultdenitionorRMarkdown.
Seethermarkdown_formatforadditionaldetails.
pandoc_argsAdditionalcommandlineoptionstopasstopandocDetailsSeetheonlinedocumentationforadditionaldetailsonusingthebeamer_presentationformat.
CreatingBeameroutputfromRMarkdownrequiresthatLaTeXbeinstalled.
RMarkdowndocumentscanhaveoptionalmetadatathatisusedtogenerateadocumentheaderthatincludesthetitle,author,anddate.
FormoredetailsseethedocumentationonRMarkdownmetadata.
RMarkdowndocumentsalsosupportcitations.
YoucanndmoreinformationonthemarkdownsyntaxforcitationsintheBibliographiesandCitationsarticleintheonlinedocumentation.
ValueRMarkdownoutputformattopasstorender8compile_notebookExamples##Notrun:library(rmarkdown)#simpleinvocationrender("pres.
Rmd",beamer_presentation())#specifyanoptionforincrementalrenderingrender("pres.
Rmd",beamer_presentation(incremental=TRUE))##End(Notrun)compile_notebookCompilingRscriptstoanotebookDescriptionRMarkdowncanalsocompileRscriptstoanotebookwhichincludescommentary,sourcecode,andscriptoutput.
NotebookscanbecompiledtoanyoutputformatincludingHTML,PDF,andMSWord.
OverviewTocompileanotebookfromanRscriptyousimplypassthescripttorender.
Forexample:rmarkdown::render("analysis.
R")rmarkdown::render("analysis.
R","pdf_document")TherstcalltorendercreatesanHTMLdocument,whereasthesecondcreatesaPDFdocument.
Bydefaultthenameofthescript,username,andcurrentdateandtimeareincludedintheheaderofthegeneratednotebook.
YoucanoverridethisdefaultbehaviorbyincludingexplicitmetadatainaspeciallyformattedRcomment:#---#title:"CropAnalysisQ32013"#author:"JohnSmith"#date:"May3rd,2014"#---IncludingMarkdownNotethattheRcommentusedabovetoaddatitle,author,anddateincludesasingle-quoteasaspecialprexcharacter.
Thisisaroxygen2stylecomment,andit'sactuallypossibletoincludemanysuchcommentsinanRscript,allofwhichwillbeconvertedtomarkdowncontentwithinthegeneratednotebook.
Forexample:#Ascriptcommentthatincludes**markdown**formatting.
RatherthandisplayingasanRcommentinthecompilednotebookanyroxygen2stylecommentwillbetreatedasmarkdownandrenderedaccordingly.
context_document9knitrSpinIncludingmarkdownwithinRcommentsispossiblebecauserendercallstheknitrspinfunctiontoconverttheRscripttoanRmdle.
Thespinfunctionalsoenablesyoutoaddknitrchunkoptionswithanotherspecialcommentprex(#+).
Here'sanexampleofascriptthatusesthevariousfeaturesofspin:https://github.
com/yihui/knitr/blob/master/inst/examples/knitr-spin.
RFormoredetailsonknitr::spinseethefollowingdocumentation:https://yihui.
org/knitr/demo/stitch/context_documentConverttoaConTeXtdocumentDescriptionFormatforconvertingfromRMarkdowntoPDFusingConTeXt.
Usagecontext_document(toc=FALSE,toc_depth=2,number_sections=FALSE,fig_width=6.
5,fig_height=4.
5,fig_crop=TRUE,fig_caption=TRUE,dev="pdf",df_print="default",template=NULL,keep_tex=FALSE,keep_md=FALSE,citation_package=c("default","natbib","biblatex"),includes=NULL,md_extensions=NULL,output_extensions=NULL,pandoc_args=NULL,context_path=NULL,context_args=NULL,ext=c(".
pdf",".
tex"))ArgumentstocTRUEtoincludeatableofcontentsintheoutputtoc_depthDepthofheaderstoincludeintableofcontents10context_documentnumber_sectionsTRUEtonumbersectionheadingsfig_widthDefaultwidth(ininches)forguresfig_heightDefaultheight(ininches)forguresfig_cropTRUEtoautomaticallyapplythepdfcroputility(ifavailable)topdfguresfig_captionTRUEtorendergureswithcaptionsdevGraphicsdevicetouseforgureoutput(defaultstopdf)df_printMethodtobeusedforprintingdataframes.
Validvaluesinclude"default","kable","tibble",and"paged".
The"default"methodusesacorrespondingS3methodofprint,typicallyprint.
data.
frame.
The"kable"methodusestheknitr::kablefunction.
The"tibble"methodusesthetibblepackagetoprintasummaryofthedataframe.
The"paged"methodcreatesapaginatedHTMLtable(notethatthismethodisonlyvalidforformatsthatproduceHTML).
Inadditiontothenamedmethodsyoucanalsopassanarbitraryfunctiontobeusedforprintingdataframes.
Youcandisablethedf_printbehaviorentirelybysettingtheoptionrmarkdown.
df_printtoFALSE.
SeeDataframeprintingsectioninbookdownbookforexamples.
templatePandoctemplatetouseforrendering.
Pass"default"tousethermarkdownpack-agedefaulttemplate;passNULLtousepandoc'sbuilt-intemplate;passapathtouseacustomtemplatethatyou'vecreated.
Seethedocumentationonpandoconlinedocumentationfordetailsoncreatingcustomtemplates.
keep_texKeeptheintermediatetexleusedintheconversiontoPDFkeep_mdKeepthemarkdownlegeneratedbyknitting.
citation_packageTheLaTeXpackagetoprocesscitations,natbiborbiblatex.
Usedefaultifneitherpackageistobeused,whichmeanscitationswillbeprocessedviathecommandpandoc-citeproc.
includesNamedlistofadditionalcontenttoincludewithinthedocument(typicallycre-atedusingtheincludesfunction).
md_extensionsMarkdownextensionstobeaddedorremovedfromthedefaultdenitionorRMarkdown.
Seethermarkdown_formatforadditionaldetails.
output_extensionsPandocextensionstobeaddedorremovedfromtheoutputformat,e.
g.
,"-smart"meanstheoutputformatwillbelatex-smart.
pandoc_argsAdditionalcommandlineoptionstopasstopandoccontext_pathPathoftheConTeXtexecutable.
Ifnotprovided,ConTeXthastobeavailablefromthePATHenvironmentvariable.
context_argsCommandlineargumentspassedtoConTeXt.
extFormatoftheoutputdocument(defaultsto".
pdf").
DetailsConTeXtneedstobeinstalled.
Toinstallthemostrecentversion,seehttps://wiki.
contextgarden.
net/Installation.
AlessrecentversionisalsoavailableinTeXLive,youcaninstallitwithtinytex::tlmgr_install("context").
default_output_format11RMarkdowndocumentscanhaveoptionalmetadatathatisusedtogenerateadocumentheaderthatincludesthetitle,author,anddate.
FormoredetailsseethedocumentationonRMarkdownmetadata.
RMarkdowndocumentsalsosupportcitations.
YoucanndmoreinformationonthemarkdownsyntaxforcitationsintheBibliographiesandCitationsarticleintheonlinedocumentation.
ValueRMarkdownoutputformattopasstorender.
Examples##Notrun:library(rmarkdown)#simpleinvocationrender("input.
Rmd",context_document())##End(Notrun)default_output_formatDeterminethedefaultoutputformatforanRMarkdowndocumentDescriptionReadtheYAMLmetadata(andanycommonoutputYAMLle)forthedocumentandreturntheoutputformatthatwillbegeneratedbyacalltorender.
Usagedefault_output_format(input,output_yaml=NULL)ArgumentsinputInputle(Rmdorplainmarkdown)output_yamlPathstoYAMLlesspecifyingoutputformatsandtheircongurations.
Therstexistingoneisused.
Ifnonearefound,thenthefunctionsearchesYAMLlesspeciedtotheoutput_yamltop-levelparameterintheYAMLfrontmatter,_output.
ymlor_output.
yaml,andthenusestherstexistingone.
DetailsThisfunctionisusefulforfront-endtoolsthatrequireadditionalknowledgeoftheoutputtobeproducedbyrender(e.
g.
tocustomizethepreviewexperience).
12draftValueAnamedlistwithanamevaluecontainingtheformatnameandanoptionsvaluethatisalistcontainingalltheoptionsfortheformatandtheirvalues.
Anoption'sdefaultvaluewillbereturnediftheoptionisn'tsetexplicitlyinthedocument.
draftCreateanewdocumentbasedonatemplateDescriptionCreate(andoptionallyedit)adraftofanRMarkdowndocumentbasedonatemplate.
Usagedraft(file,template,package=NULL,create_dir="default",edit=TRUE)ArgumentsfileFilenameforthedrafttemplateTemplatetouseasthebasisforthedraft.
Thisiseitherthefullpathtoatemplatedirectoryorthenameofatemplatedirectorywithinthermarkdown/templatesdirectoryofapackage.
package(Optional)Nameofpackagewherethetemplateislocated.
create_dirTRUEtocreateanewdirectoryforthedocument(the"default"settingleavesthisbehavioruptothecreatorofthetemplate).
editTRUEtoeditthetemplateimmediatelyDetailsThedraftfunctioncreatesnewRMarkdowndocumentsbasedontemplatesthatareeitherlocatedonthelesystemorwithinanRpackage.
Thetemplateanditssupportingleswillbecopiedtothelocationspeciedbyfile.
ValueThelenameofthenewdocument(invisibly).
NoteAnRMarkdowntemplateconsistsofadirectorythatcontainsadescriptionofthetemplate,askeletonRmdleusedasthebasisfornewdocuments,andoptionallyadditionalsupportinglesthatareprovidedalongwiththeskeleton(e.
g.
alogographic).
Ifthetemplatedirectoryiscontainedwithinapackagethenitshouldbelocatedatinst/rmarkdown/templates.
Forexample,apackagenamedpubtoolsthatwantedtoprovideatemplatenamedquarterly_reportwouldneedtoprovidethefollowingleswithinthepubtools/inst/rmarkdown/templatesdi-rectory:nd_external_resources13quarterly_report/template.
yamlquarterly_report/skeleton/skeleton.
RmdThetemplate.
yamlleshouldincludeanameeld.
Ifyouwanttoensurethatanewdirectoryisalwayscreatedforagiventemplate,thenyoucanaddthecreate_direldtothetemplate.
yamlle.
Forexample:create_dir:trueTheskeleton/skeleton.
Rmdleshouldincludetheinitialcontentsyouwantforlescreatedfromthistemplate.
Additionallescanbeaddedtotheskeletondirectory,forexample:skeleton/logo.
pngTheseleswillautomaticallybecopiedtothedirectorycontainingthenewRMarkdowndraft.
Examples##Notrun:rmarkdown::draft("Q4Report.
Rmd",template="/opt/rmd/templates/quarterly_report")rmarkdown::draft("Q4Report.
Rmd",template="quarterly_report",package="pubtools")##End(Notrun)find_external_resourcesFindExternalResourceReferencesDescriptionGivenanRMarkdowndocumentorHTMLle,attempttodeterminethesetofadditionallesneededinordertorenderanddisplaythedocument.
Usagefind_external_resources(input_file,encoding="UTF-8")Argumentsinput_filepathtotheRMarkdowndocumentorHTMLletoprocessencodingIgnored.
TheencodingisalwaysassumedtobeUTF-8.
14nd_pandocDetailsThisroutineappliesheuristicsinordertoscanadocumentforpossibleresourcereferences.
InRMarkdowndocuments,itlooksforreferencestolesimplicitlyreferencedinMarkdown(e.
g.
!
[alt](img.
png)),inthedocument'sYAMLheader,inrawHTMLchunks,andasquotedstringsinRcodechunks(e.
g.
read.
csv("data.
csv")).
ResourcesspeciedexplicitlyintheYAMLheaderforRMarkdowndocumentsarealsoreturned.
TospecifyresourcesinYAML,usetheresource_fileskey:---title:MyDocumentauthor:MyNameresource_files:-data/mydata.
csv-images/figure.
png---Eachitemintheresource_fileslistcanreferto:1.
Asinglele,suchasimages/figure.
png,or2.
Adirectory,suchasresources/data,inwhichcaseallofthedirectory'scontentwillberecursivelyincluded,or3.
Awildcardpattern,suchasdata/*.
csv,inwhichcaseallofthelesmatchingthepatternwillbeincluded.
Norecursionisdoneinthiscase.
InHTMLles(andrawHTMLchunksinRMarkdowndocuments),thisroutinesearchesforre-sourcesspeciedincommontagattributes,suchashtml_notebook_outputGenerateRNotebookOutputDescriptionUtilitiesforgeneratingoutputforthehtml_notebookformat,throughtheoutput_sourcefunctionattachedtoaoutput_format.
Usagehtml_notebook_output_html(html,meta=NULL)html_notebook_output_img(path=NULL,bytes=NULL,attributes=NULL,meta=NULL,format=c("png","jpeg"))html_vignette29html_notebook_output_png(path=NULL,bytes=NULL,attributes=NULL,meta=NULL,format=c("png","jpeg"))html_notebook_output_code(code,attributes=list(class="r"),meta=NULL)ArgumentshtmlArbitraryHTMLcontenttoinsert.
metaAnRlistofarbitrarymeta-data.
ThedatawillbeconvertedtoJSON,base64-encoded,andinjectedintotheheadercomment.
pathApathtoale.
Forfunctionsacceptingbothpathandbytes,ifbytesisNULL,thebytewisecontentswillbeobtainedbyreadingthele.
bytesThebytewiserepresentationofcontent.
attributesAnamedRlistofHTMLattributes.
ThesewillbeescapedandinsertedintothegeneratedHTMLasappropriate.
formatTheimageformat;oneof"png"or"jpeg".
codeSourcecode.
DetailsSeetheonlinedocumentationforadditionaldetailsonusingthehtml_notebookformat.
html_vignetteConverttoanHTMLvignetteDescriptionAHTMLvignetteisalightweightalternativetohtml_documentsuitableforinclusioninpackagestobereleasedtoCRAN.
Itreducesthesizeofabasicvignettefrom100ktoaround10k.
Usagehtml_vignette(fig_width=3,fig_height=3,dev="png",df_print="default",css=NULL,keep_md=FALSE,30html_vignettereadme=FALSE,self_contained=TRUE,.
.
.
)Argumentsfig_widthDefaultwidth(ininches)forguresfig_heightDefaultheight(ininches)forguresdevGraphicsdevicetouseforgureoutput(defaultstopng)df_printMethodtobeusedforprintingdataframes.
Validvaluesinclude"default","kable","tibble",and"paged".
The"default"methodusesacorrespondingS3methodofprint,typicallyprint.
data.
frame.
The"kable"methodusestheknitr::kablefunction.
The"tibble"methodusesthetibblepackagetoprintasummaryofthedataframe.
The"paged"methodcreatesapaginatedHTMLtable(notethatthismethodisonlyvalidforformatsthatproduceHTML).
Inadditiontothenamedmethodsyoucanalsopassanarbitraryfunctiontobeusedforprintingdataframes.
Youcandisablethedf_printbehaviorentirelybysettingtheoptionrmarkdown.
df_printtoFALSE.
SeeDataframeprintingsectioninbookdownbookforexamples.
cssOneormorecsslestoincludekeep_mdKeepthemarkdownlegeneratedbyknitting.
readmeUsethisvignetteasthepackageREADME.
mdle(i.
e.
renderitasREADME.
mdtothepackageroot).
NotethatifthereareimageleswithinyourvignetteyoushouldbesuretoaddREADME_lesto.
Rbuildignoreself_containedProduceastandaloneHTMLlewithnoexternaldependencies,usingdata:URIstoincorporatethecontentsoflinkedscripts,stylesheets,images,andvideos.
NotethatevenforselfcontaineddocumentsMathJaxisstillloadedexternally(thisisnecessarybecauseofitssize).
.
.
.
Additionalargumentspassedtohtml_document.
Pleasenotethattheme,fig_retinaandhighlightarehardcoded.
Settinganyofthosewillyieldanerror.
DetailsComparedtohtml_document,it:neverusesretinaguresneverusesathemehasasmallerdefaultguresizeusesacustomcssstylesheetusesacustomhighlightschemeSeetheonlinedocumentationforadditionaldetailsonusingthehtml_vignetteformat.
ValueRMarkdownoutputformattopasstorenderincludes31includesIncludecontentwithinoutputDescriptionSpecifyadditionalcontenttobeincludedwithinanoutputdocument.
Usageincludes(in_header=NULL,before_body=NULL,after_body=NULL)includes_to_pandoc_args(includes,filter=identity)Argumentsin_headerOneormoreleswithcontenttobeincludedintheheaderofthedocument.
before_bodyOneormoreleswithcontenttobeincludedbeforethedocumentbody.
after_bodyOneormoreleswithcontenttobeincludedafterthedocumentbody.
includesIncludestoconverttopandocargs.
filterFiltertopre-processincludeswith.
DetailsNon-absolutepathsforresourcesreferencedfromthein_header,before_body,andafter_bodyparametersareresolvedrelativetothedirectoryoftheinputdocument.
ValueIncludeslistorpandocargsExamples##Notrun:library(rmarkdown)html_document(includes=includes(before_body="header.
htm"))pdf_document(includes=includes(after_body="footer.
tex"))##End(Notrun)32ioslides_presentationioslides_presentationConverttoanioslidesPresentationDescriptionFormatforconvertingfromRMarkdowntoanioslidespresentation.
Usageioslides_presentation(number_sections=FALSE,logo=NULL,slide_level=2,incremental=FALSE,fig_width=7.
5,fig_height=4.
5,fig_retina=2,fig_caption=TRUE,dev="png",df_print="default",smart=TRUE,self_contained=TRUE,widescreen=FALSE,smaller=FALSE,transition="default",mathjax="default",analytics=NULL,template=NULL,css=NULL,includes=NULL,keep_md=FALSE,lib_dir=NULL,md_extensions=NULL,pandoc_args=NULL,extra_dependencies=NULL,.
.
.
)Argumentsnumber_sectionsTRUEtonumbersectionheadingslogoPathtolethatincludesalogoforuseinthepresentation(shouldbesquareandatleast128x128).
slide_levelHeaderleveltoconsiderasslideseparator(Defaultstoheader2).
ioslides_presentation33incrementalTRUEtorenderslidebulletsincrementally.
Notethatifyouwanttoreversethedefaultincrementalbehaviorforanindividualbulletyoucanprecededitwith>.
Forexample:>-BulletText.
fig_widthDefaultwidth(ininches)forguresfig_heightDefaultheight(ininches)forguresfig_retinaScalingtoperformforretinadisplays(defaultsto2,whichcurrentlyworksforallwidelyusedretinadisplays).
SettoNULLtopreventretinascaling.
NotethatthiswillalwaysbeNULLwhenkeep_mdisspecied(thisisbecausefig_retinareliesonoutputtingHTMLdirectlyintothemarkdowndocument).
fig_captionTRUEtorendergureswithcaptionsdevGraphicsdevicetouseforgureoutput(defaultstopng)df_printMethodtobeusedforprintingdataframes.
Validvaluesinclude"default","kable","tibble",and"paged".
The"default"methodusesacorrespondingS3methodofprint,typicallyprint.
data.
frame.
The"kable"methodusestheknitr::kablefunction.
The"tibble"methodusesthetibblepackagetoprintasummaryofthedataframe.
The"paged"methodcreatesapaginatedHTMLtable(notethatthismethodisonlyvalidforformatsthatproduceHTML).
Inadditiontothenamedmethodsyoucanalsopassanarbitraryfunctiontobeusedforprintingdataframes.
Youcandisablethedf_printbehaviorentirelybysettingtheoptionrmarkdown.
df_printtoFALSE.
SeeDataframeprintingsectioninbookdownbookforexamples.
smartProducetypographicallycorrectoutput,convertingstraightquotestocurlyquotes,---toem-dashes,--toen-dashes,and.
.
.
toellipses.
self_containedProduceastandaloneHTMLlewithnoexternaldependencies,usingdata:URIstoincorporatethecontentsoflinkedscripts,stylesheets,images,andvideos.
NotethatevenforselfcontaineddocumentsMathJaxisstillloadedexternally(thisisnecessarybecauseofitssize).
widescreenDisplaypresentationwithwiderdimensions.
smallerUsesmallertextonallslides.
Youcanalsoenablethisforindividualslidesbyaddingthe.
smallerattributetotheslideheader(seePresentationSizebelowfordetails).
transitionSpeedofslidetransitions.
Thiscanbe"default","slower","faster",oranumericvaluewithanumberofseconds(e.
g.
0.
5).
mathjaxIncludemathjax.
The"default"optionusesanhttpsURLfromaMathJaxCDN.
The"local"optionusesalocalversionofMathJax(whichiscopiedintotheout-putdirectory).
YoucanpassanalternateURLorpassNULLtoexcludeMathJaxentirely.
analyticsAGoogleanalyticspropertyID.
templatePandoctemplatetouseforrendering.
Pass"default"tousethermarkdownpack-agedefaulttemplate;passNULLtousepandoc'sbuilt-intemplate;passapathtouseacustomtemplatethatyou'vecreated.
Notethatifyoudon'tusethe"de-fault"templatethensomefeaturesofhtml_documentwon'tbeavailable(seetheTemplatessectionbelowformoredetails).
cssOneormorecsslestoinclude34ioslides_presentationincludesNamedlistofadditionalcontenttoincludewithinthedocument(typicallycre-atedusingtheincludesfunction).
keep_mdKeepthemarkdownlegeneratedbyknitting.
lib_dirDirectorytocopydependentHTMLlibraries(e.
g.
jquery,bootstrap,etc.
)into.
Bydefaultthiswillbethenameofthedocumentwith_filesappendedtoit.
md_extensionsMarkdownextensionstobeaddedorremovedfromthedefaultdenitionorRMarkdown.
Seethermarkdown_formatforadditionaldetails.
pandoc_argsAdditionalcommandlineoptionstopasstopandocextra_dependenciesAdditionalfunctionargumentstopasstothebaseRMarkdownHTMLoutputformatterhtml_document_base.
.
.
AdditionalfunctionargumentstopasstothebaseRMarkdownHTMLoutputformatterhtml_document_baseDetailsSeetheonlinedocumentationforadditionaldetailsonusingtheioslides_presentationformat.
Notethat,ifabefore_bodyincludeisspeciedinincludes,thenitwillreplacethestandardtitleslideentirely.
ValueRMarkdownoutputformattopasstorender.
SlideBasicsYoucancreateaslideshowbrokenupintosectionsbyusingthe#and##headingtags(youcanalsocreateanewslidewithoutaheaderusingahorizontalruleForexamplehere'sasimpleslideshow:---title:"Habits"author:JohnDoedate:March22,2005output:ioslides_presentation---#Inthemorning##Gettingup-Turnoffalarm-Getoutofbed##Breakfast-Eateggsioslides_presentation35-Drinkcoffee#Intheevening##Dinner-Eatspaghetti-Drinkwine!
[pictureofspaghetti](images/spaghetti.
jpg)##Goingtosleep-Getinbed-CountsheepYoucanaddasubtitletoaslideorsectionbyincludingtextafterthepipe(|)character.
Forexample:##Gettingup|WhatIliketodofirstthingDisplayModesThefollowingsinglecharacterkeyboardshortcutsenablealternatedisplaymodes:fenablefullscreenmodewtogglewidescreenmodeoenableoverviewmodehenablecodehighlightmodepshowpresenternotesPressingEscexitsallofthesemodes.
SeethesectionsbelowonCodeHighlightingandPresenterModeforadditionaldetailonthosemodes.
IncrementalBulletsYoucanrenderbulletsincrementallybyaddingtheincrementaloption:---output:ioslides_presentation:incremental:true---Ifyouwanttorenderbulletsincrementallyforsomeslidesbutnotothersyoucanusethissyntax:>-Eateggs>-Drinkcoffee36ioslides_presentationPresentationSizeYoucandisplaythepresentationusingawiderformfactorusingthewidescreenoption.
Youcanspecifythatsmallertextbeusedwiththesmalleroption.
Forexample:---output:ioslides_presentation:widescreen:truesmaller:true---Youcanalsoenablethesmalleroptiononaslide-by-slidebasisbyaddingthe.
smallerattibutetotheslideheader:##Gettingup{.
smaller}AddingaLogoYoucanaddalogotothepresentationusingthelogooption(thelogoshouldbesquareandatleast128x128).
Forexample:---output:ioslides_presentation:logo:logo.
png---A128x128versionofthelogographicwillbeaddedtothetitleslideandaniconversionofthelogowillbeincludedinthebottom-leftfooterofeachslide.
BuildSlidesSlidescanalsohavea.
buildattributethatindicatethattheircontentshouldbedisplayedincre-mentally.
Forexample:##Gettingup{.
build}Slideattributescanbecombinedifyouneedtospecifymorethanone,forexample:##Gettingup{.
smaller.
build}CodeHighlightingIt'spossibletoselectsubsetsofcodeforadditionalemphasisbyaddingaspecial"highlight"com-mentaroundthecode.
Forexample:###xioslides_presentation37Thehighlightedregionwillbedisplayedwithaboldfont.
Whenyouwanttohelptheaudiencefocusexclusivelyonthehighlightedregionpressthehkeyandtherestofthecodewillfadeaway.
TablesTheioslidestemplatehasanattractivedefaultstylefortablessoyoushouldn'thesitatetoaddtablesforpresentingmorecomplexsetsofinformation.
Pandocmarkdownsupportsseveralsyntaxesfordeningtableswhicharedescribedinthepandoconlinedocumentation.
AdvancedLayoutYoucancentercontentonaslidebyaddingthe.
flexboxand.
vcenterattributestotheslidetitle.
Forexample:##Dinner{.
flexbox.
vcenter}Youcanhorizontallycentercontentbyenclosingitinadivtagwithclasscentered.
Forexample:Thistextiscentered.

HoRain Cloud:国内特价物理机服务器,镇江机房,内地5线BGP接入,月付499元起

horain怎么样?horain cloud是一家2019年成立的国人主机商家,隶属于北京辰帆科技有限公司,horain持有增值电信业务经营许可证(B1-20203595),与中国电信天翼云、腾讯云、华为云、UCloud、AWS等签署渠道合作协议,主要提企业和个人提供云服务器,目前商家推出了几款特价物理机,都是在内地,性价比不错,其中有目前性能比较强悍的AMD+NVMe系列。点击进入:horain...

PQS彼得巧 年中低至38折提供台湾彰化HiNet线路VPS主机 200M带宽

在六月初的时候有介绍过一次来自中国台湾的PQS彼得巧商家(在这里)。商家的特点是有提供台湾彰化HiNet线路VPS主机,起步带宽200M,从带宽速率看是不错的,不过价格也比较贵原价需要300多一个月,是不是很贵?当然懂的人可能会有需要。这次年中促销期间,商家也有提供一定的优惠。比如月付七折,年付达到38折,不过年付价格确实总价格比较高的。第一、商家优惠活动年付三八折优惠:PQS2021-618-C...

ProfitServer折优惠西班牙vps,荷兰vps,德国vps,5折优惠,不限制流量

profitserver正在对德国vps(法兰克福)、西班牙vps(马德里)、荷兰vps(杜廷赫姆)这3处数据中心内的VPS进行5折优惠促销。所有VPS基于KVM虚拟,纯SSD阵列,自带一个IPv4,不限制流量,在后台支持自定义ISO文件,方便大家折腾!此外还有以下数据中心:俄罗斯(多机房)、捷克、保加利亚、立陶宛、新加坡、美国(洛杉矶、锡考克斯、迈阿密)、瑞士、波兰、乌克兰,VPS和前面的一样性...

highlighter为你推荐
重庆大学VPN接入使用说明(Windows政府采购项目需求方案苹果appstore宕机为什App Store下载软件 到了一半就停了 不动了360防火墙在哪里360防火墙缤纷网谁都可以创造一个属于自己的缤纷世界中的缤纷是什么意思爱买网超艾比安高达厉害吗,今天在网上看到的万代的果断入手了,168贵吗,不知道这款高达厉不厉害servicetemporarilyunavailableService Temporarily Unavailable的503错误是怎么回事邮件管理系统邮箱管理软件哪种好用顽固木马专杀工具360顽固木马专杀工具怎么样,和超级巡警比呢?帝国cms帝国cms怎么安装,帝国cms本地安装的技巧
北京网站空间 域名转让 俄罗斯vps 如何查询域名备案号 免费申请域名和空间 主机屋 电信测速器 hawkhost 视频存储服务器 permitrootlogin 42u标准机柜尺寸 info域名 美国php空间 seednet 四川电信商城 国外在线代理服务器 美国迈阿密 大化网 阿里云个人邮箱 免费获得q币 更多