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.

这几个Vultr VPS主机商家的优点造就商家的用户驱动力

目前云服务器市场竞争是相当的大的,比如我们在年中活动中看到各大服务商都找准这个噱头的活动发布各种活动,有的甚至就是平时的活动价格,只是换一个说法而已。可见这个行业确实竞争很大,当然我们也可以看到很多主机商几个月就消失,也有看到很多个人商家捣鼓几个品牌然后忽悠一圈跑路的。当然,个人建议在选择服务商的时候尽量选择老牌商家,这样性能更为稳定一些。近期可能会准备重新整理Vultr商家的一些信息和教程。以前...

趣米云(18元/月)香港三网CN2云服器低至;1核1G/30G系统盘+20G数据盘/10M带宽

趣米云怎么样?趣米云是创建于2021年的国人IDC商家,虽然刚刚成立,但站长早期为3家IDC提供技术服务,已从业2年之久,目前主要从事出售香港vps、香港独立服务器、香港站群服务器等,目前在售VPS线路有三网CN2、CN2 GIA,该公司旗下产品均采用KVM虚拟化架构。由于内存资源大部分已售,而IP大量闲置,因此我们本月新增1c1g优惠套餐。点击进入:趣米云官方网站地址香港三网CN2云服务器机型活...

无忧云( 9.9元/首月),河南洛阳BGP 2核 2G,大连BGP线路 20G高防 ,

无忧云怎么样?无忧云服务器好不好?无忧云值不值得购买?无忧云,无忧云是一家成立于2017年的老牌商家旗下的服务器销售品牌,现由深圳市云上无忧网络科技有限公司运营,是正规持证IDC/ISP/IRCS商家,自营有国内雅安高防、洛阳BGP企业线路、香港CN2线路、国外服务器产品等,非常适合需要稳定的线路的用户,如游戏、企业建站业务需求和各种负载较高的项目,同时还有自营的高性能、高配置的BGP线路高防物理...

highlighter为你推荐
2020年《腾讯广告服务商-申请提报资料》css加载失败新浪微博网页显示CSS加载失败,网页格式混乱,但可以显示内容。用IE,搜狗,chrome浏览器都一样的问题。德国iphone禁售令德国IPHONE多少钱?急~中国企业在线中金在线和中金公司有关系吗filezilla_serverFileZilla无法连接服务器怎么解决flashfxp注册码谁有~FLASHfxp V3.0.2的注册码~~谢谢哦!!要现在能用的!!!!Aliasedinternal闪拍网闪拍网是真的吗3g手机有哪些3G手机???佛山海虹海虹蒸多长时间
vps论坛 美国主机排名 新加坡服务器 美国翻墙 z.com 163网 免费ftp站点 云鼎网络 免费全能空间 bgp双线 柚子舍官网 傲盾官网 多线空间 drupal安装 厦门电信 主机管理系统 德隆中文网 php服务器 114dns 购买空间 更多