Skip to content

Surface plot of multivariate time series

6 messages · Paul Gilbert, Shane Conway, Jeff Ryan +1 more

#
Hi, I have following multivariate time series :
start = as.Date("01/01/05", format="%m/%d/%y")
end = as.Date("12/31/05", format="%m/%d/%y")
dates = seq(start, end, by=1)

dat = matrix(rnorm(length(dates)*4), length(dates))
dat1 = t(apply(dat, 1, function(x) x+t(c(100, 110, 120, 130))))

library(zoo)
dat2 = zoo(dat1, dates); head(dat2)

Now I want to get "surface plot" wherein x-axis is time, y-axis represents
1,2,3,4, and z-axis is for values of "dat2". Is there any R drawing device
to do that?

Regards,
#
megh wrote:
tfpersp in package tramePlus does this.
====================================================================================

La version fran?aise suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential information, and the Bank of
Canada does not waive any related rights. Any distribution, use, or copying of this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately from
your system and notify the sender promptly by email that you have done so. 

------------------------------------------------------------------------------------

Le pr?sent courriel peut contenir de l'information privil?gi?e ou confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires d?sign?s est interdite. Si vous recevez
ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer sans d?lai ?
l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? de votre
ordinateur toute copie du courriel re?u.
#
It is saying that, this package is not available :
Warning in install.packages("tramePlus") :
  argument 'lib' is missing: using
'C:\Users\Arrun's\Documents/R/win-library/2.9'
--- Please select a CRAN mirror for use in this session ---
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
  package ?tramePlus? is not available

Any better idea please?
megh wrote:

  
    
#
It's actually tframePlus: http://cran.r-project.org/web/packages/tframePlus/.
On Tue, Jun 2, 2009 at 1:25 PM, megh <megh700004 at yahoo.com> wrote:
#
Shane beat me to it w.r.t the link...

That aside, I posted this a while back as an example for doing what
you want.  quantmod will be getting this natively at some point, but
for now the code can serve as an example:

http://www.quantmod.com/examples/chartSeries3d/

HTH
Jeff
On Tue, Jun 2, 2009 at 12:31 PM, Shane Conway <shane.conway at gmail.com> wrote:

  
    
#
I have installed that, but getting following error while loading that :
Loading required package: tframe
Loading required package: setRNG
Error : object 'tfSet' not found whilst loading namespace 'tframePlus'
Error: package/namespace load failed for 'tframePlus'

Any way out please?
megh wrote: