我刚刚在14.04 Ubuntu上安装了最新的Rstudio(0.98.939)Rmarkdown过夜版本(请点几招Rstudio人员 - 你已经改变了用户体验!).(下面的SessionInfo).简单的脚本(只是一个表格和汽车数据集的图表)在HTML和Word中完美呈现,但在PDF格式中,我得到以下神秘错误......"未找到framed.sty'"
我欢迎建议或者这是一个需要报告的错误?:
这是rmarkdown日志:
processing file: Preview-25bc4ab5a01f.Rmd
|............. | 20%
ordinary text without R code
|.......................... | 40%
label: unnamed-chunk-1
|....................................... | 60%
ordinary text without R code
|.................................................... | 80%
label: unnamed-chunk-2 (with options)
List of 1
$ echo: logi FALSE
cropping ./Preview-25bc4ab5a01f_files/figure-latex/unnamed-chunk-2.pdf
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `./Preview-25bc4ab5a01f_files/figure-latex/unnamed-chunk-2.pdf'.
|.................................................................| 100%
ordinary text without R code
/usr/lib/rstudio/bin/pandoc/pandoc Preview-25bc4ab5a01f.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-25bc4ab5a01f.pdf --template /home/rob/R/x86_64-pc-linux-gnu-library/3.1/rmarkdown/rmd/latex/default.tex --highlight-style …Run Code Online (Sandbox Code Playgroud) 来自:https://www.rdocumentation.org/packages/purrr/versions/0.2.2/topics/map2 我们看到:
x <- list(1, 10, 100)
y <- list(1, 2, 3)
map2(x, y, ~ .x + .y)
Run Code Online (Sandbox Code Playgroud)
生成
2, 12, 103
Run Code Online (Sandbox Code Playgroud)
但如果需要的是:
2, 3, 4, 11, 12, 13, 101, 102, 103
Run Code Online (Sandbox Code Playgroud)
即:为每个x[i]添加所有成员y[*]
对于循环来说似乎很简单,但是......我显然在purrr中遗漏了一些明显的东西.