[R-SIG-Finance] R - Error Question for chart.Correlation(PerformanceAnalytics)

Guy Yollin guy.yollin at rotellacapital.com
Tue Jan 8 17:08:06 CET 2008


Hi Michel,

I defer to the original authors of this very useful package, but I
believe it is simply a coding error.

In the last few lines of the chart.Correlation function there are a
couple of calls to the pairs function:

	pairs(x, y, gap = 0, lower.panel = ...

I believe x and y should be bound together in the call as follows:

	pairs(cbind(x,y), gap = 0, lower.panel = ...

Essentially, that was what you were doing with your 1:3.

Also, it appears that a couple of the datasets (managers and edhec) have
what should really be the rownames as the first column of data in the
dataframe.  I did the following to get some of the examples to work:

rn <- edhec[,1]
edhec <- edhec[,-1]
rownames(edhec) <- rn

rn <- managers[,1]
managers <- managers[,-1]
rownames(mananagers) <- rn

Hope this is helpful.

Best,

-- G


-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of MAB
Sent: Wednesday, January 02, 2008 9:27 AM
To: r-sig-finance at stat.math.ethz.ch
Subject: [R-SIG-Finance] R - Error Question for
chart.Correlation(PerformanceAnalytics)

Hi!

I am a new user of this user group. Apologies if this is question has an
obvious
answer.


While I ran the below function from PerformanceAnalytics (edhec is a
matrix
provided with the library), this is the error I get

chart.Correlation(edhec[,1],edhec[,3])
Error in pairs.default(x, y, gap = 0, lower.panel = panel.smooth,
upper.panel =
panel.cor,  : 
        only one column in the argument to 'pairs'


When I run the below, things work

chart.Correlation(edhec[,1:3],edhec[,1:3])

Any idea?

MAB

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. 
-- If you want to post, subscribe first.



More information about the R-SIG-Finance mailing list