In this article, we are going to compare pairs and ggpairs functions in R. 1. pairs() in Rpairs() function mainly used to plot a scatter diagram corresponding to each data frame. Syntax: pairs(data)This will return with Color, Labels, Panels, and by Group in-pairs plot. We will make use of mtcars package here. Let’s store some variable into data. Naive Bayes Classification in R » Prediction Model