I am using curve3d in the emdbook package to graph a gaussian copula density function generated via the copula package. Unfortunately, it appears that emdbook masks dmvnorm from the package mvtnorm in a way that prohibits copula from generating the gaussian copula. (Sounds very confusing!) For example,> library(copula) > f<-function(x,y) dcopula(normalCopula(0),c(x,y)) > library(emdbook) > curve3d(f)Error in dmvnorm(x, sigma = sigma) : unused argument(s) (sigma = sigma) Is there no way for me to use those two libraries together? Thanks, Dan [[alternative HTML version deleted]]
On Mar 13, 2010, at 12:01 PM, Daniel Murphy wrote:> I am using curve3d in the emdbook package to graph a gaussian copula > density > function generated via the copula package. Unfortunately, it appears > that > emdbook masks dmvnorm from the package mvtnorm in a way that prohibits > copula from generating the gaussian copula. (Sounds very confusing!) > For > example, >> library(copula) >> f<-function(x,y) dcopula(normalCopula(0),c(x,y)) >> library(emdbook) >> curve3d(f) > Error in dmvnorm(x, sigma = sigma) : unused argument(s) (sigma = > sigma) > > Is there no way for me to use those two libraries together?I don't get anything that looks very interesting as far as a graph, but at least I do not get an error when I first require package:emdbook and then require package:copula and then run your code, which i suspect is faulty on a semantic level. -- David.> > Thanks, > > Dan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD West Hartford, CT
Hi Dan, For this to work, the copula package should explicitly import dmvnorm from the mvtnorm package by including importFrom(mvtnorm, dmvnorm) in their NAMESPACE file. You can do the same thing and rebuild + reinstall the package to solve your problem quickly, but there might be some other imports of relevance (I cc'ed the maintainer). Best, Tobias jyan at stat.uconn.edu Daniel Murphy wrote:> I am using curve3d in the emdbook package to graph a gaussian copula density > function generated via the copula package. Unfortunately, it appears that > emdbook masks dmvnorm from the package mvtnorm in a way that prohibits > copula from generating the gaussian copula. (Sounds very confusing!) For > example, >> library(copula) >> f<-function(x,y) dcopula(normalCopula(0),c(x,y)) >> library(emdbook) >> curve3d(f) > Error in dmvnorm(x, sigma = sigma) : unused argument(s) (sigma = sigma) > > Is there no way for me to use those two libraries together? > > Thanks, > > Dan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >