Skip to contents

Checks that the online climatic data server is available and working correctly.

Usage

check_server(
  climatic_var = NULL,
  year = NULL,
  version = "last",
  verbose = TRUE,
  time_unit = "day"
)

Arguments

climatic_var

Optional. One of "Prcp", "Tmin", or "Tmax".

year

Optional. Year between 1950 and the latest year available on the server. Use get_periods() to obtain the available data versions and years available.

version

Character. Climatic data version. Either "last" (default) or "4" (version 4).

verbose

Logical. If TRUE, prints diagnostic messages; otherwise, returns only TRUE/FALSE.

time_unit

Character. One of "day" , "month" or "year".

Value

TRUE if the server is available; FALSE otherwise.

Examples

interactive()
#> [1] FALSE
check_server()
#> The server seems to be running correctly.
#> [1] TRUE