R/tidy_up-flatten_weather.R

Defines functions flatten_weather

Documented in flatten_weather

#' Parse weather column to (single) data frame. (DEPRECATED)
#'
#' @param x weather column (NOT name)
#'
#' @return data frame
#' @export
#'
#' @examples\dontrun{
#'    result <- get_forecast("Kassel", units = "metric")$list
#'    weather <- flatten_weather(result$weather)
#'    weather$description %>% print()
#' }
flatten_weather <- function(x) {
  .Deprecated("owmr_as_tibble")
  lapply(x, function(df) {
    df[1, ]
  }) %>% do.call(rbind, .)
}

Try the owmr package in your browser

Any scripts or data that you put into this service are public.

owmr documentation built on Jan. 11, 2020, 5:08 p.m.