0

I'm trying to plot a pairwise plot for columns that will get returned from another function - so they will change. It could be columns 1,2,3 & 4 first time, next time it could be cols 3,6,8,& 12...and so on.

I'm currently hard coding my cols, how would I rewrite to accept a vector of numbers that represent the column indexes..?

pairs(~y[,48]+y[,52] + y[,53] + y[,56] + y[,58] + y[,59], data=y, col=cols)

So I have some numbers:

rerr <- c(2,67,34,7,8,4,5,6,9)

I then use this to find which I care about:

RowContribs <- which(rerr > 30)

I want to pass RowContribs to my pairwise plot.

Paul.

PaulBeales
  • 475
  • 1
  • 8
  • 21
  • When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. How do the numbers in `rerr` relate to the numbers in `pairs()`? – MrFlick Mar 01 '18 at 15:02
  • `pairs(x=MyMatrix[,RowContribs])` – Stephen Henderson Mar 01 '18 at 15:04

0 Answers0