Displaying 16 results from an estimated 16 matches for "runapp".
2018 Feb 23
0
Mapedit::selectMap in shiny map.
...leaflet() %>%
addTiles()%>%
addPolygons(data =gadmCHE,
label = ~NAME_1,
layerId = ~NAME_1)
selected <-selectMap(lf)
##the above works fine and returns a dataframe giving the ids of the
selected polygons.
##however the code below - trying to implement in shiny fails with "Can?t
call runApp() from within runApp(). If your application code contains
runApp(), please remove it.
library(shiny)
library(leaflet)
library(mapedit)
ui <- fluidPage(
leafletOutput(?mymap?)
)
server <- function(input, output, session) {
lf<-leaflet() %>%
addTiles()%>%
addPolygons(data =gadmCHE,...
2017 Sep 21
3
Add wrapper to Shiny in R package
...hat I'd like to
pass to the app. For instance, from the example below, I'm getting
"Error: object
'xs' not found". How can I pass "xs" explicitly to shinyApp()?
*Under R directory:*
myApp <- function(x, ...) {
require(shiny)
xs <- scale(x)
shiny::runApp(appDir = system.file("application", package =
"my_package"), ...)
}
*Under inst/application directory a file named app.R with the following
content:*
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("n", "Bins", 5, 100, 20)),...
2017 Sep 21
1
Add wrapper to Shiny in R package
...estion in the example
below, but getting:
Error in get("xs", envir = my.env) : object 'my.env' not found.
library(shiny)
library(shinydashboard)
myApp <- function(x, ...) {
xs <- scale(x)
my.env <- new.env()
assign("xs", xs, envir = my.env)
shiny::runApp(app)
}
app = shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("n", "Bins", 5, 100, 20)),
mainPanel(plotOutput("hist"))
)
),
server = function(input, output) {
get("xs", envir = my.env)
output$hist <-...
2017 Sep 21
0
Add wrapper to Shiny in R package
...the example below, I'm getting
> "Error: object
> 'xs' not found". How can I pass "xs" explicitly to shinyApp()?
>
>
> *Under R directory:*
>
> myApp <- function(x, ...) {
> require(shiny)
>
> xs <- scale(x)
>
> shiny::runApp(appDir = system.file("application", package =
> "my_package"), ...)
>
> }
>
> *Under inst/application directory a file named app.R with the following
> content:*
>
> shinyApp(
> ui = fluidPage(
> sidebarLayout(
> sidebarPanel(sliderIn...
2015 Aug 26
2
declaring dependencies of shiny app in inst/
Dear all,
I have a package implementing a shiny app, putting the R code of the app (server.R and ui.R) in inst/... and then having a simple function merely starting the app with something along the lines of:
runApp(system.file("inst/..."))
However, the app itself uses functions from packages which are not used elsewhere in the code. What is the best way to declare these dependencies (using roxygen2)? My 2-cents would be e.g a doc.R file with something along the lines of:
[...]
#' @importFrom pk...
2019 Jan 03
10
Runnable R packages
...ckage
For example, let?s say I want to run a Shiny application that I provide as
an R package (to keep the code modular, to benefit from unit tests, and to
declare dependencies properly). I would then need to a) uncompress my R
package, b) somehow, ensure my dependencies are installed, and c) call
runApp(). This can get tedious, fast.
Other languages let the developer package their code in "runnable"
artefacts, and let the developer specify the main entry point. The
mechanics depend on the language but are remarkably similar, and suggest a
way to implement this in R. Through declarations...
2003 Jun 17
11
New Module app_perl
...control a.k.a. likelyhood to crash.
Valid commands so far.......
setvar:<name>:<value>
goto:<ext>|<line>
add_ext:<context>:<replace>:<extension>:<priority>:<application>:<data>:<callerid>
runapp:<app>:<data>
include:<new_context>:<existing_context>
ignorepat:<context>:<name>
switch:<context>:<app>:<data>
There are also some special commands: (1 for now)
thread:<function>
This wi...
2017 Jul 17
0
dbplyr error updating database
...;: unable to find an inherited method for function 'dbSendQuery' for signature '"src_dbi", "character"'
Stack trace (innermost first):
67: <Anonymous>
66: dbSendQuery
65: observeEventHandler [/home/mconklin/tmpdir/CodeKPVars/server.R#76]
1: runApp
Auto-disconnecting SQLiteConnection
Auto-disconnecting SQLiteConnection
The specific chunk of server code being run is:
kpnew<-src_sqlite("/var/sqlite/KPProfile2")
stmnt<-paste0("update kpquestions set mrisupercat = '",input$supercat,"' , set mric...
2018 Feb 21
2
Ejecutar shinyapp sin abrir Rstudio
Buenas,
Se puede,en local, crear una shinyapp que se abra pinchandodirectamente sobre un icono del escritorio?
Gracias
Jes?s
[[alternative HTML version deleted]]
2019 Jan 07
0
Runnable R packages
...let?s say I want to run a Shiny application that I provide as
> an R package (to keep the code modular, to benefit from unit tests, and to
> declare dependencies properly). I would then need to a) uncompress my R
> package, b) somehow, ensure my dependencies are installed, and c) call
> runApp(). This can get tedious, fast.
You can provide your app as a Docker image, so that the end-user
simply calls a "docker pull" and then "docker run" -- that can be done
from a user-friendly script as well.
Of course, this requires Docker to be installed, but if that's a
probl...
2017 Sep 17
2
Shiny App inside R Package
Dear List,
I have a wrapper function that creates a Shiny App, as illustrated below.
I'd like to include the function myApp() inside a package. I'd appreciate
your guidance here, as I could not find good instructions on this online.
myApp <- function(x) {
require(shiny)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("n",
2018 Mar 04
2
problema con shiny
Carlos el código es el ejemplo de shiny:
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
#setwd("C:/curso 2017-18/curso R/shiny/prueba1")
library(shiny)
# Define UI for application that draws a histogram
ui <-
2018 Mar 05
2
problema con shiny
...environment(show)) aparece justo antes del error
> Listening on http://127.0.0.1:5615
> <environment: 0x000000000977ed20>
> Warning: Error in func: app.R did not return a shiny.appobj object.
> Stack trace (innermost first):
> 1: runApp
> Error : app.R did not return a shiny.appobj object.
> con lo cual consigues que se ejecute (porque estás trabajando con una instancia en local del server) pero el programa (y esto ya es interpretación mía) te está diciendo que no tiene ningún objeto que ejecutándolo en el servidor...
2018 Mar 05
3
problema con shiny
...e justo antes del error
>> Listening on http://127.0.0.1:5615
>> <environment: 0x000000000977ed20>
>> Warning: Error in func: app.R did not return a shiny.appobj object.
>> Stack trace (innermost first):
>> 1: runApp
>> Error : app.R did not return a shiny.appobj object.
>> con lo cual consigues que se ejecute (porque estás trabajando con una instancia en local del server) pero el programa (y esto ya es interpretación mía) te está diciendo que no tiene ningún objeto que ejecutándolo en el...
2018 Mar 05
2
problema con shiny
...rlos J. Gil Bellosta escribió:
Corre perfectamente en mi máquina si borro la última línea (print(environment(show))).
Simplemente, he creado un directorio vacío (/tmp/prueba), he copiado el código (menos esa última línea) en el fichero /tmp/prueba/app.R. En una sesión de R he hecho
library(shiny)
runApp("/tmp/prueba")
Y ha funcionado perfectamente.
Un saludo,
Carlos J. Gil Bellosta
http://www.datanalytics.com
El dom., 4 mar. 2018 a las 19:57, Juan Antonio Gil (<jgil en edu.uned.es<mailto:jgil en edu.uned.es>>) escribió:
Carlos el código es el ejemplo de shiny:
#
# This...
2018 Mar 05
2
problema con shiny
Hola Miguel-Ángel esa instrucción la he puesto para que no me haga el
break y se reinicie RStudio. Si quito esa instrucción y hago que se pase
la salida al wiewer panel de Rstudio me aparece el mismo error pero
además se aborta la sesión de RStudio y con la instrucción lo que cambia
es que no aborta la sesión.
Muchas gracias,
Juan
El 05/03/2018 a las 8:49, miguel.angel.rodriguez.muinos en