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.

水墨云历史黑名单IDC,斟酌选购

水墨云怎么样?本站黑名单idc,有被删除账号风险,建议转出及数据备份!水墨云ink cloud Service是成立于2017年的商家,自2020起开始从事香港、日本、韩国、美国等地区CN2 GIA线路的虚拟服务器租赁,同时还有台湾、国内nat vps相关业务,也有iplc专线产品,相对来说主打的是大带宽服务器产品。注意:本站黑名单IDC,有被删除账号风险,请尽量避免,如果已经购买建议转出及数据备...

RAKsmartCloud服务器,可自定义配置月$7.59

RAKsmart商家一直以来在独立服务器、站群服务器和G口和10G口大端口流量服务器上下功夫比较大,但是在VPS主机业务上仅仅是顺带,尤其是我们看到大部分主流商家都做云服务器,而RAKsmart商家终于开始做云服务器,这次试探性的新增美国硅谷机房一个方案。月付7.59美元起,支持自定义配置,KVM虚拟化,美国硅谷机房,VPC网络/经典网络,大陆优化/精品网线路,支持Linux或者Windows操作...

inux国外美老牌PhotonVPS月$2.5 ,Linux系统首月半价

PhotonVPS 服务商我们是不是已经很久没有见过?曾经也是相当的火爆的,我们中文习惯称作为饭桶VPS主机商。翻看之前的文章,在2015年之前也有较多商家的活动分享的,这几年由于服务商太多,乃至于有一些老牌的服务商都逐渐淡忘。这不有看到PhotonVPS商家发布促销活动。PhotonVPS 商家七月份推出首月半价Linux系统VPS主机,首月低至2.5美元,有洛杉矶、达拉斯、阿什本机房,除提供普...

highlighter为你推荐
投标在线代理企业推广最常见的推广方式有哪些cisco2960cisco 2960 和3560360邮箱360免费申请邮箱在那里支付宝注册网站支付宝申请流程是怎么样的??duplicate500开心001开心001与开心网怎么不一样,哪个是真的?oa办公软件价格一套OA办公系统多少钱drupal教程drupal框架初学,请问开发流程是怎么样的,这个框架是对本体做修改,是不是说最后的成品就是这个ddiscuz教程Discuz! Database Error怎么解决啊?我的电脑打不开这个网啊很久了。其他电脑可以。
域名到期查询 到期域名查询 租服务器价格 互联网域名管理办法 blackfriday 南昌服务器托管 免费mysql web服务器架设 raid10 美国独立日 申请网站 www789 主机返佣 hostease 广东服务器托管 亿库 碳云 cdn加速技术 百度新闻源申请 服务器机柜 更多