Error uploading dataset to shinyapps.io

2,163 views
Skip to first unread message

Bob Bradley

unread,
Oct 11, 2014, 10:50:31 AM10/11/14
to shiny-...@googlegroups.com
Hi, 

I have developed a Shiny web app that works locally, but when I deploy it to shinyapps.io, I get the following error:  'ERROR:  object 'data' not found'
I am reading in a csv file from my current working directory, which I believe is causing the problem.  Is there a way that I can upload this csv to the shinyapps.io server?  Or is there another way?

Thanks,

Bob

Bob Bradley

unread,
Oct 11, 2014, 10:57:50 AM10/11/14
to shiny-...@googlegroups.com
Just to be clear, I am able to successfully deploy the app.  However, when I try and load it in the browser, I get the object not found error.

Tareef Kawaf

unread,
Oct 12, 2014, 7:46:50 AM10/12/14
to shiny-...@googlegroups.com
Hi Bob,
Yes you can, you just need to put the csv file you are loading into your application in the same directory as the ui.R and server.R files. One you have that in there, just redeploy the application and you should be good to go.

-Tareef

Bob Bradley

unread,
Oct 12, 2014, 11:26:11 AM10/12/14
to shiny-...@googlegroups.com
Hi Tareef,

The csv file is in the same directory as those files.  For whatever reason, it doesn't come along when I deploy the app.

Tareef Kawaf

unread,
Oct 13, 2014, 7:34:57 AM10/13/14
to Bob Bradley, shiny-...@googlegroups.com
Hmm... we might be out of my depth here.  Are you sure that you are in that directory when you deploy the application?  Could you send us the output of the getwd() and the output of the deployApp() call?



--
You received this message because you are subscribed to a topic in the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shiny-discuss/Lr7Ir0bfZ_Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/1dda44a8-4551-45a8-b3f8-e2076c1fd4f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bob Bradley

unread,
Oct 13, 2014, 11:28:19 AM10/13/14
to shiny-...@googlegroups.com, krishna...@gmail.com
Here's the output:

> getwd()
[1] "C:/Users/Kamal/Documents/college"

> deployApp()
Preparing to deploy application...DONE
Uploading application bundle...DONE
Deploying application: 21599...
Waiting for task: 2082150
  building: Parsing manifest
  building: Installing packages
  building: Installing files
  building: Pushing image: 62159
  deploying: Starting instances
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to http://kkrishna.shinyapps.io/college

However, when I visit the website, I either get an object 'data' not found error or that it cannot establish the connection.

Fereshteh Karimeddini

unread,
Oct 13, 2014, 12:01:51 PM10/13/14
to shiny-...@googlegroups.com, krishna...@gmail.com
Bob,

Do you mind sharing your code? You can send it privately if you prefer.

Fereshteh

Kamal

unread,
Oct 14, 2014, 9:42:34 AM10/14/14
to shiny-...@googlegroups.com
It's been solved.  The error was due to a case sensitivity issue, as I was listing the file as lowercase in R, but the file was actually in uppercase.  Thanks to Tareef and Fereshteh for their help!

yashwanth m r

unread,
Aug 5, 2015, 5:57:39 AM8/5/15
to Shiny - Web Framework for R
I have the same issue which still not resolved. Please help me overcome this issue.

I have the folder structure as 
> getwd()
"C:/Yashwanth/Retailer/5. Shiny/Apps"

Inside "Apps" directory, I have ui.R, server.R and "file.csv". I have given "data <- read.csv("file.csv")" within the "server.R".

But post deployment, it gives same error as "Error: object "data" not found".

Andy Kipp

unread,
Aug 5, 2015, 9:43:42 AM8/5/15
to yashwanth m r, Shiny - Web Framework for R
Have you checked the output of showLogs()?

Also what is the URL for your application?

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/35538bb4-ebc1-4956-9ad5-bacf9f091dc9%40googlegroups.com.

Yashwanth

unread,
Aug 6, 2015, 3:14:53 AM8/6/15
to Shiny - Web Framework for R, yashwa...@gmail.com
Yes I have checked & it says "Error in lapply(obj, function(val) { : object 'SA_Input' not found".


 Note: When I use "runApp( )", it works fine but "deployApp( )" doesn't work followed to above error.

Andy Kipp

unread,
Aug 6, 2015, 9:29:06 AM8/6/15
to Yashwanth, Shiny - Web Framework for R
Sounds like you might be missing a library() call in your code. What package is SA_Input part of?

yashwanth m r

unread,
Aug 26, 2015, 5:54:28 AM8/26/15
to Shiny - Web Framework for R
Hi  Andy !! Hope you doing well.

I have one more issue in making multiple "dataTables".

For instance I have following UI & Server,

UI.R

shinyUI(fluidPage(
  theme = shinytheme("united"),
  titlePanel("Title"),
  
  sidebarPanel(
    selectInput('level',"Select the data :",choices = c("Daily","Monthly"))
  ),
  
  mainPanel(
    tabsetPanel(
      tabPanel('Data View',column(12,offset = 1,h2('Data Input'),tableOutput('table')))
    ))
))



Server.R

shinyServer(function(input, output) {
  
  Daily <- read.csv("data/Daily.csv",header = TRUE, sep = ",", quote = "\"", dec = "." ,fill=TRUE)
  Monthly <- read.csv("data/Monthly.csv",header = TRUE, sep = ",", quote = "\"", dec = "." ,fill=TRUE)
  
  output$table <- renderTable({
                      if(input$level=='Monthly'){Monthly}
                else{
                      Daily
                      }
  })  
})

   
Note : 1. Ideally I want to select data using dropdown(selectInput) & mainPanel should display either Daily or Monthly data reactively.
          2. I tried the above method which is not working.
Reply all
Reply to author
Forward
0 new messages