2017-02-17 34 views
0

我不能編織,因爲這個錯誤我RMD文件:錯誤針織RMD文件,PDF

title: "R two" 
author: "Minoo " 
date: "Monday, February 13, 2017" 
output: 
    pdf_document: default 
    html_document: default 

處理文件:R_two.Rmd

|...                | 4% 
    ordinary text without R code 

    |.....               | 8% 
label: unnamed-chunk-1 
    |........               | 12% 
    ordinary text without R code 

    |...........              | 17% 
label: unnamed-chunk-2 
    |..............             | 21% 
    ordinary text without R code 

    |................             | 25% 
label: unnamed-chunk-3 
    |...................            | 29% 
    ordinary text without R code 

    |......................           | 33% 
label: unnamed-chunk-4 
    |........................           | 38% 
    ordinary text without R code 

    |...........................          | 42% 
label: unnamed-chunk-5 
    |..............................         | 46% 
    ordinary text without R code 

    |................................         | 50% 
label: unnamed-chunk-6 
    |...................................        | 54% 
    ordinary text without R code 

    |......................................       | 58% 
label: unnamed-chunk-7 
    |.........................................      | 62% 
    ordinary text without R code 

    |...........................................      | 67% 
label: unnamed-chunk-8 
    |..............................................     | 71% 
    ordinary text without R code 

    |.................................................    | 75% 
label: unnamed-chunk-9 
    |...................................................    | 79% 
    ordinary text without R code 

    |......................................................   | 83% 
label: unnamed-chunk-10 
    |.........................................................  | 88% 
    ordinary text without R code 

    |............................................................  | 92% 
label: unnamed-chunk-11 

Error in shell.exe(url) : '.report/report.html' not found calls: ... withVisible -> eval -> eval -> browseURL -> shell.exec Excution halted

任何想法來解決它? 我使用R-3.3.2版本和RStudio-1.0.136版本。

+0

你可以發佈你的腳本或至少與它相關的YAML而不是你的處理輸出嗎? –

+0

我的腳本非常大,我無法發佈,我無法理解YAML的意思嗎? @be_green – minoo

+0

@minoo的YAML是RMD之前會發生什麼tipically類似:'--- 標題: 「Metanalysis」 作者: 「德里克·科科倫」 日期: 「2017年2月13日」 輸出:pdf_document - -' –

回答

0

編輯是這樣,它應該工作

title: "R two" 
author: "Minoo " 
date: "Monday, February 13, 2017" 
output: 
    pdf_document: default 
0

我再次檢查了我的代碼,在RMD格式我找不到任何類型的錯誤,這錯誤發生時,我想將其轉換爲PDF格式或HTML格式。在我的代碼的一部分我有這個 庫(「ReportingTools」)

htmlRep <- HTMLReport(shortName="report", title="My report", 
         reportDirectory="./report") 
publish(resOrderedDF, htmlRep) 
url <- finish(htmlRep) 
browseURL(url) 

所以,通過這個代碼,它需要在瀏覽器中打開一個頁面。我刪除了這一行

browseURL(url) 

的代碼,並試圖再次轉換rmd文件,這一次它沒有發生。