In my table below, I'm attempting to create a scatterplot between X3-X3.6
against the risk score to see if there is any correlation. I have all this data stored in a data frame.
I'm new to R. What is the best way to extract this data? I'm using plot
and pairs
and multiple lines of code to extract different columns and it's getting extremely messy.
Attempt
plot(cancerData[2], cancerData[3])
which corresponds to risk score col in Risk.Score and X3.GAL
This results in the following error:
Error in stripchart.default(x1, ...) : invalid plotting method