Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Book returns Error in vapply... #64

Open
rccline opened this issue Jul 18, 2021 · 1 comment
Open

Build Book returns Error in vapply... #64

rccline opened this issue Jul 18, 2021 · 1 comment

Comments

@rccline
Copy link

rccline commented Jul 18, 2021

I cloned bookdown-demo. I opened index.Rmd and I ran Build Book which returned the following errors:

Tweaking _book/index.html
Tweaking _book/intro.html
Tweaking _book/literature.html
Tweaking _book/methods.html
Error in vapply(footnotes, FUN.VALUE = character(1), function(x) { :
values must be length 1,
but FUN(X[[2]]) result is length 2
Calls: local ... bs4_chapters_tweak -> bs4_chapter_tweak -> tweak_footnotes -> vapply
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::bs4_book'.
Execution halted

Exited with status 1.

@cderv
Copy link
Collaborator

cderv commented Jul 19, 2021

Hi,

Sorry for this misleading situation. You need the dev version of bookdown to work with current bookdown-demo template for bs4_book().

This is because we are preparing next release which contains some fixes and we already updated the bookdown-demo with example for this.

Can you install the dev version of bookdown ?

remotes::install_github("rstudio/bookdown")

Otherwise, you just need to remove the part with long footnotes examples:

We will approximate standard error to 0.027[^longnote]
[^longnote]: $p$ is unknown but expected to be around 1/3. Standard error will be approximated
$$
SE = \sqrt(\frac{p(1-p)}{n}) \approx \sqrt{\frac{1/3 (1 - 1/3)} {300}} = 0.027
$$

Sorry for the trouble with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants