DigitalOcean provides support for storing files (Objects) in Spaces. This is useful for storing related files for fast access, sharing, etc. See for more information. The aws.s3 package is required to use analogsea's Spaces functionality so be sure to install it with install.packages("aws.s3") prior to continuing.



A Space, or the name of the Space as a string.


(character) The name of the Object


In order to get started using the Spaces API, you'll need to generate a new "Spaces access key" in the API section of your DigitalOcean control panel and set the key and its secret as environmental variables via Sys.setenv. Set the access key to DO_SPACES_ACCESS_KEY and its secret to DO_SPACES_SECRET_KEY. After that, set your region to DO_SPACES_REGION (e.g., nyc3). Alternatively, you can pass this information as arguments to whichever Spaces API functions you're using.


if (FALSE) { # List Spaces spaces() # Obtain Spaces as a list of Space objects res <- spaces() # Print Space summary using a Space object summary(res[["my_space_name"]]) # Create a new space space_create("new_space_name") }