小编Ali*_*ini的帖子

如何在Ubuntu中安装R包"udunits2"

我正在尝试udunits2在Ubuntu上安装R包:

sudo su - -c "R -e \"install.packages('udunits2', repos='http://cran.rstudio.com/')\""
Run Code Online (Sandbox Code Playgroud)

但是我收到了错误:

R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and …
Run Code Online (Sandbox Code Playgroud)

ubuntu r package

10
推荐指数
1
解决办法
2951
查看次数

在 Shiny 应用程序中找不到静态图像(HTTP 状态 404)

我正在尝试将静态图像放入闪亮的应用程序中。www我在 Shiny 应用程序的工作目录中创建了一个名为的文件夹,并在其中放置了一个 PNG 文件。使用以下代码应该显示图像:

\n
library(shiny)\n\nui <- fluidPage(\n  tags$img(src=\'photo.png\')\n)\n  \nserver <- function(input, output) {}\n\nshinyApp(ui=ui, server=server)\n
Run Code Online (Sandbox Code Playgroud)\n

但我有这个:

\n

在此输入图像描述

\n

查询图片URL( http://127.0.0.1:7122/photo.png)直接显示404状态码。

\n

无论我是通过手动运行代码、单击 RStudio 中的“运行应用程序”按钮还是通过执行文件来启动 Shiny 应用程序,结果都是相同的Rscript app.R命令行执行文件来启动 Shiny 应用程序,结果都是相同的。

\n

这是文件夹结构:

\n
library(shiny)\n\nui <- fluidPage(\n  tags$img(src=\'photo.png\')\n)\n  \nserver <- function(input, output) {}\n\nshinyApp(ui=ui, server=server)\n
Run Code Online (Sandbox Code Playgroud)\n

我错过了什么吗?

\n

r shiny

8
推荐指数
1
解决办法
8018
查看次数

未找到 pdflatex。pdf 输出需要 pdflatex

我已经在 Ubuntu 上安装了我的闪亮服务器。此外,我还在服务器上安装了 Texlive-full 2017。问题是从服务器上闪亮的应用程序下载报告不起作用(在我的本地计算机上正在工作!!!)错误是:

pandoc: pdflatex not found. pdflatex is needed for pdf output.
Warning: Error in : pandoc document conversion failed with error 41
Run Code Online (Sandbox Code Playgroud)

我也按照步骤创建符号链接,但没有任何改变!

我的 pdflatex 在这个路径中:

/usr/local/texlive/2017/bin/x86_64-linux  
Run Code Online (Sandbox Code Playgroud)

所以我创建了符号链接,如:

ln -s /usr/local/texlive/2017/bin/x86_64-linux  /usr/texbin
Run Code Online (Sandbox Code Playgroud)

我已经将 加到usr/texbin了路径中。谁能告诉我我在这里想念什么?!

ubuntu pdflatex pandoc shiny shiny-server

6
推荐指数
1
解决办法
1万
查看次数

将剪贴板粘贴到闪亮的应用程序中?

这是一个示例,我可以浏览文件作为输入,但我不想浏览,而是想粘贴剪贴板中的数据。任何想法 ?

if (interactive()) {
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
fileInput("file1", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv")
),
tags$hr(),
checkboxInput("header", "Header", TRUE)
),
mainPanel(
tableOutput("contents")
)
)
)

server <- function(input, output) {
output$contents <- renderTable({
inFile <- input$file1
if (is.null(inFile))
return(NULL)
read.csv(inFile$datapath, header = input$header)
})

}
shinyApp(ui, server)
}
Run Code Online (Sandbox Code Playgroud)

clipboard r input fileinputstream shiny

4
推荐指数
1
解决办法
1741
查看次数