This article describes how to add a data set file to Dropbox.
- A Dropbox account.
- A Dropbox Access Token (see How to Create an Access Token for Dropbox).
Method 1 - using an existing file
- Go to Dropbox and log in (you need a Dropbox account to do this).
- Navigate to the folder for which you have an Access Token.
- Select Upload > Files.
- Select the data set you wish to upload and click Open.
Method 2 - creating a new file
Perform this step only once. Repeating it will overwrite any existing file.
- In Displayr select Calculation > Custom Code and click on the Page where you want to position the output.
- Update and enter the below R Code:
empty.data = data.frame(time = as.POSIXct(character()),
memory = integer())
ExportToDropbox(empty.data, token, file = "memorydata.rda")
The example of the above code creates a file in which it stores the memory usage of the R session. In this case, the file contains two 2 columns: time and memory. That's why the code contains two arguments in the data.frame() function.
You will need to replace the mention of token with your token string. For instance, if your token was ABCDefgh1234 you would need to put "ABCDefgh1234" in place of the token (including the quotation marks).
You will also need to update the names, number, and data types of the columns to fit the format of your data.