Windows 7 64位上的RStudio v0.97--color2D.matplot将不会使用Rmarkdown连接到html
我试图在Rstudio中使用Rmarkdown将以下绘图生成为html文档:Windows 7 64位上的RStudio v0.97--color2D.matplot将不会使用Rmarkdown连接到html,r,knitr,rstudio,r-markdown,R,Knitr,Rstudio,R Markdown,我试图在Rstudio中使用Rmarkdown将以下绘图生成为html文档: color2D.matplot(M,cs1=c(0,1),cs2=c(0,1),cs3=c(0,1), extremes=c(1,3),cellcolors=NA,show.legend=TRUE,nslices=10,xlab="Base Price (R)", ylab="GP (%)",do.hex=FALSE,axes=FALSE,show.val
color2D.matplot(M,cs1=c(0,1),cs2=c(0,1),cs3=c(0,1),
extremes=c(1,3),cellcolors=NA,show.legend=TRUE,nslices=10,xlab="Base Price (R)",
ylab="GP (%)",do.hex=FALSE,axes=FALSE,show.values=FALSE,vcol=NA,vcex=1,
border="black",na.color=NA,xrange=NULL,color.spec="rgb",yrev=TRUE,
xat=NULL,yat=NULL,Hinton=FALSE)
但我得到了以下错误:
## Error: could not find function "color2D.matplot"
但是,在Rstudio“绘图”显示中,绘图生成得非常完美。是否可以采取一些措施,使Rmarkdown能够找到函数并显示输出?谢谢在调用函数之前使用
library(plotrix)
调用它的函数color2D.matplot()
您能提供一个M
的示例吗,这样我们就可以复制它了?一个很好的方法是运行dput(M)
。我认为您只需要在块中添加require(plotrix)
。