Learn R Programming

rnbp (version 0.2.2)

get_current_goldprice: Retrieves the current gold price.

Description

Retrieves the current gold price.

Usage

get_current_goldprice()

Arguments

Value

nbp_api_response object containing the current gold price.

See Also

https://api.nbp.pl/#cenyZlota

Other goldprice: get_goldprice_from(), get_goldprice_from_interval(), get_last_n_goldprices(), get_todays_goldprice()

Examples

Run this code
# \donttest{
tryCatch(
  {
    ## Fetch the current gold price
    response <- get_current_goldprice()
    ## Retrieve the current gold price value
    response$content$cena
  },
  error = function(e) message(e)
)
# }

Run the code above in your browser using DataLab