View source: R/oisst_data_funs.R
make_stack_dates | R Documentation |
Add Valid Raster Stack Dates to Dataframe
make_stack_dates(point_location_df, year_col, month_col, day_col)
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) |
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.
df_out Original dataframe with added "valid_dates" column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.