Failed to load resource: the server responded with a status of 404 (Not Found)-Rmarkdown dashboard

321 views Asked by At

I am trying to have a dashboard load unto a website from a markdown document. The problem is only the dashboards are not loading up while the other graphs do. The code is as follows:


title: "Profit Metrics" author: "xx" output: html_document


library(tidyverse)
library(lubridate)

# Make shift cache data
if (!file.exists("/srv/shiny-server/Profit/Profit_Report/prodata.RData")) {
  system("Rscript /srv/shiny-server/Profit/Profit_Report/Profit_data_pull.R")
  load("/srv/shiny-server/Profit/Profit_Report/prodata.RData")
  
} else if (day(Sys.Date()) == 1 & as.Date(ymd_hms(file.info("/srv/shiny-server/Profit/Profit_Report/prodata.RData")$mtime)) != Sys.Date()) {
  system("Rscript /srv/shiny-server/Profit/Profit_Report/Profit_data_pull.R")
  load("/srv/shiny-server/Profit/Profit_Report/prodata.RData")
  
} else {
  load("/srv/shiny-server/Profit/Profit_Report/prodata.RData")
}

The data is located at /srv/shiny-server/Profit/Profit_report where the codes are saved as: Profit-Metrics.Rmd Profit_data_pull.R A folder named Profit-Metrics-cache

I can see the created dasbhoard on the Rmd document but it is not loading to the webiste. The error I get is as follows:

Failed to load resource: the server responded with a status of 404 (Not Found) unnamed-chunk-1.1.png.

When i placed the cursor on the 'unnamed-chunk-1.1.png, it states request unavailable in the network panel, try reloading the inspected page.

The problem is sometimes the dashboard load then all of a sudden it is not loading at all. Any help will be greatly appreciated.

Thank you.

I reloaded the webpage several times but it is not working. I changed the code to use flexdashboard but to no avail. The directory is "/home/john"

Below is the section of the dashboard that does not load to the website

{r, echo=FALSE, warning=FALSE, message=FALSE, cache=TRUE, cache.extra=file.info("/srv/shiny-server/Profit/Profit_Report/prodata.RData")$mtime}
CurrentYear("Total")
LastYear("Total")
0

There are 0 answers