Re: inline sweave / knitr

2012-01-29 Thread Yihui Xie
On Sun, Jan 29, 2012 at 2:47 PM, Jack Tanner wrote: > > OK, this is reproducible for me in 2.0.2 with Sweave (not knitr). > Insert->Custom Insets->S/R Expression creates an inset that does not take > input until you double-click it. (Maybe the inset is collapsed by default, > like Liviu suggested,

Re: inline sweave / knitr

2012-01-29 Thread Liviu Andronic
On Sun, Jan 29, 2012 at 9:47 PM, Jack Tanner wrote: > How can I make inline code pay attention to R options, e.g., > options(digits=2)? > I don't think you can, since \Sexpr{} prints as.character(). See [1]. But I remember that some hacky workarounds exist. Liviu [1] http://www.mail-archive.com/

Re: inline sweave / knitr

2012-01-29 Thread Jack Tanner
On Sunday, January 29, 2012 3:29:01 PM, Yihui Xie wrote: There's some sort of a UI bug, though. Insert->Custom Insets->Sexpr creates the inset, but I can't type or paste into it. If I click outside of the inset and then back into the inset, I can type then. Maybe it has to do with me using knitr

Re: inline sweave / knitr

2012-01-29 Thread Yihui Xie
On Sun, Jan 29, 2012 at 2:10 PM, Jack Tanner wrote: > Ha! It's like magic. I think of something, and it's already there. So don't underestimate how heavily we use Sweave/knitr every day :-) > > There's some sort of a UI bug, though. Insert->Custom Insets->Sexpr creates > the inset, but I can't t

Re: inline sweave / knitr

2012-01-29 Thread Liviu Andronic
On Sun, Jan 29, 2012 at 9:10 PM, Jack Tanner wrote: > Ha! It's like magic. I think of something, and it's already there. > > There's some sort of a UI bug, though. Insert->Custom Insets->Sexpr creates > the inset, but I can't type or paste into it. > It should work immediately, but what you're pro

Re: inline sweave / knitr

2012-01-29 Thread Jack Tanner
Ha! It's like magic. I think of something, and it's already there. There's some sort of a UI bug, though. Insert->Custom Insets->Sexpr creates the inset, but I can't type or paste into it. If I click outside of the inset and then back into the inset, I can type then. Maybe it has to do with me

Re: inline sweave / knitr

2012-01-29 Thread Yihui Xie
Thanks, Liviu. I think that is it. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Jan 29, 2012 at 1:21 PM, Liviu Andronic wrote: > On Sun, Jan 29, 2012 at 8:13 PM, Jack Tanner wrote:

Re: inline sweave / knitr

2012-01-29 Thread Liviu Andronic
On Sun, Jan 29, 2012 at 8:13 PM, Jack Tanner wrote: > Over the last week or so, I've been playing with the new knitr integration > (#7887), with really nice results. > > There's a very handy Chunk environment for sweave / knitr code. But is there > any support for inline knitr in LyX? I'm thinking

inline sweave / knitr

2012-01-29 Thread Jack Tanner
Over the last week or so, I've been playing with the new knitr integration (#7887), with really nice results. There's a very handy Chunk environment for sweave / knitr code. But is there any support for inline knitr in LyX? I'm thinking of, e.g., As our experiments showed, the sum of 1 and