Learn R Programming

berryFunctions (version 1.22.13)

bpairs: customized pairs plot

Description

pairs plot with cor in the lower panel (can handle NAs), nice hist on the diagonal, nice scatterplot in the upper panel. Based on the examples in pairs.

Usage

bpairs(df, main = NULL, pch = 16, col = addAlpha("blue"), ...)

Value

invisible NULL

Arguments

df

Data.frame. Can contain NAs. Character columns are excluded.

main

Title for the overall graph. DEFAULT: NULL (from input)

pch

Point character. DEFAULT: 16

col

Color. DEFAULT: addAlpha("blue")

...

Further arguments passed to pairs

Author

Berry Boessenkool, berry-b@gmx.de, Feb 2025

See Also

graphics::pairs

Examples

Run this code
bpairs(mtcars[,1:5])
mtcarsNAs <- mtcars[,1:5]
mtcarsNAs[2,3] <- NA
mtcarsNAs[2:8,4] <- NA
bpairs(mtcarsNAs)
bpairs(iris)

Run the code above in your browser using DataLab