if(requireNamespace("ggpubr",quietly = TRUE)){
corscatterplot(iris,"Sepal.Length","Sepal.Width")
}else{
warning("Package 'ggpubr' needed for this function to work.
Please install it by install.packages('ggpubr')")
}
Run the code above in your browser using DataLab