Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shiny server.R failed to uploaded libraries

Tags:

r

shiny

I'm trying now to fix an amazing error. Here`s the header of my server.R:

library(shiny)
library(plotly)
library(DT)
library(Rcpp)
library(RSQLite)
library(org.Mm.eg.db)
library(shinyBS)
library(igraph)
library(reshape2)
library(ggplot2)
library(org.Hs.eg.db)
library(visNetwork)

I expect these libraries to be uploaded when running the application, but instead in 3 cases: visNetowrk, plotly and shinyBS, I`m getting several errors:

Error : could not find function "visNetworkOutput"
Error : could not find function "plotlyOutput"
Error : could not find function "bsTooltip"

So I need to include these libraries manually by using console:

library(plotly); library(visNetwork); library(shinyBS)

How to overcome this? Thanks in advance!

like image 380
Akado2009 Avatar asked Jul 28 '16 11:07

Akado2009


1 Answers

Particularly for plotly, if you want to keep only ui.R and server.R files instead of adding a Global.R (as @Berecht mentioned), you can add library(plotly) to the first line of your ui.R file. That worked for me.

like image 81
allanvc Avatar answered Oct 30 '22 14:10

allanvc