rstudio - Rmarkdown 参数化报告 - 无法访问所选文件中的数据

标签 rstudio knitr r-markdown

我遇到的问题与上一篇文章 ( How do I access the data from a file passed as parameters in a RMarkdown document? ) 中定义的问题完全相同,但我没有找到(StackOverflow、谷歌...)任何解决问题的线索!

使用默认文件名,它可以工作!对于选定的文件(可能是同一个文件),我收到错误消息。

Quitting from lines 51-51 (WBD_MCS.Rmd) 
Error in file(file, "rt") : cannot open the connection
Calls: <Anonymous> ... withVisible -> eval -> eval -> read.csv2 -> read.table -> file
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'C:\Users\SESA40~1\AppData\Local\Temp\RtmpaMmix8/a6232463beeca55dd111a939/0': No such file or directory
Execution halted

我在 MacOSX 和 Windows 上遇到问题。

R version 3.2.5 (2016-04-14) -- "Very, Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

如果有人可以分享解决方案...

我的 .Rmd 文件的标题:

---
title: "Simulation de Monte Carlo pour une estimation Wideband Delphi"
author: "Alain BRET"
date: "28 avril 2016"
output:
  pdf_document:
    includes:
      before_body: tex/tex_before_body.tex
      in_header: tex/tex_header.tex
    number_sections: yes
    toc: yes
  html_document:
    number_sections: yes
    toc: yes
  word_document:
    toc: yes
params:
  nombre_occurences:
    input: slider
    label: "Nombre d'occurences:"
    max: 10000
    min: 1000
    step: 500
    value: 1000
  datafile:
    input: file
    label: 'Fichier des estimations des Experts:'
    value: data/estimation_data_2.csv
---

最佳答案

此问题已报告给 rstudio/rmarkdown#919并在 rmarkdown 包的 1.7 版中修复。 install.packages('rmarkdown') 就足够了。

关于rstudio - Rmarkdown 参数化报告 - 无法访问所选文件中的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36937549/

相关文章:

r - 在 R 演示文稿中绘制未填充幻灯片

knitr - RMarkdown ioslides 演示文稿中的引用页面被截断

latex - 如何使用 R Markdown 在 Github Pages 中编写包含 Latex 数学的博客?

r - knitr 在渲染 html 时将 (1) 更改为 <ol>?

r - 在 RMarkdown/knitr 中绘制边距

R/RStudio : graph scaling issues & fuzziness on high dpi screens

python - 为什么 python 上的 pmdarima 包中的 auto_arima 函数比 R 上可用的 auto.arima 函数慢得多?

r - ggplot2 绘制横向填充页面 (pdf)

RMarkdown : ! 包 pdftex.def 错误;找不到在线图片?

RStudio 本地 + R 云