Re: [R] Grabbing Column and Row titles

2012-01-27 Thread chuck.01
I would suggest reading some introductory manuals on R; specifically (with regards to your question) how to construct a function. Basically, "dat" is a variable input to the function. Everywhere you see "dat" is replaced by whatever you put in; for example: f(x) puts the data.frame "x" in for "

Re: [R] Grabbing Column and Row titles

2012-01-27 Thread chuck.01
This is true with regard to all things you don't understand in R... use question mark (?) # this will show you the manual, or help page ?dput also, make sure you hit the "quote" button when you reply on this forum so that people know what you are replying to. I used dput() to create the follo

Re: [R] Grabbing Column and Row titles

2012-01-27 Thread Carlos Ortega
Hello, Please check function which(). > > m <- matrix(1:12,3,4) > which(m==5, arr.ind=T) row col [1,] 2 2> which(m==9, arr.ind=T) row col [1,] 3 3 > Regards, Carlos Ortega www.qualityexcellence.es 2012/1/27 chuck.01 > Please use dput() to post your example matrix. > > > > >

Re: [R] Grabbing Column and Row titles

2012-01-27 Thread chuck.01
Please use dput() to post your example matrix. Rambler1 wrote > > I have run into a problem in my code. What I want to accomplish is this: > I have a user input stock symbols into a list and from there I run the > quantmod package to get historical data. I compute the correlation matrix > and