By doing:
data = tips[,1:3]
pm <- ggpairs(data)
g11<-ggally_blank()
for(i in 1:ncol(data)) {
for(j in 1:ncol(data)) {
if(i<=j) {
pm <- putPlot(pm, g11, i, j)
}
}
}
You get rid of the axisLabels
from the side of the plot, and you get a 'blank' graph in the diagonal and upper triangle of the graph (as requested). In your case, the "18 columns" would be captured by ncol(data)
in the loop. Does that work?
It would look like this: