Error in YAML with R Markdown












1















I have the following R Markdown script called test.Rmd:



---
params:
results:
value: !r mtcars
---

```{r setup, echo=FALSE, include=FALSE}
df <- params$results
knitr::kable(df)
```


When I run the following in OpenCPU:



library(rmarkdown)
library(knitr)
rmarkdown::render("test.Rmd", output_format = "html_document")



Error in yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate), :
unused argument (eval.expr = TRUE)




I installed different versions of YAML and it didn't fix the problem.










share|improve this question

























  • Can you refine the question as it is currently difficult to work out where this could be going wrong. Some tips: 1) Use a dataset which others can recreate such as the mtcars dataset. 2) Does the 'EXPORT' function need to be defined or can you just run the render functions normally? 3) Change the file path to remove the system.file path and just create a relative path. In doing these changes, you may even discover the problem yourself.

    – Michael Harper
    Jul 27 '18 at 9:02













  • See my edits. By my understanding that should still show the error you are seeing. If it is not correct though, rollback the changes.

    – Michael Harper
    Jul 27 '18 at 9:09











  • Yes it throw the same error, even without the parameter: params = list(results = mtcars). If i write in the R markdown script params: results: !r mtcars and i execute rmarkdown::render("mtcarsexample.Rmd", output_format = "html_document") i get the same error

    – DanMed
    Jul 27 '18 at 9:37











  • Okay, I further edited your question. Please use this as an example of how to slim-down your questions in the future :) Are you sure all your packages are up to date? install.packages("rmarkdown") etc.

    – Michael Harper
    Jul 27 '18 at 9:51











  • Yes thx!!! Finally I have solved it. My installation of the yaml-2.1.14 package was corrupted. I have had to delete it manually and I have installed version 2.1.19. Since the latest version 2.2.0. also gave me problems

    – DanMed
    Jul 27 '18 at 10:30
















1















I have the following R Markdown script called test.Rmd:



---
params:
results:
value: !r mtcars
---

```{r setup, echo=FALSE, include=FALSE}
df <- params$results
knitr::kable(df)
```


When I run the following in OpenCPU:



library(rmarkdown)
library(knitr)
rmarkdown::render("test.Rmd", output_format = "html_document")



Error in yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate), :
unused argument (eval.expr = TRUE)




I installed different versions of YAML and it didn't fix the problem.










share|improve this question

























  • Can you refine the question as it is currently difficult to work out where this could be going wrong. Some tips: 1) Use a dataset which others can recreate such as the mtcars dataset. 2) Does the 'EXPORT' function need to be defined or can you just run the render functions normally? 3) Change the file path to remove the system.file path and just create a relative path. In doing these changes, you may even discover the problem yourself.

    – Michael Harper
    Jul 27 '18 at 9:02













  • See my edits. By my understanding that should still show the error you are seeing. If it is not correct though, rollback the changes.

    – Michael Harper
    Jul 27 '18 at 9:09











  • Yes it throw the same error, even without the parameter: params = list(results = mtcars). If i write in the R markdown script params: results: !r mtcars and i execute rmarkdown::render("mtcarsexample.Rmd", output_format = "html_document") i get the same error

    – DanMed
    Jul 27 '18 at 9:37











  • Okay, I further edited your question. Please use this as an example of how to slim-down your questions in the future :) Are you sure all your packages are up to date? install.packages("rmarkdown") etc.

    – Michael Harper
    Jul 27 '18 at 9:51











  • Yes thx!!! Finally I have solved it. My installation of the yaml-2.1.14 package was corrupted. I have had to delete it manually and I have installed version 2.1.19. Since the latest version 2.2.0. also gave me problems

    – DanMed
    Jul 27 '18 at 10:30














1












1








1








I have the following R Markdown script called test.Rmd:



---
params:
results:
value: !r mtcars
---

```{r setup, echo=FALSE, include=FALSE}
df <- params$results
knitr::kable(df)
```


When I run the following in OpenCPU:



library(rmarkdown)
library(knitr)
rmarkdown::render("test.Rmd", output_format = "html_document")



Error in yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate), :
unused argument (eval.expr = TRUE)




I installed different versions of YAML and it didn't fix the problem.










share|improve this question
















I have the following R Markdown script called test.Rmd:



---
params:
results:
value: !r mtcars
---

```{r setup, echo=FALSE, include=FALSE}
df <- params$results
knitr::kable(df)
```


When I run the following in OpenCPU:



library(rmarkdown)
library(knitr)
rmarkdown::render("test.Rmd", output_format = "html_document")



Error in yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate), :
unused argument (eval.expr = TRUE)




I installed different versions of YAML and it didn't fix the problem.







r yaml r-markdown opencpu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 27 '18 at 9:48









Michael Harper

6,46812147




6,46812147










asked Jul 27 '18 at 8:09









DanMedDanMed

1114




1114













  • Can you refine the question as it is currently difficult to work out where this could be going wrong. Some tips: 1) Use a dataset which others can recreate such as the mtcars dataset. 2) Does the 'EXPORT' function need to be defined or can you just run the render functions normally? 3) Change the file path to remove the system.file path and just create a relative path. In doing these changes, you may even discover the problem yourself.

    – Michael Harper
    Jul 27 '18 at 9:02













  • See my edits. By my understanding that should still show the error you are seeing. If it is not correct though, rollback the changes.

    – Michael Harper
    Jul 27 '18 at 9:09











  • Yes it throw the same error, even without the parameter: params = list(results = mtcars). If i write in the R markdown script params: results: !r mtcars and i execute rmarkdown::render("mtcarsexample.Rmd", output_format = "html_document") i get the same error

    – DanMed
    Jul 27 '18 at 9:37











  • Okay, I further edited your question. Please use this as an example of how to slim-down your questions in the future :) Are you sure all your packages are up to date? install.packages("rmarkdown") etc.

    – Michael Harper
    Jul 27 '18 at 9:51











  • Yes thx!!! Finally I have solved it. My installation of the yaml-2.1.14 package was corrupted. I have had to delete it manually and I have installed version 2.1.19. Since the latest version 2.2.0. also gave me problems

    – DanMed
    Jul 27 '18 at 10:30



















  • Can you refine the question as it is currently difficult to work out where this could be going wrong. Some tips: 1) Use a dataset which others can recreate such as the mtcars dataset. 2) Does the 'EXPORT' function need to be defined or can you just run the render functions normally? 3) Change the file path to remove the system.file path and just create a relative path. In doing these changes, you may even discover the problem yourself.

    – Michael Harper
    Jul 27 '18 at 9:02













  • See my edits. By my understanding that should still show the error you are seeing. If it is not correct though, rollback the changes.

    – Michael Harper
    Jul 27 '18 at 9:09











  • Yes it throw the same error, even without the parameter: params = list(results = mtcars). If i write in the R markdown script params: results: !r mtcars and i execute rmarkdown::render("mtcarsexample.Rmd", output_format = "html_document") i get the same error

    – DanMed
    Jul 27 '18 at 9:37











  • Okay, I further edited your question. Please use this as an example of how to slim-down your questions in the future :) Are you sure all your packages are up to date? install.packages("rmarkdown") etc.

    – Michael Harper
    Jul 27 '18 at 9:51











  • Yes thx!!! Finally I have solved it. My installation of the yaml-2.1.14 package was corrupted. I have had to delete it manually and I have installed version 2.1.19. Since the latest version 2.2.0. also gave me problems

    – DanMed
    Jul 27 '18 at 10:30

















Can you refine the question as it is currently difficult to work out where this could be going wrong. Some tips: 1) Use a dataset which others can recreate such as the mtcars dataset. 2) Does the 'EXPORT' function need to be defined or can you just run the render functions normally? 3) Change the file path to remove the system.file path and just create a relative path. In doing these changes, you may even discover the problem yourself.

– Michael Harper
Jul 27 '18 at 9:02







Can you refine the question as it is currently difficult to work out where this could be going wrong. Some tips: 1) Use a dataset which others can recreate such as the mtcars dataset. 2) Does the 'EXPORT' function need to be defined or can you just run the render functions normally? 3) Change the file path to remove the system.file path and just create a relative path. In doing these changes, you may even discover the problem yourself.

– Michael Harper
Jul 27 '18 at 9:02















See my edits. By my understanding that should still show the error you are seeing. If it is not correct though, rollback the changes.

– Michael Harper
Jul 27 '18 at 9:09





See my edits. By my understanding that should still show the error you are seeing. If it is not correct though, rollback the changes.

– Michael Harper
Jul 27 '18 at 9:09













Yes it throw the same error, even without the parameter: params = list(results = mtcars). If i write in the R markdown script params: results: !r mtcars and i execute rmarkdown::render("mtcarsexample.Rmd", output_format = "html_document") i get the same error

– DanMed
Jul 27 '18 at 9:37





Yes it throw the same error, even without the parameter: params = list(results = mtcars). If i write in the R markdown script params: results: !r mtcars and i execute rmarkdown::render("mtcarsexample.Rmd", output_format = "html_document") i get the same error

– DanMed
Jul 27 '18 at 9:37













Okay, I further edited your question. Please use this as an example of how to slim-down your questions in the future :) Are you sure all your packages are up to date? install.packages("rmarkdown") etc.

– Michael Harper
Jul 27 '18 at 9:51





Okay, I further edited your question. Please use this as an example of how to slim-down your questions in the future :) Are you sure all your packages are up to date? install.packages("rmarkdown") etc.

– Michael Harper
Jul 27 '18 at 9:51













Yes thx!!! Finally I have solved it. My installation of the yaml-2.1.14 package was corrupted. I have had to delete it manually and I have installed version 2.1.19. Since the latest version 2.2.0. also gave me problems

– DanMed
Jul 27 '18 at 10:30





Yes thx!!! Finally I have solved it. My installation of the yaml-2.1.14 package was corrupted. I have had to delete it manually and I have installed version 2.1.19. Since the latest version 2.2.0. also gave me problems

– DanMed
Jul 27 '18 at 10:30












1 Answer
1






active

oldest

votes


















1















  1. Install the devtools package from CRAN.

  2. In R, run the following:


library(devtools)



install_github('viking/r-yaml')






share|improve this answer
























  • Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

    – Simon.S.A.
    Dec 19 '18 at 19:22











  • Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

    – jhchou
    Jan 26 at 12:21











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51553603%2ferror-in-yaml-with-r-markdown%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1















  1. Install the devtools package from CRAN.

  2. In R, run the following:


library(devtools)



install_github('viking/r-yaml')






share|improve this answer
























  • Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

    – Simon.S.A.
    Dec 19 '18 at 19:22











  • Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

    – jhchou
    Jan 26 at 12:21
















1















  1. Install the devtools package from CRAN.

  2. In R, run the following:


library(devtools)



install_github('viking/r-yaml')






share|improve this answer
























  • Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

    – Simon.S.A.
    Dec 19 '18 at 19:22











  • Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

    – jhchou
    Jan 26 at 12:21














1












1








1








  1. Install the devtools package from CRAN.

  2. In R, run the following:


library(devtools)



install_github('viking/r-yaml')






share|improve this answer














  1. Install the devtools package from CRAN.

  2. In R, run the following:


library(devtools)



install_github('viking/r-yaml')







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 19 '18 at 19:04









sebastian zapatasebastian zapata

111




111













  • Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

    – Simon.S.A.
    Dec 19 '18 at 19:22











  • Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

    – jhchou
    Jan 26 at 12:21



















  • Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

    – Simon.S.A.
    Dec 19 '18 at 19:22











  • Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

    – jhchou
    Jan 26 at 12:21

















Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

– Simon.S.A.
Dec 19 '18 at 19:22





Welcome to stackoverflow. Your answer will be most useful if you explain it more completely.

– Simon.S.A.
Dec 19 '18 at 19:22













Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

– jhchou
Jan 26 at 12:21





Attempted to install_github('viking/r-yaml'), which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I get Error in .Call(C_unserialize_from_yaml, string, as.named.list, handlers, : Incorrect number of arguments (8), expecting 4 for 'unserialize_from_yaml' multiple times. I also seem to be unable to reinstall the original yaml. More explanation to the answer would have been good.

– jhchou
Jan 26 at 12:21




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51553603%2ferror-in-yaml-with-r-markdown%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Сан-Квентин

8-я гвардейская общевойсковая армия

Алькесар