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.

HostKvm新上联通CUVIP线路VPS,八折优惠后1G内存套餐$5.2/月起

最近上洛杉矶机房联通CUVIP线路主机的商家越来越多了,HostKvm也发来了新节点上线的邮件,适用全场8折优惠码,基于KVM架构,优惠后最低月付5.2美元起。HostKvm是一家成立于2013年的国人主机商,提供基于KVM架构的VPS主机,可选数据中心包括日本、新加坡、韩国、美国、中国香港等多个地区机房,君选择国内直连或优化线路,延迟较低,适合建站或者远程办公等。以洛杉矶CUVIP线路主机为例,...

Friendhosting,美国迈阿密机房新上线,全场45折特价优惠,100Mbps带宽不限流量,美国/荷兰/波兰/乌兰克/瑞士等可选,7.18欧元/半年

近日Friendhosting发布了最新的消息,新上线了美国迈阿密的云产品,之前的夏季优惠活动还在进行中,全场一次性45折优惠,最高可购买半年,超过半年优惠力度就不高了,Friendhosting商家的优势就是100Mbps带宽不限流量,有需要的朋友可以尝试一下。Friendhosting怎么样?Friendhosting服务器好不好?Friendhosting服务器值不值得购买?Friendho...

Hosteons:新上1Gbps带宽KVM主机$21/年起,AMD Ryzen CPU+NVMe高性能主机$24/年起_韩国便宜服务器

我们在去年12月分享过Hosteons新上AMD Ryzen9 3900X CPU及DDR4内存、NVMe硬盘的高性能VPS产品的消息,目前商家再次发布了产品更新信息,暂停新开100M带宽KVM套餐,新订单转而升级为新的Budget KVM VPS(SSD)系列,带宽为1Gbps端口,且配置大幅升级,目前100M带宽仅保留OpenVZ架构产品可新订购,所有原有主机不变,用户一直续费一直可用。Bud...

highlighter为你推荐
深圳市残友电子善务股份有限公司http404未找到打开网页提示HTTP 404未找到文件linux防火墙设置在linux iptables怎么开启企业ssl证书ssl证书多少钱一年?德国iphone禁售令苹果在中国禁售了?说说看企业信息查询系统官网怎么查自己办了几个工商营业执照什么是支付宝支付宝是什么意思?360免费建站怎样给360免费自助建站制作的企业网站做一级域名解析绑定?文档下载请问手机版wps如何把云文档下载到手机上的本地文档?加多宝和王老吉加多宝和王老吉什么关系 王老吉和加多宝哪个正宗
免费国内空间 域名注册服务 万网域名 动态域名解析软件 阿里云os bluehost webhosting 150邮箱 数字域名 怎么测试下载速度 cdn联盟 hkg 徐正曦 网站在线扫描 web服务器搭建 网站加速软件 独立主机 域名转入 电信宽带测速软件 apnic 更多