# #——消息= FALSE,回声= FALSE ----------------------------------------- 图书馆(AnalysisPageServer) setup.APS.knitr () ## ---- 结果=“隐藏”,回声= FALSE -------------------------------------- ## 由于文件名有随机性,这就是# #技巧保持输出目录清洁如果文件# #是针织不止一次。plotdir < -”embed-example“如果(file.exists (plotdir))拆开(dir (plotdir,满= TRUE )) ## ---- eval = FALSE -------------------------------------------------------- # 库(AnalysisPageServer) # setup.APS.knitr () ## ---- eval = FALSE -------------------------------------------------------- # x < - seq(0, 2 *π,长度= 100)# y < - sin (x) + rnorm(100) / 10 #坳< - adjustcolor (heat.colors(100),α。f = 0.6) #嵌入式。aps。dataset({# plot(x, y, col = col, pch = 19) #}, # df = data.frame(x=x, y=y, x=x, y=y), # title = "一个不稳定的正弦曲线",# data.frame(x=x, y=y, x=x, y=y)子目录= " embed-example ") ## ---- 回声= FALSE -------------------------------------------------------- ## 记住这显示后x < - seq(0, 2 *π,长度= 100)y < - sin (x) + rnorm(100) / 10坳< - adjustcolor (heat.colors(100),α。f = 0.6) div.html <- embed.APS。dataset({plot(x, y, col = col, pch = 19)}, df = data.frame(x=x, y=y, x=x, y=y), title = "一个不稳定的正弦曲线",数据。子目录div.html =“embed-example”) ## ------------------------------------------------------------------------ x < -代表(1:nrow(火山),每个= ncol(火山))y < -代表(1:ncol(火山),nrow(火山))火山。cells <- data.frame(x = x, y = y, Height = as.vector(t(volcano)))dataset({image(火山,xaxt = "n", yaxt = "n", main = "Maunga Whau火山")},df =火山。单元格,title = "",数据。Subdir = "embed-example",显示。表= FALSE,显示。边栏= FALSE,显示。xy = TRUE, extra.div.attr = c(style = "width:60%; margin:0 auto")) ## ------------------------------------------------------------------------ embed.APS.dataset(df = iris, title = "Iris data with no plot", data.subdir = "embed-example") ## ----eval = FALSE-------------------------------------------------------- # basedir <- dirname(html.file) # copy.front.end(basedir) ## ------------------------------------------------------------------------ cat(custom.html.headers()) ## ----echo = FALSE-------------------------------------------------------- cat(div.html)