GithubHelp home page GithubHelp logo

Comments (9)

cderv avatar cderv commented on May 11, 2024 1

Hi @mbojan ,

This is an old issue and not suitable to ask for something like that 4 years later. Moreover, yes this is supposed to work.
Please open a new issue and provide some more information (a reproducible example would be great) so that we can look into it.

Thank you !

from bookdown.

hadley avatar hadley commented on May 11, 2024

This still isn't working for me - I have

knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE,
  cache = TRUE
)

but the chunks aren't getting the style I want (or cached)

from bookdown.

hadley avatar hadley commented on May 11, 2024

Also this now seems to be running in the main directory (instead of _book) so the chapter number is incorrect, and I get intermediate outputs in the root dir

from bookdown.

yihui avatar yihui commented on May 11, 2024

Hmm, I cannot reproduce it with your r4ds repo. The _common.R script is inserted before chapters as expected. Intermediate outputs are also moved to _book. *_files/ and *_cache/ are not moved, though, but that is intentional (I guess I could move them if you want).

from bookdown.

hadley avatar hadley commented on May 11, 2024

Hmmm, now it looks ok for me too. Maybe I was looking at a cached version?

I did expect the _files/ and _cache/ to go in _book too. Can you explain why they're not moved automatically?

from bookdown.

yihui avatar yihui commented on May 11, 2024

I was simply waiting for you to complain about it :)

For the merge-and-knit approach, these are only two directories, so this does not bother me too much. I know it will be messy for the knit-and-merge approach, and apparently you do not like it, so I'll move them. The Rmd's are compiled in the root directory, and the outputs are moved to _book later. If I move _cache to _book, I'll have to move it back to the root directory the next time I compile an Rmd (then move it to _book again).

from bookdown.

mbojan avatar mbojan commented on May 11, 2024

@yihui , is this resolved? I believe I ran into the same problem. I have new_session: true in _bookdown.yml and the before_chapter_script is not executed when previewing a chapter in RStudio (with the "Knit" button).

from bookdown.

mbojan avatar mbojan commented on May 11, 2024

You are right @cderv , apologies. New issue incoming.

from bookdown.

github-actions avatar github-actions commented on May 11, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

from bookdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.