get_date: Generate a single date column from NOAA data's DAY, MONTH and...

Description Usage Arguments Value Examples

View source: R/clean_data.r

Description

Takes the three date-related columns and turns them into one cohesive date column. Some instances of DAY and MONTH are NA. NA days will be replaced with 1, NA months will be replaced with Jan. Negative years have been removed.

Usage

1
get_date(days, months, years)

Arguments

days

day of year as (int)

months

month (int)

years

year (int)

Value

Returns a single date vector DATES

Examples

1
2
3
4
5
6
7
## Not run: 
  df <- load_data() %>% dplyr::filter(YEAR >= 0) %>%
       dplyr::mutate(date = get_date(DAY, MONTH, YEAR))
  print(class(df))
  head(df)

## End(Not run)

lakrobinson/noaar2 documentation built on Dec. 1, 2020, 9:35 p.m.