[R-es] problema con shiny

Juan Antonio Gil jgil en edu.uned.es
Dom Mar 4 19:57:28 CET 2018


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 <- fluidPage(

   # Application title
   titlePanel("Old Faithful Geyser Data"),

   # Sidebar with a slider input for number of bins
   sidebarLayout(
      sidebarPanel(
         sliderInput("bins",
                     "Number of bins:",
                     min = 1,
                     max = 50,
                     value = 30)
      ),

      # Show a plot of the generated distribution
      mainPanel(
         plotOutput("distPlot")
      )
   )
)

# Define server logic required to draw a histogram
server <- function(input, output) {

   output$distPlot <- renderPlot({
      # generate bins based on input$bins from ui.R
      x    <- faithful[, 2]
      bins <- seq(min(x), max(x), length.out = input$bins + 1)

      # draw the histogram with the specified number of bins
      hist(x, breaks = bins, col = 'darkgray', border = 'white')
   })
}

# Run the application
shinyApp(ui = ui, server = server)
print(environment(show))


El código funciona en otro ordenador con windows 10 con R de 32 bits. Donde no funciona es R de 64 bits
Respecto al directorio no es el problema, está probado.

Saludos,

Juan


El 04/03/2018 a las 19:48, Carlos J. Gil Bellosta escribió:
Hola, ¿qué tal?

Sin ver el código, es difícil de diagnosticar. Si funcionaba en otro ordenador, todavía más.

Buscando ese error por internet decía que puede ocurrir si se ejecuta la app desde un directorio que no es el de trabajo. Es raro, pero si, como dices, en otro ordenador funcionaba... Pero es puramente especulativo.

Un saludo,

Carlos J. Gil Bellosta
http://www.datanalytics.com



El dom., 4 mar. 2018 a las 19:18, Juan Antonio Gil (<jgil en edu.uned.es<mailto:jgil en edu.uned.es>>) escribió:
Estimados compañeros tengo un problema con shiny. Es un problema local de mi ordenador, porque en otro va si problemas pero no consigo saber ¿cómo arreglarlo?. He instalado incluso la nueva versión de Rstudio. Os explico:

1) lanzo el programa app.R, el ejemplo de shiny e intenta mostrar los resultados pero si hago: print(environment(show)) da como resultado

Error in func(fname, ...) : app.R did not return a shiny.appobj object.

pero he mirado en internet el error y no consigo descifrar el problema.

¿Qué puede ser?


Saludos,

Juan



--
Juan Antonio Gil Pascual
Matemático, estadístico, especialista en Text Mining
correo: jmat1 en telefonica.net<mailto:jmat1 en telefonica.net><mailto:jmat1 en telefonica.net<mailto:jmat1 en telefonica.net>>
web: www.jgil.acta.es<http://www.jgil.acta.es><http://www.jgil.acta.es>

AVISO LEGAL. Este mensaje puede contener informació...{{dropped:30}}



Más información sobre la lista de distribución R-help-es