S4 documentation of "[" with 'missing' arguments

This question is very similar to this question but when I try the answer I receive an addition 'NOTE' following R CMD check . Although it is just a NOTE I would really like to have a completely clean check. * checking Rd line widths ... NOTE Error: 8: no comma in argument list following S4method Execution halted I can get rid of this if I pass all the other parameters ( i,j,drop ) and

有“缺少”参数的“[”的S4文档

这个问题与这个问题非常相似,但是当我尝试答案时,我在R CMD check收到一个附加'NOTE'。 虽然它只是一个NOTE我真的很想有一个完全干净的检查。 * checking Rd line widths ... NOTE Error: 8: no comma in argument list following S4method Execution halted 如果我通过所有其他参数( i,j,drop )并记录所有参数但我不使用它们,我可以摆脱这种情况。 在我看来,如果在这种情况下不需要添加额外的文档,那将是一

simultaneous download using download.file

Since the version 3.2.1, the official R document says that there is support for simultaneous downloads. Following is the quoted text from help file: Support for method "libcurl" is optional: use capabilities("libcurl") to see if it is supported on your build. It provides (non-blocking) access to https:// and ftps:// URLs. There is support for simultaneous downloads, so ur

使用download.file同时下载

自从3.2.1版本以来,官方的R文件表示支持同时下载。 以下是帮助文件中的引用文本: 对“libcurl”方法的支持是可选的:使用功能(“libcurl”)来查看它是否受到构建支持。 它提供(非阻塞)访问https://和ftps:// URL。 支持同时下载,因此url和destfile可以是大于1的相同长度的字符向量。 对于单个URL和quiet = FALSE,交互式使用会显示进度条。 但是当我试图从两个不同的网站下载两个文件时,它只下载了一个: url_list

Insert multiple images in for

I have five images stored as follows (where "currentDirectory" is the result I get from the command getwd()): currentDirectory/results/thePlot_1.jpg currentDirectory/results/thePlot_2.jpg currentDirectory/results/thePlot_3.jpg currentDirectory/results/thePlot_4.jpg currentDirectory/results/thePlot_5.jpg I am trying to write a .Rnw script in Rstudio that will create the .tex file that

在for中插入多个图像

我有五个图像存储如下(其中“currentDirectory”是从命令getwd())得到的结果: currentDirectory/results/thePlot_1.jpg currentDirectory/results/thePlot_2.jpg currentDirectory/results/thePlot_3.jpg currentDirectory/results/thePlot_4.jpg currentDirectory/results/thePlot_5.jpg 我正尝试在Rstudio中编写一个.Rnw脚本,该脚本将创建.tex文件,然后运行pdflatex以使.pdf文件包含这五个图像。 以下是我目前所尝试的

Cannot include figures via R/Sweave/LaTeX

I am trying to create a pdf vs R/Sweave/LaTeX that will include a plot. Here is the relevant snippet from my .Rnw file: begin{figure} begin{center} <<fig=TRUE,echo=FALSE>>= makeMyPlot() @ end{center} label{fig:one} end{figure} When I run Sweave it generates a .pdf file named "analysis report-005.pdf" and a .tex file including the following line: includegraphics{analysis

不能通过R / Sweave / LaTeX包含数字

我正在尝试创建一个包含剧情的PDF与R / Sweave / LaTeX。 以下是我的.Rnw文件中的相关代码片段: begin{figure} begin{center} <<fig=TRUE,echo=FALSE>>= makeMyPlot() @ end{center} label{fig:one} end{figure} 当我运行Sweave时,它会生成一个名为“analysis report-005.pdf”的.pdf文件和一个包含以下行的.tex文件: includegraphics{analysis report-005.pdf} 到现在为止还挺好。 但是当我跑步 tools::texi

workflow between Latex and R screwed

Trying to write my second Latex file documentclass{article} title{simple Sweave script} usepackage{/Users/Brenden/Documents/R/R-2.15.1/share/texmf/tex/latex/Sweave} begin{document} maketitle This is a simple script to demonstrate Sweave. Let's begin by generating some results <<>>= x=rnorm(30) y=rnorm(30) mean(x) cor(x,y) @ and follow that up with some random text end{document} Fi

Latex和R之间的工作流程已拧紧

试图写我的第二个Latex文件 documentclass{article} title{simple Sweave script} usepackage{/Users/Brenden/Documents/R/R-2.15.1/share/texmf/tex/latex/Sweave} begin{document} maketitle This is a simple script to demonstrate Sweave. Let's begin by generating some results <<>>= x=rnorm(30) y=rnorm(30) mean(x) cor(x,y) @ and follow that up with some random text end{document} 以.Rnw作为扩

What exactly does R CMD Sweave

I noticed this in the changes of R 2.14: R CMD Sweave now has a --pdf option to produce a PDF version of the processed Sweave document. Trying it out, I noticed that it not only ran pdfLaTeX on the resulting tex but also correctly included bibTeX references and cleaned up afterwards. Seems like a very very nice way of using Sweave now (not to mention how easy it now is to implement the whole

R CMD Sweave究竟是什么?

我在R 2.14的变化中注意到这一点: R CMD Sweave现在有一个--pdf选项来生成已处理的Sweave文档的PDF版本。 尝试一下,我注意到它不仅在生成的tex上运行pdfLaTeX,而且还正确地包含了bibTeX引用并在之后进行了清理。 看起来像现在使用Sweave的非常好的方式(更不用说现在在编辑器中实现整个例程是多么容易)。 但是现在究竟是什么运行? 我找不到更多的细节。 看起来Sweave - > pdflatex - > bibtex - > pdf

sweave and ggplot2: no pdfs generated at all

I am trying create a sweave report that contains some graphics done with ggplot2. Though I am looking for some environment for the long run – I just use a simple .Rnw file here that only contains the code and the plot documentclass[a4paper]{article} SweaveOpts{echo=FALSE} usepackage{a4wide} begin{document} begin{figure}[htbp] begin{center} <<>>= library(ggplot2) x=rnor

sweave和ggplot2:完全不生成pdf

我正在尝试创建一个包含用ggplot2完成的一些图形的sweave报告。 尽管我从长远看寻找一些环境 - 我只是在这里使用一个简单的.Rnw文件,它只包含代码和图表 documentclass[a4paper]{article} SweaveOpts{echo=FALSE} usepackage{a4wide} begin{document} begin{figure}[htbp] begin{center} <<>>= library(ggplot2) x=rnorm(100) qplot(x) @ caption{My Graph} end{center} end{figure} end{doc

Extracting Code of R function to be used in knitr with controled width

We can use formatR::usage(lm) to get the arguments of lm function and can use the following command to redirect the output to knitr : <<test, code=formatR::usage(lm), eval=FALSE>>= @ I wonder if there is such function to get the lm function code to redirect to knitr . Edited Got the code of lm function to be used in knitr using the following code (as suggested by @JoshO'Brie

提取R函数的代码用于控制宽度的针织物

我们可以使用formatR::usage(lm)来获取lm函数的参数,并可以使用以下命令将输出重定向到knitr : <<test, code=formatR::usage(lm), eval=FALSE>>= @ 我想知道是否有这样的函数让lm函数代码重定向到knitr 。 编辑 使用下面的代码获得了用于knitr的lm函数的代码(如@ JoshO'Brien所建议的): <<test, code=lm, eval=FALSE>>= @ 但无法弄清楚如何控制knitr输出的width 。 为了嵌入一些函数

Boolean operators && and

According to the R language definition, the difference between & and && (correspondingly | and || ) is that the former is vectorized while the later is not. According to the help text, I read the difference akin to the difference between an "And" and "AndAlso" (correspondingly "Or" and "OrElse")...meaning that not all evaluations if they don&#

布尔运算符&&和

根据R语言定义, &和&& (对应|和|| )之间的区别在于前者是向量化的,而后者不是。 根据帮助文本,我读了类似于“And”和“AndAlso”(相应地“Or”和“OrElse”)之间差异的差异...意味着并非所有评估如果它们不必是(即如果A为真,则A或B或C总是为真,因此如果A为真,则停止评估) 有人能在这里发光吗? 另外,R中是否还有AndAlso和OrElse? 较短的是矢量化的,这意味着它们可以返回一个矢量,如下所示: ((-2:2)

Unicode character with subscript

I want to add a Unicode character which has two letters as subscripts to my plot legend in R. The character is an r with an accent breve (ř) and the two letters are i and j. I already looked at this question: Unicode character with superscript and tried to adapt the answers to my problem. Here is what I tried: plot(1,pch=NA,ylab="",xlab="",axes=F) legend("top",legend=paste("1-","u{0159}"),bt

带下标的Unicode字符

我想添加一个Unicode字符,其中包含两个字母作为我的情节图例中的下标。字符是一个带有口音(r)的r,两个字母是i和j。 我已经看过这个问题:带上标的Unicode字符,并尝试将答案适应于我的问题。 这是我试过的: plot(1,pch=NA,ylab="",xlab="",axes=F) legend("top",legend=paste("1-","u{0159}"),bty ="n",bg = "white",cex=2) legend("center",legend=paste("1-","u{0159}","u{0069}","u{006A}"),bty="n",bg = "white",ce