# # # R代码从装饰图案的createReposHtml来源。Rnw“# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块1号:createReposHtml。Rnw: 41-42 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #库(biocViews) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块2号:params # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # reposRoot < -“路径/ / reposRoot”# #的名字是必不可少的contribPaths < - c (=“src / contrib”来源,win.binary =“bin / windows / contrib / 2.6”, win64.binary =“bin / windows64 / contrib / 2.6”, mac.binary.leopard =“bin / macosx /豹/ contrib / 2.6”) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块3号:extractVigs (eval = FALSE) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # extractVignettes (reposRoot, contribPaths[“源”])# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块数量4:controlFiles (eval = FALSE) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # genReposControlFiles (reposRoot contribPaths) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块5号:exampleOfHtmlDesign (eval = FALSE) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #这样的定义类为每个逻辑文档块# # setClass (“pdAuthorMaintainerInfo”,包含=“PackageDetail”) # # setClass (“pdVignetteInfo”,包含=“PackageDetail”) # # # # # #然后定义htmlValue方法# # setMethod (“htmlValue”,签名(对象=“pdDescriptionInfo”),(对象){# # # #功能节点< - xmlNode (“p”, cleanText (object@Description), # # attrs = c (class = "描述"))# # # #节点})# # # # # #你可以利用这一切……# # # # # # authorInfo <假设对象包含一个PackageDetail实例——(对象,“pdAuthorMaintainerInfo”) # # dom addNode美元(htmlValue (authorInfo)) # #