Error in YAML with R Markdown
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
add a comment |
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
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 themtcars
dataset. 2) Does the 'EXPORT' function need to be defined or can you just run therender
functions normally? 3) Change the file path to remove thesystem.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 scriptparams: results: !r mtcars
and i executermarkdown::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
add a comment |
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
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
r yaml r-markdown opencpu
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 themtcars
dataset. 2) Does the 'EXPORT' function need to be defined or can you just run therender
functions normally? 3) Change the file path to remove thesystem.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 scriptparams: results: !r mtcars
and i executermarkdown::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
add a comment |
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 themtcars
dataset. 2) Does the 'EXPORT' function need to be defined or can you just run therender
functions normally? 3) Change the file path to remove thesystem.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 scriptparams: results: !r mtcars
and i executermarkdown::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
add a comment |
1 Answer
1
active
oldest
votes
- Install the devtools package from CRAN.
- In R, run the following:
library(devtools)
install_github('viking/r-yaml')
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 toinstall_github('viking/r-yaml')
, which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I getError 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 originalyaml
. More explanation to the answer would have been good.
– jhchou
Jan 26 at 12:21
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
- Install the devtools package from CRAN.
- In R, run the following:
library(devtools)
install_github('viking/r-yaml')
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 toinstall_github('viking/r-yaml')
, which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I getError 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 originalyaml
. More explanation to the answer would have been good.
– jhchou
Jan 26 at 12:21
add a comment |
- Install the devtools package from CRAN.
- In R, run the following:
library(devtools)
install_github('viking/r-yaml')
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 toinstall_github('viking/r-yaml')
, which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I getError 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 originalyaml
. More explanation to the answer would have been good.
– jhchou
Jan 26 at 12:21
add a comment |
- Install the devtools package from CRAN.
- In R, run the following:
library(devtools)
install_github('viking/r-yaml')
- Install the devtools package from CRAN.
- In R, run the following:
library(devtools)
install_github('viking/r-yaml')
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 toinstall_github('viking/r-yaml')
, which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I getError 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 originalyaml
. More explanation to the answer would have been good.
– jhchou
Jan 26 at 12:21
add a comment |
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 toinstall_github('viking/r-yaml')
, which not only failed, but has now apparently corrupted by RStudio installation so that on startup, I getError 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 originalyaml
. 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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 therender
functions normally? 3) Change the file path to remove thesystem.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 scriptparams: results: !r mtcars
and i executermarkdown::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