我试图将pdf图像插入到r markdown文件中.我知道可以插入jpg或png图像.我只是想知道是否也可以插入PDF图像.非常感谢!
我想从列表中找到相同的元素。例如,如果列表元素是数据框:
List1 <- list(A=data.frame(id=c("LA","WE","SE"),num=c(1,3,2)),
B=data.frame(id=c("PO","TD","WW"),num=c(8,1,4)),
C=data.frame(id=c("PO","TD","WW"),num=c(8,1,4)),
D=data.frame(id=c("SS","FW","MW"),num=c(2,5,1)),
E=data.frame(id=c("LA","WE","SE"),num=c(1,3,2)),
G=data.frame(id=c("LA","WE","SE"),num=c(1,3,2)))
Run Code Online (Sandbox Code Playgroud)
我想要有以下输出:
List2 <- list(c("A","E","G"),c("B","C"))
#i.e., A, E, G are identical. B and C are identical.
Run Code Online (Sandbox Code Playgroud)
是否有捷径可寻?谢谢!!!
我正在尝试将 pdf 上传到闪亮的。如果pdf文件来自互联网,以下代码运行良好:
library(shiny)
runApp(list(
ui = fluidPage(
sidebarLayout(
sidebarPanel(
h5("use case - embed a pdf user guide in the app - embed as a local pdf or from web URL")
),
mainPanel(
tabsetPanel(
# using iframe along with tags() within tab to display pdf with scroll, height and width could be adjusted
tabPanel("Reference",
tags$iframe(style="height:800px; width:100%; scrolling=yes",
src="https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf")),
tabPanel("Summary"),
tabPanel("Plot")
)
))
),
server = function(input, output,session){}
))
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试上传保存在桌面(也是工作目录)中的 pdf 时,我看不到 pdf 文件。我曾经src="example.pdf"替换过网络文件链接。正如其他一些 StackOverflow 帖子所建议的那样,我将 pdf 文件保存在名为 的文件夹中 …