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.

HostYun全场9折,韩国VPS月付13.5元起,日本东京IIJ线路月付22.5元起

HostYun是一家成立于2008年的VPS主机品牌,原主机分享组织(hostshare.cn),商家以提供低端廉价VPS产品而广为人知,是小成本投入学习练手首选,主要提供基于XEN和KVM架构VPS主机,数据中心包括中国香港、日本、德国、韩国和美国的多个地区,大部分机房为国内直连或者CN2等优质线路。本月商家全场9折优惠码仍然有效,以KVM架构产品为例,优惠后韩国VPS月付13.5元起,日本东京...

VoLLcloud(月付低至2.8刀)香港vps大带宽,三网直连

VoLLcloud LLC是一家成立于2020年12月互联网服务提供商企业,于2021年1月份投入云计算应用服务,为广大用户群体提供云服务平台,已经多个数据中心部署云计算中心,其中包括亚洲、美国、欧洲等地区,拥有自己的研发和技术服务团队。现七夕将至,VoLLcloud LLC 推出亚洲地区(香港)所有产品7折优惠,该产品为CMI线路,去程三网163,回程三网CMI线路,默认赠送 2G DDoS/C...

SpinServers(月89美元) 2*e5-2630L v2,美国独立服务器

SpinServers服务商也不算是老牌的服务商,商家看介绍是是2018年成立的主机品牌,隶属于Majestic Hosting Solutions LLC旗下。商家主要经营独立服务器租用和Hybrid Dedicated服务器等,目前包含的数据中心在美国达拉斯、圣何塞机房,自有硬件和IP资源等,商家还自定义支持用户IP广播到机房。看到SpinServers推出了美国独服的夏季优惠促销活动,最低月...

highlighter为你推荐
在线代理怎么样设置代理,让别人看我的IP是别的地方,不是我真实的IP?ym.163.comfoxmail设置163免费企业邮箱美要求解锁iPhoneiPhone连接Mac的时候出现提示需要解锁iPhone申请支付宝账户怎样申请支付宝账户?要填写什么信息?zhuo爱作文:温暖的( )123456hdAPP上面带有HD是啥意思网站制作套餐怎样制作网站,制作网站要钱吗免费代理加盟哪有免费的代理可以做的?美国独立美国独立时不是只有13个洲吗?后来的领土都是怎么得来的。团购程序团购的具体流程是什么?仿佛很简单便捷的样子?
华众虚拟主机管理系统 子域名查询 重庆vps租用 三级域名网站 淘宝抢红包攻略 淘宝双十一2018 全能主机 申请个人网页 165邮箱 怎么测试下载速度 河南移动m值兑换 如何建立邮箱 闪讯官网 香港亚马逊 环聊 web服务器搭建 移动服务器托管 英国伦敦 我的世界服务器ip cdn网站加速 更多