Skip to contents

Creates various date columns for WRTDS study.

Usage

populateDateColumns(rawData)

Arguments

rawData

vector with dateTime

Value

DateFrame dataframe

Examples

dateTime <- c('1984-02-28 13:56',
              '1984-03-01 00:00',
              '1986-03-01 00:00',
              '1986-10-15 00:00')
              
expandedDateDF <- populateDateColumns(dateTime)
expandedDateDF
#>               Date   Julian Month Day  DecYear MonthSeq waterYear
#> 1 1984-02-28 13:56 49000.58     2  59 1984.160     1610      1984
#> 2 1984-03-01 00:00 49002.00     3  61 1984.164     1611      1984
#> 3 1986-03-01 00:00 49732.00     3  61 1986.162     1635      1986
#> 4 1986-10-15 00:00 49960.00    10 289 1986.786     1642      1987

dateTime <- c('1984-02-28', 
              '1984-03-01',
              '1986-03-01',
              '1986-10-15')
expandedDateDF <- populateDateColumns(dateTime)
expandedDateDF
#>         Date Julian Month Day  DecYear MonthSeq waterYear
#> 1 1984-02-28  49000     2  59 1984.160     1610      1984
#> 2 1984-03-01  49002     3  61 1984.165     1611      1984
#> 3 1986-03-01  49732     3  61 1986.163     1635      1986
#> 4 1986-10-15  49960    10 289 1986.788     1642      1987