Can any R expert help me with this?
I am trying to make a pairplot with a target variable using R
The python equivalent would be
pp = sns.pairplot(data=data,
x_vars=['age'],
y_vars=['weight', 'height', 'happiness'])
I have got a basic pair plot mocked up
data <- data.frame(soildatacleaned$pH,
soildatacleaned$Al,
soildatacleaned$As,
soildatacleaned$Ba,
soildatacleaned$Ca,
soildatacleaned$Cd,
soildatacleaned$Ce,
soildatacleaned$Co,
soildatacleaned$Cr,
soildatacleaned$Cu)
pairs(data)
I would like to make the target variable to be pH (soildatacleaned$pH) which I am comparing against data in other columns.
How would I expand this code?