[TxMt] New R bundles available + An idea

Alain Matthes alain.matthes at mac.com
Mon Mar 17 15:45:21 UTC 2008


Le 17 mars 08 à 16:11, Hans-Joerg Bibiko a écrit :

>
> ONLY A FAST THOUGHT IDEA!
>
> SWeaving is a very nice workaround. But sometimes you only want to  
> draw some simple things like
>
> plot(x <- sort(rnorm(47)), type = "s", ylab="foo")
> points(x, cex = 1, col = "dark red")
>
> or whatever.
>
> Within a latex doc one could write it like this:
>
> % plot(x <- sort(rnorm(47)), type = "s", ylab="foo")
> % points(x, cex = 1, col = "dark red")
>
> to comment out the R code and to be able to redo it if needed.
>
> Then select this R code, invoke R > Run Selection/Document in R (it  
> should be rewritten to ignore the leading "% " if it's invoked out  
> of a latex doc). You will get the plot shown as PDF inside of the  
> Rmate window. Then simply drag and drop that plot to the latex doc  
> after the R code which produced it.
> The latex bundle drag&drop (DD) command "Include Image" should be  
> fine-tuned in such a way that if TM_DROPPED_FILEPATH begins with "file:///tmp/TM_R/ 
> " it popups a dialog to enter a new name for this plot. The variable  
> "filename" of the DD command will be reset to the new file name. The  
> actual PDF stored in tmp/TM_R will be copied into the folder of the  
> latex doc with the new name, and after it the DD command works as  
> usual.
>
> Of course, one could pass the name or path of the plot in beforehand  
> like:
> %% name="figure1"
> % plot(x <- sort(rnorm(47)), type = "s", ylab="foo")
> % points(x, cex = 1, col = "dark red")
>
> I do not know if this is worth to implement?
> [BTW Please note, I don't want to reinvent SWeave ;)]
> Any Comments?


Yes this idea is fine but I want something different because I have
  my personnal statistic package made with pgf/tikz and I want only
  some results from R.

The plots are built with my package.


example : a list of n numbers (e1;....;en)
          with R, I get min max , quantiles

and with my package I draw a Tukey Box.
         min   Q1   med  Q3   max
  \whbox{0.06,0.14,0.33,0.58,0.79}

Perhaps this is possible with your bundle

Best Regards

Alain 
  


More information about the textmate mailing list