View source: R/setup_copernicus.R
setup_copernicus | R Documentation |
Sets up the Python environment and loads the copernicusmarine module for use in R. Optionally configures Copernicus Marine credentials for the session. It is recommended to run this once per session before calling other functions in the package. Note: This function does not install Python packages by default for CRAN compliance.
setup_copernicus(
install_copernicus = FALSE,
username = NULL,
password = NULL,
store_credentials = TRUE
)
install_copernicus |
Logical. Should the copernicusmarine package be installed in Python if not available? Default: FALSE (changed for CRAN compliance). |
username |
Character. Copernicus Marine username. If NULL, will try to get from options or environment variables. |
password |
Character. Copernicus Marine password. If NULL, will try to get from options or environment variables. |
store_credentials |
Logical. Should credentials be stored in session options? Default: TRUE. |
Invisible TRUE if the configuration was successful.
## Not run:
# Basic setup without credentials (manual Python package installation required)
setup_copernicus()
# Setup with credentials
setup_copernicus(username = "your_username", password = "your_password")
# Setup reading from environment variables
setup_copernicus() # Will look for COPERNICUS_USERNAME and COPERNICUS_PASSWORD
# Setup and store credentials for session
setup_copernicus(username = "user", password = "pass", store_credentials = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.