I would like to test if an element of a list exists, here is an example
foo <- list(a=1)
exists(\'foo\')
TRUE #foo does exist
exists(\'
A slight modified version of @salient.salamander , if one wants to check on full path, this can be used.
Element_Exists_Check = function( full_index_path ){
tryCatch({
len_element = length(full_index_path)
exists_indicator = ifelse(len_element > 0, T, F)
return(exists_indicator)
}, error = function(e) {
return(F)
})
}