2017-12-20 8 views
0

나는 HTML (또는 심지어 PDF)로 기본 Rmarkdonw 코드 (mtcars에 관한)를 짜내려고 노력 중이며 작동하지 않습니다.r에 뜨개질하는 동안 "호출 : 라이브러리 실행이 중지되었습니다"오류를 수정하는 방법?

Error in !character.only : invalid argument type 
Calls: library 
Execution halted 

다음 니트의 기본 코드 :

--- 
title: "Untitled" 
author: "Piyush Verma" 
date: "December 19, 2017" 
output: html_document 
--- 

```{r setup, include=FALSE} 
knitr::opts_chunk$set(echo = TRUE) 
``` 

## R Markdown 

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. 

When you click the **Knit** button a document will be generated that includes both contents as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: 

```{r cars} 
summary(cars) 
``` 

## Including Plots 

You can also embed plots, for example: 

```{r pressure, echo=FALSE} 
plot(pressure) 
``` 

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. 

나는 또한 다음과 같은 일을 시도했지만 아무것도 일하지 :

  1. 는 Rmarkdown 콘솔에서 전체 오류 메시지는 다음과 Tools ->Global options ->Sweave ->Weave RNW files using ... sweave ~ knitr
  2. rmarkdown 및 knitr 모두를 다시 설치하고

어떤 제안이 많이 감사 니트 옵션을 실행하기 전에 라이브러리를 부착. 이것은 John Hopkin의 Practical Machine Learning Course에 대한 최종 프로젝트 제출과 관련됩니다.

+2

오류없이 나를 위해 코드가 실행됩니다. –

+0

@Hardikgupta 설정을 알려 주시겠습니까? –

+0

설정이 전혀 없습니다. 방금 새로운 마크 다운 파일을 만들고 코드를 실행했습니다. –

답변

0

안녕하세요.

R 및 RStudio를 모두 다시 설치하여 문제를 해결할 수있었습니다. 기본 Rmarkdown 코드를 다시 설치하고 실행 한 후 RStudio는 Rmarkdown 패키지를 다시 설치하려고하고 끝에 작동했습니다.

감사합니다.

관련 문제