Giter VIP home page Giter VIP logo

Comments (6)

yihui avatar yihui commented on June 14, 2024

Sorry, but no, stitch() does not support chunk options.

from knitr-examples.

wibeasley avatar wibeasley commented on June 14, 2024

Thanks for clarifying that, @yihui. I considered that possibility for a second, but these two entries in the NEWS file made me keep trying ways to get it working. I've submitted yihui/knitr#856 so hopefully you won't have to spend time on this question again.

NEWS:

- fixed #487: `stitch_rhtml()` and `stitch_rmd()` should not use the chunk option `out.width = '.6\\linewidth'` (thanks, Tal Galili)
...
- `stitch()` accepts labeled R scripts now; if an R script contains chunk headers of the form `## @knitr label, options`, they will be used in the template (#411) (thanks, @jamiefolson)

from knitr-examples.

yihui avatar yihui commented on June 14, 2024

Ah, sorry, it looks like I have a regression bug somewhere. I'll look into it. Thanks for pointing it out. I even have forgotten I implemented this once :)

from knitr-examples.

wibeasley avatar wibeasley commented on June 14, 2024

I'm glad you said that. I thought my stitch scripts had been working at one point, but then thought that I must have misremembered the spin/stitch distinction or something.

It's funny, but the spin & stitch functions were some of my favorite things when reading your knitr book last year. I use knitr a lot, and was already familiar with most o fthe book's lessons (although I use it so much, its certainly worth my time to review them). But those two functions had escaped my attention until the book.

Stitch and spin fits such a nice need for when I want to record the results of a data manipulation (eg, how many missing values & successful/unsuccessful matches between record sets), but it's not really worth creating a separate Rmd file for. It's nice how knitr offers these light-weight derivative functions (instead of always requiring the user to use the full-blown approach) to adapt to the trade-offs of different scenarios.

from knitr-examples.

yihui avatar yihui commented on June 14, 2024

Okay, I just double checked it and the answer is no, I did not implement it. The NEWS item was misleading. Only chunk labels are supported, and chunk options are not. That said, I guess it is not too difficult to implement it anyway. Please open a new issue in the knitr repository so I will not forget it. Thanks!

from knitr-examples.

wibeasley avatar wibeasley commented on June 14, 2024

Cool. Then I guess I was simply misremembering.

from knitr-examples.

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.