View source: R/find_dropbox_2dii.R
find_dropbox_2dii | R Documentation |
These functions create cross-platform paths pointing to 2dii's Dropbox folder:
find_dropbox_2dii()
is user-oriented; it checks the output is an existing
path.
path_dropbox_2dii()
is low-level, developer-oriented; it doesn't care
if the output is not an existing path.
find_dropbox_2dii(...) path_dropbox_2dii(...)
... |
Character vectors, if any values are |
Your projects may need data stored in 2dii's Dropbox folder. Sometimes it is
convenient to have your projects close to the data. But, in this case, it is
a bad idea because the path to 2dii's Dropbox folder has a problematic space
and symbol. (For example, RStudio's Git pane may not work.) Instead,
place your projects somewhere with a sane path, such as
C:/Users/You/git/project/
, and access the data you need with
path_dropbox_2dii()
.
A character string.
If the name of your 2dii Dropbox folder is different from the default,
you may add this to .Rprofile (see usethis::edit_r_profile()
):
options(r2dii_dropbox = "The name of your custom dropbox folder goes here")
degrees()
, fs::path_home()
.
Other functions to output 2dii paths:
USER.NAME()
# If it points to a nonexistent directory, path_dropbox_2dii() doesn't care path_dropbox_2dii("path", "to", "nowhere") # find_dropbox_2dii() points to an existing directory or tells you if not: # * It is a warning if the Dropbox folder exists but not the nested path # * It is an error if the Dropbox folder does not exist: restore <- options(r2dii_dropbox = "No Dropbox folder here") dropbox_exists() try( find_dropbox_2dii("path", "to", "nowhere") ) options(restore)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.