Graph subtle changes after using knitr from markdown

Using knitr and markdown packages to weave Rmd files to markdown and then html is producing some unexpected behavior in the way that ggplot2 graphs are appearing in the final html file. For example, using the following Rmd file diamond.Rmd # ggplot2 graph shows up fainter, and text smaller ```{r echo=FALSE, message=FALSE, warning=FALSE} opts_chunk$set(fig.width=18, fig.height=10) require(g

从降价使用knitr后图形发生细微变化

使用knitr和markdown软件包将Rmd文件编织为markdown,然后html以ggplot2图形出现在最终html文件中的方式产生一些意外的行为。 例如,使用以下Rmd文件diamond.Rmd # ggplot2 graph shows up fainter, and text smaller ```{r echo=FALSE, message=FALSE, warning=FALSE} opts_chunk$set(fig.width=18, fig.height=10) require(ggplot2) ``` *** # Simple Plot ```{r echo=FALSE, message=FALSE, warning=FALSE} data(d

How can I shut down Rserve gracefully?

I have tried many options both in Mac and in Ubuntu. I read the Rserve documentation http://rforge.net/Rserve/doc.html and that for the Rserve and RSclient packages: http://cran.r-project.org/web/packages/RSclient/RSclient.pdf http://cran.r-project.org/web/packages/Rserve/Rserve.pdf I cannot figure out what is the correct workflow for opening/closing a connection within Rserve and for sh

我怎样才能优雅地关闭Rserve?

我在Mac和Ubuntu上都尝试过很多选项。 我阅读了Rserve文档 http://rforge.net/Rserve/doc.html 而对于Rserve和RSclient软件包: http://cran.r-project.org/web/packages/RSclient/RSclient.pdf http://cran.r-project.org/web/packages/Rserve/Rserve.pdf 我无法弄清楚在Rserve中打开/关闭连接以及正常关闭Rserve的正确工作流程。 例如,在Ubuntu中,我使用./config --enable-R-shlib从源代码安装了R(在Rserve文档

Scatterplot matrix with logarithmic axes in R

I am trying to create a scatterplot matrix from my dataset so that in the resulting matrix: I have two different groups based on Quarter of the year (distinguished as the colours of points) Day type (shape of points indicating, is it weekend or casual day between Monday and Friday) Logarithmic-scaled x and y axes. Values on axis tick labels are not logarithmic ie values should be shown

在R中具有对数轴的散点图矩阵

我正在尝试从我的数据集创建散点图矩阵,以便在结果矩阵中: 我有两个不同的组 年度季度(以点数的颜色区分) 日类型(表示星期一至星期五之间的周末或休闲日) 对数缩放的x和y轴。 轴刻度标签上的值不是对数,即值应该在轴上显示为0到350之间的整数,而不是它们的log10对应值。 上面板每个季度都有相关值。 到目前为止,我尝试过使用函数: 对() ggpairs()[来自GGally包] scatterplotMatrix() splo

How to read data when some numbers contain commas as thousand separator?

I have a csv file where some of the numerical values are expressed as strings with commas as thousand separator, eg "1,513" instead of 1513 . What is the simplest way to read the data into R? I can use read.csv(..., colClasses="character") , but then I have to strip out the commas from the relevant elements before converting those columns to numeric, and I can't find a

当一些数字包含逗号作为千位分隔符时如何读取数据?

我有一个csv文件,其中一些数值用逗号表示为千位分隔符,例如"1,513"而不是1513 。 将数据读入R的最简单方法是什么? 我可以使用read.csv(..., colClasses="character") ,但是在将这些列转换为数字之前,我必须从相关元素中read.csv(..., colClasses="character")逗号,并且我找不到完成该操作的方法。 不知道如何让read.csv正确解释它,但可以使用gsub将","替换为""

Include archived CRAN package in package

I'm creating an R package, and I would like to rely on the falsy package, which has recently been archived from CRAN. With a non-archived package, one would typically add the name of the package to the Imports list in the DESCRIPTION file. How does one import a package that's been archived by CRAN? Note: After contacting Gábor it seems the reason falsy is archived is due to potential

包含归档的CRAN软件包

我正在创建一个R包,我想依赖最近从CRAN归档的falsy包。 使用非归档软件包时,通常会将软件包名称添加到DESCRIPTION文件中的Imports列表中。 如何导入由CRAN归档的软件包? 注意:在与Gábor联系之后,似乎falsy被归档的原因是由于本地和falsy虚假概念之间潜在危险的不一致性。 他不打算解包该软件包。 这个: FALSY <- FALSE TRUTHY <- TRUE is_falsy <- function(object) { is.null(object) || identi

CRAN package in CRAN package

The question is pretty simple. First: Is it possible to include a non-CRAN (or bioconductor, or omega hat) package in a CRAN package and actually use tools from that package in examples. If yes how does one set up the DESCRIPTION file etc. to make it legit and pass CRAN checks? Specifically I'm asking about openNLPmodels.en that used to be a CRAN package. It's pretty useful and wa

CRAN包中的CRAN包

这个问题很简单。 第一: 在CRAN软件包中是否可以包含非CRAN(或bioconductor或omega hat)软件包,并在实例中实际使用该软件包中的工具。 如果是,如何设置DESCRIPTION文件等来使其合法并通过CRAN检查? 具体来说,我问的是过去是CRAN软件包的openNLPmodels.en 。 这非常有用,并希望包含它的功能。 我可以在示例中做一些工作,而不是实际使用openNLPmodels.en ,或者为它创建单元测试,并在函数得到使用时安装它(类

checking CRAN incoming feasibility ... NOTE Maintainer

When I run R CMD check --as-cran on my package, the one note I still get is: checking CRAN incoming feasibility ... NOTE Maintainer:[my name] <my email> I can't seem to find a good explanation of this note, although I haven't read anything that tells my I should be concerned about it. As anyone else run into this? Is there anything I can do that will clear the note? According

检查CRAN的可行性......注意维护者

当我在包装上运行R CMD check --as-cran时,我仍然得到的一个注释是: checking CRAN incoming feasibility ... NOTE Maintainer:[my name] <my email> 虽然我没有看过任何告诉我应该关注它的东西,但我似乎无法找到本说明的好解释。 当其他人遇到这个? 我能做些什么来清除笔记吗? 据CRAN维护人Uwe Ligges称, 这只是一个提醒CRAN维护人员检查提交来自维护人员而不是其他人的提示。 因此,忽略这样的信息是安

Uploading multiple interdependent packages to CRAN

I am preparing three R packages to soon upload to CRAN which are interdependent. Specifically, package A is already on CRAN and to be updated, package B is independent and package C depends on both the latest versions of A and B . I could do this without having problems in checks by first uploading A and C and uploading B a few days later. But, I would like to immediately put crossreferences

将多个相互依赖的软件包上传到CRAN

我正在准备三个R包,以便很快上传到相互依赖的CRAN。 具体来说,程序包A已经在CRAN上并且要更新,程序包B是独立的,程序包C依赖于最新版本的A和B 我可以在没有检查问题的情况下通过首先上传A和C并在几天后上传B来做到这一点。 但是,我想立即在帮助页面中添加交叉引用,并将所有软件包添加到彼此的建议列表中。 此外,由于我将进一步开发所有三个,我希望能够在未来同时更新它们。 所以,这里的问题是,是否有可能同时向C

CRAN Package Depends on Bioconductor Package Installing error

I manage the Depends, suggests and imports of the description file. and finally I submit my package to CRAN . But during installation the package, it only install the packages which are deposited under CRAN not for bioconductor packages. besides, it has a package dependencies error for Mac OS: check log for Mac OS what could be the problem? and how could I fixed it? Kind regards, There

CRAN包装取决于Bioconductor包装安装错误

我管理取决于,建议和导入描述文件。 最后我将我的软件包提交给CRAN 。 但是在安装封装时,它仅安装放置在CRAN下的封装,不用于bioconductor封装。 此外,它还具有Mac OS的程序包依赖性错误:检查Mac OS的日志 可能是什么问题呢? 我该如何修复它? 亲切的问候, 没有任何机制可以通过R(默认情况下,默认情况下,Bioconductor可以从Bioconductor安装install.packages()安装.packages install.packages() ,如果BioC具

How to tell CRAN to install package dependencies automatically?

I develop a package in R and when I check and build it in my local computer it works properly. But when I tried it in CRAN, I get a package dependencies error. My package depends on two functions of other packages. If I list the other packages under the description using Depends or imports , will it be automatically installed with the new package? Or do I need to explicitly invoke the functi

如何让CRAN自动安装软件包依赖关系?

我在R中开发一个包,当我在本地计算机中检查并构建它时,它可以正常工作。 但是当我在CRAN中尝试它时,出现软件包依赖性错误。 我的软件包取决于其他软件包的两个功能。 如果我列出了下其他包description使用Depends或imports ,它会自动与新包安装? 或者我需要在使用其他包的函数下显式调用函数install.packages("packagename") 。 如果这一切都是错误的,那么解决R包依赖关系的最好方法是通过R CMD check并bu