checks R version before comparing error message