#' S3 print weather
#'
#' Print the weather.
#'
#' @param x An object of class "weather".
#' @param ... other arguments.
#'
#' @export
print.weather<-function(x,...){
wind<-base::round(x$current$wind_speed/3.6,2)
base::cat("Country:",x$location$country,"\n",
"City:",x$location$name,"\n",
"Local time:",x$location$localtime,"\n",
"Temperature:",x$current$temperature,"degree celsius\n",
"Weather descriptions:",x$current$weather_descriptions,"\n",
"Wind speed:",wind,"m/s")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.