make_stack_dates: Add Valid Raster Stack Dates to Dataframe

View source: R/oisst_data_funs.R

make_stack_datesR Documentation

Add Valid Raster Stack Dates to Dataframe

Description

Add Valid Raster Stack Dates to Dataframe

Usage

make_stack_dates(point_location_df, year_col, month_col, day_col)

Arguments

point_location_df

Dataframe of point locations we wish to use to extract data from raster stack

year_col

name of the column that contains year information (unquoted text)

month_col

name of the column that contains the month information (unquoted text)

day_col

name of the column that contains the day information (unquoted text)

Details

Takes a dataframe object containing columns for the year, month, and day and creates a new "valid_dates" column that will match the naming convention for a raster stack object, i.e. names(raster_stack) which cannot start with a number or contain spaces or underscores. Month and day values are left-padded with zeros to maintain consistent string length.

Value

df_out Original dataframe with added "valid_dates" column


gulfofmaine/gmRi documentation built on Jan. 26, 2025, 5:12 a.m.