Comments (6)
Sorry, but no, stitch()
does not support chunk options.
from knitr-examples.
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.
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.
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.
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.
Cool. Then I guess I was simply misremembering.
from knitr-examples.
Related Issues (20)
- While using the Python Engine, can I create and embed plots in my document? HOT 3
- Zero-width space in 065-rmd-chunk.Rmd HOT 3
- No kable output in nested for loops HOT 6
- Golang example HOT 19
- engine bash not work on windows OS HOT 7
- Messages with false appendLF still gets seperated HOT 1
- knit.exit() for only this chunk
- Issues with commenting on code lines appearing in compiled PDF HOT 2
- Writing up a knitr document in windows but opening up in linux
- Issues in knitting on ggplots
- haskell engine error
- knitr syntax HOT 2
- Integration tests still valid ? HOT 2
- rgl update on CRAN seems to have modified the rgl example
- Recreate a mechanism to check knitr PR on a branch of knitr-examples HOT 1
- Add a GHA workflow to trigger a new check in knitr repo ? HOT 1
- Add a function in knitr to run example
- Fix issue with example 058 HOT 2
- Quarto PDF HOT 2
- Modifying powerpoint templates on Windows results on corrupt pptx file, aka "Powerpoint found a problem" HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knitr-examples.