How to automatically create BibTex citations for R packages in knitr file?

I am not sure whether this an R, LaTeX, or BibTex problem. I am trying to automatically generate a .bib file containing citations for R packages and then list them at the end. I am able to generate the BibTex file and I don't see anything wrong with the BibTex file, but the entries don't appear when I compile the PDF. I'm not sure if R is not producing a BibTex file correctly, if

如何在knitr文件中自动创建R包的BibTex引用?

我不确定这是R,LaTeX还是BibTex问题。 我试图自动生成一个包含R包引用的.bib文件,然后在最后列出它们。 我能够生成BibTex文件,并且我没有看到BibTex文件有任何问题,但是编译PDF时没有出现这些条目。 我不确定是否R没有正确生成BibTex文件,如果某些LaTeX语法错误,或者BibTex文件需要预编译或者其他什么。 我注意到bibliography{NOT A REAL FILENAME}会产生一个没有抱怨的References部分,但我不认为这是问题所在。

Changing font in PDF produced by rmarkdown

I am producing reports using rmarkdown. When knitting a PDF --- title: "Untitled" output: pdf_document --- I would like to specify the font to be used in creating the PDF. The official documentation (see section "LaTeX Options) says I can do this. However, I've never used LaTeX and fail to understand how such selection can be made in YAML options at the top of the .Rmd document use

更改由rmarkdown生成的PDF中的字体

我正在使用rmarkdown生成报告。 编织PDF时 --- title: "Untitled" output: pdf_document --- 我想指定用于创建PDF的字体。 官方文档(请参阅“LaTeX选项”一节)说我可以做到这一点。 但是,我从来没有使用过LaTeX,也无法理解如何在rmarkdown软件包使用的.Rmd文档顶部的YAML选项中进行选择。 问题:如何更改由rmarkdown生成的PDF中的字体? sessionInfo()R版本3.1.0(2014-04-10)平台:x86_64-w64-mingw32 / x64(64

Timed exit from a shell command

I have a shell script to generate two types of reports. Each report is generated by executing a Sweave script and then compiling a PDF out of the resulting tex file. eval "R CMD Sweave Weekly.Rnw" eval "pdflatex Weekly.tex" eval "R CMD Sweave Daily.Rnw" eval "pdflatex Daily.tex" For instance, if there is an error when executing 'R CMD Sweave Weekly.Rnw', it exits but still generates a

从shell命令定时退出

我有一个shell脚本来生成两种类型的报告。 每个报告都是通过执行Sweave脚本,然后从生成的tex文件中编译PDF生成的。 eval "R CMD Sweave Weekly.Rnw" eval "pdflatex Weekly.tex" eval "R CMD Sweave Daily.Rnw" eval "pdflatex Daily.tex" 例如,如果在执行'R CMD Sweave Weekly.Rnw'时出错,它会退出但仍然生成一个tex文件(我检查过的文件不能被停止),并且这个tex文件在pdflatex中无法正确编译,即'pdflatex

More efficient R / Sweave / TeXShop work

I've now got everything to work properly on my Mac OS X 10.6 machine so that I can create decent looking LaTeX documents with Sweave that include snippets of R code, output, and LaTeX formatting together. Unfortunately, I feel like my work-flow is a bit clunky and inefficient: Using TextWrangler, I write LaTeX code and R code (surrounded by <<>>= above and @ below R code chunk)

更高效的R / Sweave / TeXShop工作

我现在已经在我的Mac OS X 10.6机器上正常工作,以便我可以使用Sweave创建体面的LaTeX文档,其中包括R代码片段,输出和LaTeX格式。 不幸的是,我觉得我的工作流程有点笨重和低效: 使用TextWrangler,我在一个.Rnw文件中一起编写了LaTeX代码和R代码(由<< >> = above和@下面的R代码块包围)。 保存更改后,我使用Sweave命令从R调用R的.Rnw文件 Sweave(file="/Users/mymachine/Documents/Assign4.Rnw",

R Sweave user defined function

I´m writing up a small function giving a combined conditional density and empirical cumulative distribution plot. cdpl<-function(df,dep,indep){ attach(df) cdplot(dep~indep,xlab=deparse(substitute(indep)),ylab=deparse(substitute(dep))) g<-indep ec<-ecdf(indep) lines(knots(ec),as.numeric(names(table(ec(g)))),col="red",lw=3) detach(df) } This works fine, howev

R Sweave用户定义的功能

我正在写一个小函数给出一个组合的条件密度和经验累积分布图。 cdpl<-function(df,dep,indep){ attach(df) cdplot(dep~indep,xlab=deparse(substitute(indep)),ylab=deparse(substitute(dep))) g<-indep ec<-ecdf(indep) lines(knots(ec),as.numeric(names(table(ec(g)))),col="red",lw=3) detach(df) } 这工作正常,但是当我试图发誓它,我的运气全部出来...... <<fig1,fig=T>

Incorporate Leaflet map in revealjs presentation within R

I'm trying to add a Leaflet map with tiles to a revealjs_presentation created in R. This map renders fine in ioslide or html format, but not in the revealjs_presentation format (main problems: all fonts are much too large and the map has strange artifacts around polygon boundaries when selected). Because the map works well in other output formats I suspect the issue has to do with some kind

将宣传单地图合并到R中的revealjs演示文稿中

我试图在tile中添加一个Leaflet地图到revealjs_presentation中。这张地图在ioslide或者html格式中表现得很好,但是在revealjs_presentation格式中没有表现出来(主要问题:所有字体太大,地图有奇怪的工件在选择时围绕多边形边界)。 由于地图在其他输出格式中运行良好,我怀疑这个问题与revealjs_presentation和leaflet之间的某种CSS不兼容有关。 为了隔离两组代码,我使用htmlwidgets保存了传单地图。 这张地图看起来不错

Single bar stacked chart in DC

I am trying to populate a single column stacked bar chart. It is just a sum of one value stacked over the other ie the sum of 'LB' experiments stacked over the 'Random' experiments. Since I need to give a dimension value to the chart I have assumed a Dim variable with 1 as its value for both lb and random. I am getting the above described data using the following code: d3.cs

直流单杆堆积图

我试图填充单列堆积条形图。 它只是叠加在另一个值上的一个值的总和,即在“随机”实验上叠加的“LB”实验的总和。 因为我需要为图表提供一个维度值,所以我已经假定了一个Dim变量,其中1和lb都是随机值。 我使用以下代码获取上述数据: d3.csv("file:///D:/Optus/LARS T&L/Dashboard/html/dummy2.csv",function(error, experiments) { var ndx = crossfilter(experiments), rDim = ndx.dimensio

How to handle very large bimodal edge list in R igraph?

Is there a suggested method to work with very large networks in igraph? I have a bimodal edge list with > 1.5M rows. It looks like this: Person Entity 1006542 2074562 1006542 2024740 1009621 2053211 I want to convert this to a unimodal network so I can calculate node centrality metrics. I am trying to use igraph's bipartite projection function. My machine (x64 with 32GB RAM)

如何处理R igraph中的非常大的双峰边界列表?

有没有一种建议的方法来处理igraph中的大型网络? 我有一个双列边缘列表,大于1.5M行。 它看起来像这样: 人员实体 1006542 2074562 1006542 2024740 1009621 2053211 我想将其转换为单峰网络,以便我可以计算节点中心性度量。 我正在尝试使用igraph的双向投影功能。 我的机器(具有32GB RAM的x64)无法处理它,我的Amazon EC2实例也无法处理64GB的RAM。 这是我的代码 library(igraph) huge <- read.csv(fi

After a certain point, my R program suddenly slows to a crawl. Why?

I'm teaching myself R. The details of the program may not matter, but it constructs a set of nodes (with eight parameters each, all integers) and edges (four integer parameters each). Initially, I tried storing these as lists of lists. However, when I tried to construct a very large set of nodes, the program went smoothly until there were about 30,000 nodes and 64,000 edges, and then slowed

在某一点之后,我的R程序突然变慢了。 为什么?

我教自己R.程序的细节可能并不重要,但它构造了一组节点(每个都有8个参数,所有整数)和边(每个都有4个整数参数)。 最初,我尝试将这些列表存储为列表。 但是,当我试图构建一个非常大的节点集时,程序顺利进行,直到有大约30,000个节点和64,000个边,然后非常突然地变慢。 我认为这个问题可能以某种方式涉及可用内存(尽管这些列表分别占用了19.3MB和39.5MB)。 我将分页文件大小从8097增加到12145 MB,并在12145处设置

Handle large data sets calculating SPI in R

I am processing a large global precipitation data-set (with very fine spatial resolution) to calculate the Standardized Precipitation Index using the SPEI package in R. I general my question refers to the optimization of data processing using very large data. I found some discussions in other posts (here, here, and here fo instance), but nothing seems similar to my case. My input is a matrix

处理大数据集计算R中的SPI

我正在处理大型全球降水数据集(具有非常精细的空间分辨率),以便使用R中的SPEI包计算标准化降水指数。 总的来说,我的问题是指使用非常大的数据优化数据处理。 我在其他帖子中发现了一些讨论(这里,在这里,这里是fo实例),但没有什么与我的情况类似。 我的输入是一个矩阵,其中超过20年的降水时间序列的月观测值(> 20 * 12行)为> 1,000,000点(列)。 SPI的计算为每个时间序列执行一系列步骤,并将该指数计算