Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm deploying my shiny app and I don't know how to input my a local dataset. I keep getting Error: object "data" not found. Here is my path to shiny folder.

library(shinyapps)
shinyapps::deployApp('C:\Users\Jeremy\Desktop\jerm2')

In this directory (jerm2), I have 3 things: ui.R, server.R, and my local dataset, a .csv called proj.csv.

In the server.R file, I set data<-read.csv("proj.csv")

I just don't know how to get Shiny to pick up my datasets.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
440 views
Welcome To Ask or Share your Answers For Others

1 Answer

You may want to add a subdirectory in your shiny folder called "Data" and put proj.csv there.

Then, in your server.r put:

data<-read.csv("./Data/proj.csv")

That will make it clear where the data is when the app is deployed to the ShinyApps service.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...