rdrop2 | Dropbox Interface from R | Cloud Storage library
kandi X-RAY | rdrop2 Summary
kandi X-RAY | rdrop2 Summary
Maintainers: Karthik Ram (@karthik) and Clayton Yochum (@ClaytonJY). This package provides programmatic access to Dropbox from R. The functions in this package provide access to a full suite of file operations, including dir/copy/move/delete operations, account information and the ability to upload and download files from any Dropbox account.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rdrop2
rdrop2 Key Features
rdrop2 Examples and Code Snippets
Community Discussions
Trending Discussions on rdrop2
QUESTION
in order to be able to persistently store data created on Shinyapps.io, I have decided to use Dropbox via rdrop2. However, I have a problem: rdrop2 wants a manual authentication from Dropbox via the browser every time.
My plan was to intercept this via a dropkey.rds.
So I completed the authentication via the browser locally on my PC, saved the dropkey.rds and, to be on the safe side, put it in my www folder and in the directory where the corresponding script is located AND in the "project top folder". Simply so that the function can find the dropkey.rds for sure.
Unfortunately, it does not work. Even locally, the script asks me for authentication (at least the first time I run it). In Shinyapps, the programme simply crashes because no browser can open here.
How can I get around the authentication in Shinyapps.io?
You can find some code excerpts at the end of the post. Thank you!!!
Best regards
Code extract:
...ANSWER
Answered 2021-Oct-17 at 07:46Small update:
I was able to solve the problem. The solution is as described here:
To be extra clear for future readers, for a shiny app you should include your token as an RDS, and then either
authenticate with that token like drop_auth(rdstoken = "tokenfile.rds") in global.R or at the top of server.R, then call other drop_() functions normally (without using the dtoken arg) do not call drop_auth(), read the token into R from the RDS file, then pass that token object into every drop_() function through the dtoken arg I think the first option is much, much better (and is what I do), but the second should still be viable.
Putting the authentication at the top of the server.R (and for staftey the ui.R :D) solved the problem for me. Be aware, that you want to use the following rdrop2 commands at your script without calling the auth or the rds file again! :)
QUESTION
I created the following flipped bar plot in ggplot2 (a coordinate flipped grouped bar plot in bright green) - which worked out just fine (Code 1).
However I tried to recreate the same plot structure with different data, basically copying and adapting the code from the first plot. Everything is fine, exept for the colour being grey instead of the desired green in the scale fill manual. I honestly can't figure out why it works in the first plot but not in the second. (Code 2)
CODE 1 (the working original plot)
...ANSWER
Answered 2021-Sep-22 at 11:47If you remove the limits = c("Smartphone", "PC/Laptop", "Tablet", "TV", "Spielkonsole", "Smart-Watch", "E-Book-Reader", "Andere")
It should make all the bars the wanted green colour.
QUESTION
I want to create a PNG image with a manually specified resolution in a deployed Shiny app. This PNG image should be saved in my Dropbox. For some reason, the deployed version of my Shiny app does not take the res
argument within the png
function into account.
Consider the following example:
...ANSWER
Answered 2021-Apr-14 at 11:46Please use the following to check if the ragg output remains identical on your system and shinyapps.io:
QUESTION
I made a relatively elaborate Shiny app for my job that runs great locally. However, I am trying to host the app so that users who don't have R Studio downloaded can access it. I cannot get the app to run through shinyapps.io. It seems this is mostly related to the fact that it cannot find the files that are located on Dropbox. The app is based almost entirely on loading and writing files on Dropbox. I tried to change the file paths and use rdrop2 to load the files, but it changes the formatting of some things and would be pretty complicated to reconcile as far as I can tell. I'm very much a novice programmer and the thought of having to restructure the entire app is giving me a bit of anxiety and will certainly require a fair amount of effort. Does anyone know of a more "simple" way to modify files located on Dropbox through a shiny app hosted on shinyapps.io, preferably while still able to use the "openxlsx" package? Thank you very much in advance.
One workaround I thought might work but didn't was to make the file path to the Dropbox file specific to the user because anyone using the app should have access to Dropbox:
this.data <- as.data.frame(read.xlsx(paste("C:\Users\", Sys.info()[["user"]], "\Dropbox\rest of the file path", sep = "")))
...ANSWER
Answered 2020-Dec-05 at 03:21Disclaimer : I would not recommend relying on google-unsubmmitted URLs to guarantee privacy.
Modify the share link copied from DropBox replacing dl=0
by dl=1
to make the download start rather than display in DropBox UI.
You can then download.file()
into a tempfile()
before read.xlsx()
it:
QUESTION
I am making a shiny app that should download a .html file from dropbox and show it in said shiny app via a htmlOutput()
. Furthermore, I have it running on a AWS EC2 t2.micro instance (with all the shiny server configurations based on this article). The problem is that my app works on localhost, shinyapps.io; but, it does not work on my EC2 instance. The app runs on Shiny Server (inside the EC2 instance).
Here is the source code (app.R):
...ANSWER
Answered 2020-Aug-13 at 22:41I happened to find a fix for my problem. It was all a matter of chmod(ing) the www folder. This way, the shiny user can have access to my .html files 😄
QUESTION
I'm building a shiny application where I want to be able to show dynamically chosen pictures from my dropbox without having to download them. I'm using rdrop2 for most of it. Here's what I've got (shortened version).
...ANSWER
Answered 2020-Aug-05 at 12:59Try this
QUESTION
The package rdrop2
was archived on 31/07/20 https://cran.r-project.org/web/packages/rdrop2/index.html
Is anyone aware of a good alternative to this package?
...ANSWER
Answered 2020-Aug-05 at 09:23There is a recently updated version of rdrop2 on Github: https://github.com/karthik/rdrop2. You can install it using devtools::install_github
.
QUESTION
I am still relatively new at working in R shiny and I am trying to load several excel files into an R-shiny app. Part of the problem is that I need to be able to pull several files from a dropbox folder without specifying what the data file is called. So I need to be able to tell R to read in all the files from a dropbox folder. Also the files I am working with are in .xlsx format and I will need to read them into R as such.
I tried to do this first by using a folder on my computer desktop. I managed to get it to work using my local directory with the code below:
...ANSWER
Answered 2020-May-20 at 05:10@MrGumble is correct in his comments. The files need to downloaded before being read. The drop_dir()
function lists file paths on dropbox server and we can only read in data saved locally to our machine. If you have .csv files then this can be down in 1 step with the drop_read_csv()
function. But since you have excel files these need to first to be downloaded explicitly with drop_download()
and then read in with read_excel()
.
QUESTION
I am wroking on an shiny app as a volonteer trying to produce an app that would register all of the calls citizens have in the these times of a lockdown for a local Red Cross office. I have managed to get the entry form and to review the DT, but I need to the DT editable so I have included some code to do that.
All is working, except when I write the changes in some of the columns the app changes the column -1 (one to left), overwrites its previous entry in column -1 that I didn't wanted to edit and leaves the entry I actually wanted to edit in the column I wanted to edit (if that makes any sense). What am I doing wrong? I am pasting the code, datasets stored on Dropbox.
...ANSWER
Answered 2020-Apr-20 at 23:37R and DT count columns differently. In R the leftmost column is column 1. In DT the leftmost column is column 0. This is also known as one or zero-based array indexing.
Adding a few strategic +1 or -1 will do the trick.
If you need help knowing where to put those, feel free to post a minimal example and we can help you work through it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rdrop2
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page