How do I reference parameters that are literal strings ?
In the example below I want to get the min CONTACT_DATE in the dataframe
fx1 <- function(df1, pDate ) {
cat( as.Date( df1[ pDate] ) %>% min( na.rm = TRUE) );
}
# Print the Min CONTACT_DATE
fx1 ( df_Del0 , "CONTACT_DATE");
Thanks for your help Aubrey
tried different ways like
cat ( as.Date(df1[eval(parse(pDate)]) %>% min( na.rm = TRUE);