#' GEDI get date from filename
#'
#' This function get's the date from the filenmae as julian and as YYYY-MM-DD
#' @param file_nm filename as characterstring
#'
#' @keywords name date
#' @export
#' @examples
#' gedi_getdate()
#'
#' @import chron
gedi_getdate <- function(file_nm){
splt <- strsplit(file_nm, "_")[[1]]
orbit_datetime <- splt[3]
year <- as.numeric(substring(orbit_datetime, 1,4))
jul_dat <- as.numeric(substring(orbit_datetime, 5,7))
gedi_date <- chron::month.day.year(jul = jul_dat, origin = c(1,1,year))
return(gedi_date)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.