I've been trying to add a graph I made to my shiny layout but when I run the project it shows me this error.
I've got the following code for the serve.R:
library(shiny)
df <-read.csv('./CSV/data.csv')
shinyServer(function(input, output) {
output$scatterPlot <- renderHighchart({
hchart(df, "scatter",
hcaes(x=df$revenue,y=df$users,group=df$name_group))
})
})
And for the ui I got:
library(shiny)
library(shinydashboard)
library(shinycssloaders)
titlePanel("my_app")
header <- dashboardHeader(title = "my_app" )
sidebar <- dashboardSidebar(
sidebarMenu(
menuItem("Overview", tabName = "overview", icon = icon("book-open"))
)
body <- dashboardBody(
tabItems(
tabItem("overview",
fluidRow(
box(
title = "revenue_vs_user", status = "primary",
withSpinner(highchartOutput("scatterPlot"))
))
)
))
shinyUI(dashboardPage(header, sidebar, body, skin = "blue"))
All answers I've seen on this mistake say that it happens because the data is not being read correctly but in my enviroment variables the data appears, so it is being read. Thanks for the help!
Warning ... No such file or directory
? – r2evansread.csv
is not wrong). – r2evansroot-> -CSV -PYfiles -RExamples -Rtool -.Rdata -.Rhistory -R Project - Readme
inside the Rtool I have the project files where the ui.R and the server.R are located. – MFTS