setup_copernicus {copernicusR} | R Documentation |
Set up Copernicus Marine integration with credentials
Description
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.
Usage
setup_copernicus(
install_copernicus = FALSE,
username = NULL,
password = NULL,
store_credentials = TRUE
)
Arguments
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. |
Value
Invisible TRUE if the configuration was successful.
Examples
## 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)