I need to display a pdf file from my local machine in the dashboard which I have built using R-Flexdashboard (runtime:shiny).
Please help how can I do the same.
shiny::include_graphics("C:/Users/mykum/Documents/R-Flexdashboard/BA-Project/www/Process_Flow.pdf")
Related
I'm new to DataBricks. I am trying to access a .R file that is present in the DBFS storage but I cannot figure out how to do so. Any help is really appreciated.
I can read data from the storage using the file path /dbfs and also source code from the script but I want to make edits to the script.
You need some editor to do that - for example, you can setup RStudio on your cluster and connect to it via RStudio UI - in this case you can edit R files directly on DBFS.
But really, the simplest for you would be to use Databricks CLI fs command to copy the file to your local machine, make changes in the editor of your choice, and upload file back.
Im tring to create a shiny app that read and online onedrive xlsx file and show some things, but for the moment Im unable to read the onedrive xlsx file, I already explore the Microsoft365R and I can conect to my onedrive and I even can open the fil but... what it does is from r open a tab in chrome with the excel file.
I need the file in the local enviroment of r.. this its beacause the shiny app must be deploy in a web server, that every time the app runs it reads the update the file.
library(Microsfot365R)
odb <- get_business_onedrive()
odb$open_file("lcursos.xlsx")
Also this its a business account, so I also have to put the username and key to acces each file, that its beacause use the simple url doesnt work, it says Error 403 FORBIDEEN.
Any ideas?
Thank you so much!
Use the download_file() method to download the file to your local machine:
odb$download_file("lcursos.xlsx")
You can set the location of the download with the dest argument. Once it's downloaded, open it with the xls reader package of your choice. I suggest either openxlsx or readxl.
Note that if your file is password protected, your options are limited. See this question for possible solutions.
I have developed a shiny app with some sections which produce some results. There is another section with the option of download, in HTML format, the plots done in the app. When I am in the R environment it works, but it works because i have the shiny app file .R and the R markdown file .Rmd in the same folder. But when I upload the app in the browser, this link between the shiny app and the r markdown is lost. Is there a way to link both so someone without the Rmd document and without even having R Studio downloaded can use the app and download the plots in an HTML?
I am trying to find some option in shinyapps.io (i guess there's the place where they can be linked) but with no success. Thank you.
Edition: I'm trying something like that https://shiny.rstudio.com/gallery/download-knitr-reports.html
But in this example, it doesn't matter where and what is the R Markdown file?
I have solved the problem. Being in the RStudio environment, when one want to publish the app, in the window "Publish to Server", in the box "Publish Files From", there must be the two files, the .R file where the shiny app code is and the .Rmd where the code for the HTML download is.
I'm using markdown in jupyter-notebook (R mode). Is it possible to include a link to a local file? I'm only going to access the notebook locally, so I don't need (or want) to make the local files accessible over the web.
thanks
I was wondering if its possible to somehow given a dropbox folder link, download all files in that folder in to R?
If not is is possible, how would one be able to upload files onto Shiny Server so maybe I could source them locally?
Thanks,