Re: [R] Failing to install {rggobi} on win-7 R 2.12.0

2011-01-25 Thread Yihui Xie
everything should be fine, except library(rggobi) will still complain that libxml2.dll is missing. [I don't guarantee the rest of steps work] You might need to download libxml2 (http://xmlsoft.org/) and manually put its dll's under your PATH (e.g. the bin directory of GTK+). Regards

Re: [R] newton.method

2010-07-29 Thread Yihui Xie
oot # 7.42 Regards, Yihui -- Yihui Xie Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Thu, Jul 29, 2010 at 1:15 PM, sammyny wrote: > > newton.method is in package 'animation'. > > Thanks Ravi.

Re: [R] break the long R code lines automatically

2010-08-24 Thread Yihui Xie
somehow addicted to GUI: http://yihui.name/en/2010/04/formatr-farewell-to-ugly-r-code/ Regards, Yihui -- Yihui Xie Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Aug 24, 2010 at 4:07 PM, Charles C. Berry wrote: > On

Re: [R] Plotting an Underbrace in R

2011-04-30 Thread Yihui Xie
Oh, I did not see this post and I just saw your message in my blog. Anyway, here is a solution for other people's future reference: http://yihui.name/en/2011/04/produce-authentic-math-formulas-in-r-graphics/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Departme

[R] The 4th Chinese R Conference (Beijing, May 28, 2011)

2011-05-07 Thread Yihui Xie
...@cos.name. Thanks! Regards, Yihui, on behalf of the organizing committee -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R-help@r-project.org mailing list https

Re: [R] R-code in R-file documentation

2011-05-18 Thread Yihui Xie
I guess what you want is cat(readLines("file.r"), sep = "\n") Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, May 18, 2011 at 4:03 AM, Brian Oney wrote: > Hello

Re: [R] help with restart

2010-05-06 Thread Yihui Xie
uot;error")) : error Error in try(stop("error")) : error Error in try(stop("error")) : error > i [1] 3 > for(i in 1:3){(stop('error'))} Error: error > i [1] 1 Regards, Yihui -- Yihui Xie Phone: 515-294-6609 Web: http://yihui.name Department of Statistics,

[R] possible bug in packageVersion()?

2011-01-27 Thread Yihui Xie
base other attached packages: [1] animation_2.0-1 loaded via a namespace (and not attached): [1] tcltk_2.12.1 tools_2.12.1 Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Sn

Re: [R] Why my package is not being generate?

2011-02-02 Thread Yihui Xie
e.r-project.org/ If you don't want to wait for so long, you can simply upload your package to CRAN via FTP, as long as it has passed the "R CMD check" procedure (no errors or warnings). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Sta

Re: [R] Writing R packages in an easier way?

2011-02-11 Thread Yihui Xie
switched from SAS to S (see library(fortunes); fortune('I quit using SAS')). Anyway, prompt() and package.skeleton() are very helpful in the short run. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall

Re: [R] tikzDevice compiling problem

2011-02-17 Thread Yihui Xie
I don't think tikz() can capture the plots in rgl. To export rgl graphics, you need to use rgl.snapshot() or rgl.postscript(). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, F

[R] file mode lost in file.copy()?

2011-03-05 Thread Yihui Xie
tf8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] Teaching R: To quote, or not to quote?

2011-03-08 Thread Yihui Xie
Oh, JSS... I was Achimitized last week... although I have been seeing library() calls without double quotes almost everywhere. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Mar 8

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-07 Thread Yihui Xie
the tikzDevice package has offered a way to write native LaTeX expressions in R plots, so no tricks are really needed there Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Apr 7, 2011

Re: [R] Sweave, SweaveHooks and printing the label

2011-04-16 Thread Yihui Xie
chunkopts$label # this is what you want break } } } } Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Apr 16, 2011 at 5:12 AM, David.Epstein

Re: [R] installing packages systemwide

2011-08-19 Thread Yihui Xie
...') Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Aug 19, 2011 at 12:10 PM, Mary Kindall wrote: > I installed some downloaded packages in R. I always do > $sudo R CMD INSTA

Re: [R] silently testing for data from another package for .Rd examples

2011-08-24 Thread Yihui Xie
.packages(all = TRUE) will give you a list of all available packages without really loading them like require(). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Aug 24, 2011 at 9:28 AM

Re: [R] Easier ways to create .Rd files?

2011-08-24 Thread Yihui Xie
love C-c C-o Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Aug 24, 2011 at 3:31 AM, Jonathan Greenberg wrote: > Thanks Kevin!  Got started with roxygen tonight!  Cheers! > &g

Re: [R] Rename output file in Swaeve and Tex

2012-06-15 Thread Yihui Xie
, but idea is there) To make this more natural, you can try the knitr package which allows you to specify the output filename, e.g. library(knitr); knit('foo.Rnw', output = 'foo-bar.tex') Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statis

Re: [R] animation error

2011-06-16 Thread Yihui Xie
if this solves your problem. Thanks! BTW, you'd better include your sessionInfo() next time. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jun 14, 2011 at 11:06 PM, emorway

[R] help page becomes unavailable after a package is reinstalled

2011-07-15 Thread Yihui Xie
a package developer, I often have to reinstall a package again and again, so I wish I do not have to restart R to see the new documentation. Anybody ever met a similar situation and has an idea? Thanks! I use R 2.13.1 under Ubuntu, and it also appears in Windows 7. Regards, Yihui -- Yihui Xie

Re: [R] help page becomes unavailable after a package is reinstalled

2011-07-15 Thread Yihui Xie
HONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgl_0.92.798 loaded via a namespace (and not attached): [1] tools_2.13.1 Regards, Yihui -- Yihui Xie Phone: 515-294-2465 W

Re: [R] help page becomes unavailable after a package is reinstalled

2011-07-16 Thread Yihui Xie
Thanks a lot! I did not save the "200ms". I did exactly what you described, since that is the only way to go. So I ended up with restarting R hundreds of times a day. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State Unive

Re: [R] old weird error message

2012-07-25 Thread Yihui Xie
see head(`?`, 20) there is another funny thing: Sys.sleep(2 + rpois(1, 2)) (in theory R can, although is unlikely to, sleep forever since it is a Poisson distribution...) Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] On Reproducible Code

2012-07-27 Thread Yihui Xie
Yes I agree. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Jul 27, 2012 at 7:01 PM, Barry Rowlingson wrote: > On Fri, Jul 27, 2012 at 6:47 PM, Hadley Wickham wrote: > >&g

Re: [R] test if elements of a character vector contain letters

2012-08-06 Thread Yihui Xie
You probably mean grepl('[a-zA-Z]', x) Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Aug 6, 2012 at 3:29 PM, Liviu Andronic wrote: > On Mon, Aug 6, 2012 at 6:42 PM, Bert

Re: [R] R versus SAS

2012-08-08 Thread Yihui Xie
The Department of Redundancy Department can "recompensate"... Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Aug 8, 2012 at 5:17 PM, Rolf Turner wrote: > cheers, >

Re: [R] tikzDevice not available

2012-08-15 Thread Yihui Xie
ot;, repos="http://R-Forge.R-project.org";) Or just download the tarball from CRAN and R CMD INSTALL 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 Wed, Aug 15, 2012 at 11:54

Re: [R] Changing line length in Sweave output works for numeric, but not for character vectors

2012-08-20 Thread Yihui Xie
Two possible solutions: 1. Redefine the LaTeX environment so it allows wrapping (see listings for example); 2. Manually break your long string into shorter pieces and paste() them together, e.g. paste('long', 'long', 'string') Regards, Yihui -- Yihui Xie

Re: [R] Sweave: R chunk inside caption?

2012-08-21 Thread Yihui Xie
fig.cap is used. <>= # evaluate fig.cap after a chunk is evaluated opts_knit$set(eval.after = 'fig.cap') @ Dynamically generate a figure caption: <>= x = rnorm(30) hist(x) @ \end{document} Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Dep

Re: [R] PHP escapeshellcmd() equivalent

2012-08-24 Thread Yihui Xie
You probably mean shQuote(). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Aug 24, 2012 at 3:17 PM, Roebuck,Paul L wrote: > On 8/24/12 2:59 PM, "R. Michael Weylandt" >

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Yihui Xie
under https://github.com/yihui/knitr/tree/master/inst/examples If you open knitr-subfloats.lyx, you will see an intentional new line in the ERT, and that is to break \subfloat[asdfa]{<<>>= into \subfloat[asdfa]{ <<>>= Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http:/

Re: [R] PHP escapeshellcmd() equivalent

2012-08-29 Thread Yihui Xie
Well, then I guess there is no such function in base R, but it should be something like escapeshellcmd = function(x) gsub('[metacharacters]', '\\1', x) Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State Universit

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Yihui Xie
Do you know what environments are allowed inside \subfloat{}? The graphics example works because it is nothing but a simple \includegraphics{} command. The table example you gave is much more complicated than that. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department

Re: [R] knitr

2012-08-30 Thread Yihui Xie
Can you post a reproducible example? Do you have \begin{document} in your Rnw file? Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Aug 30, 2012 at 10:35 AM, Sven D wrote: > He

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-31 Thread Yihui Xie
OK, then this turns out to be a pure LaTeX problem. Thanks for the experiments and examples, and they worked very well for me. It seems subcaption is on the radar of LyX 2.1 now. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] Sweave encoding option

2012-09-04 Thread Yihui Xie
What happened might be that your vacation took too long. The encoding argument was introduced in R 2.13.1 (July last year). Nothing has changed in your Rnw document, but things have always been changing in R, so the best thing to do is to check out help(Sweave). Regards, Yihui -- Yihui Xie Phone

Re: [R] R v2.13.2 - Cannot find Rcmd on path?

2011-11-13 Thread Yihui Xie
behind them: there needs to be an easy way for Windows users to use R in command line (e.g. R CMD build...). You may argue that it is easy to understand PATH and modify it manually, and I will say nothing but "thank" Windows again. Sorry this seems to be off-topic. Regards, Yihui -- Yihui

Re: [R] R v2.13.2 - Cannot find Rcmd on path?

2011-11-13 Thread Yihui Xie
Well, I just mean to give the user an option during installation -- like you did in Rtools. I have decided not to argue on this issue any more. Thanks a lot anyway! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] Sweave and accented letters

2011-11-14 Thread Yihui Xie
(see ?Sweave); one of them is via \usepackage[utf8]{inputenc}. In LyX, you need to set the document encoding to "Unicode (utf8)" in Document Settings-->Language-->Encoding. The next version of LyX (2.0.2) will address this issue better. Regards, Yihui -- Yihui Xie Phone: 515-29

Re: [R] Sweave and accented letters

2011-11-15 Thread Yihui Xie
Yes, that is the point. I would prefer a LyX file instead of text in email, since the encoding can be different. You still did not tell us your R version, or better, sessionInfo(). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] R-latex syntax highlighting?

2011-11-23 Thread Yihui Xie
Thanks, Mark. These pages are kind of outdated. I guess I should be able to make the materials in these blog posts into LyX 2.0.3. If anybody is interested in testing, please contact me offline. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa

Re: [R] Sweave problem on Mac OS when using umlauts and summary()

2011-12-02 Thread Yihui Xie
This problem comes up so frequently that I have made options(useFancyQuotes=FALSE) by default in my knitr package: http://yihui.github.com/knitr/ You can also use options(useFancyQuotes='TeX'). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statis

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Yihui Xie
It seems I missed the context of this post -- who is "you", and what is "something other than the URL"? I feel the tikzDevice package should be an option for the task. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa S

Re: [R] adding hyperlinked text to pdf plot

2011-12-05 Thread Yihui Xie
, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Dec 5, 2011 at 2:10 PM, Justin Fincher wrote: > For example, say I am plotting some data that is genomic and therefore > maps to a specific lo

Re: [R] nice report generator?

2011-12-07 Thread Yihui Xie
beautiful table in your eyes. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Dec 7, 2011 at 4:17 PM, Michael wrote: > Thanks Liviu. > > I actually knew Latex... so it's

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Yihui Xie
This is probably one of the most frequently asked questions. The answer is to print() the objects. See R FAQ 7.22. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Yihui Xie
: https://github.com/downloads/yihui/knitr/knitr-manual.pdf Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Dec 7, 2011 at 5:08 PM, Michael wrote: > Thanks a lot! > > Now I can see the i

Re: [R] Help! I couldn't put multiple qplot on the same page...

2011-12-07 Thread Yihui Xie
The two plots are in two PDF files, and I said I cheated via LaTeX, i.e. nothing but putting two \includegraphics{} commands in the same paragraph. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] Update MS Windows PATH variable based on a R script

2011-12-08 Thread Yihui Xie
se contact me offline if you are interested. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Dec 8, 2011 at 4:16 PM, Janko Thyson wrote: > This is a very very very late follow up, b

Re: [R] Labelling R plots using Greek letters

2011-12-11 Thread Yihui Xie
A short answer is you can consider the tikzDevice package; then a long (really really long) answer is this: http://yihui.github.com/knitr/demo/graphics/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames

Re: [R] inset one map on top of another map

2011-09-27 Thread Yihui Xie
How about the subplot() function in the TeachingDemos package? It is basically using par() but you do not have to learn all the gory details. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On

Re: [R] simplest pgfSweave example results in error

2011-09-29 Thread Yihui Xie
Hi, You do not need to use a different Sweave.sty, but I think you have to add this to your Rnw file: \usepackage{tikz} Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Sep 29, 2011 at

Re: [R] simplest pgfSweave example results in error

2011-09-29 Thread Yihui Xie
). If there is a makefile anyway, you may need to delete it as the instruction said. I have no idea about the warning about Encoding in DESCRIPTION, but an extremely important piece of information that you must provide in this mailing list is sessionInfo(). Regards, Yihui -- Yihui Xie Phone: 515

Re: [R] simplest pgfSweave example results in error

2011-09-30 Thread Yihui Xie
file, and then you compile the tex file manually. pgfSweave(..., graphics.only = TRUE) # this will stop it from calling texi2dvi() Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Sep 3

Re: [R] Titles changing when a plot is redrawn

2011-10-05 Thread Yihui Xie
i == z), list(z = i))) } Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Oct 5, 2011 at 10:01 PM, John Nolan wrote: > I ran into a problem with titles on graphs.  I wanted a g

Re: [R] OT RE: US States percentage change plot

2011-10-13 Thread Yihui Xie
Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Oct 13, 2011 at 1:43 PM, Farley, Robert wrote: > OT question: can R produce Cartograms? > > Here's an example of World Population:

Re: [R] pgfSweave-example not compiling

2011-10-13 Thread Yihui Xie
Seems to be weird. I can run the example smoothly under Ubuntu with R 2.13.2. Could you also post your .tex file? Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Oct 13, 2011 at 7:01 PM

Re: [R] pgfSweave-example not compiling

2011-10-13 Thread Yihui Xie
pgfSweave developers: https://github.com/cameronbracken/pgfSweave/issues/34 Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Oct 13, 2011 at 8:34 PM, Peter Meilstrup wrote: > Sure, her

Re: [R] pgfSweave-example not compiling

2011-10-14 Thread Yihui Xie
Yes, it is a little bit amazing to me too, so let's cc to the package maintainer to see if he can do anything. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Oct 14, 2011 at 12:

[R] What does \Sexpr[results=rd]{} exactly mean in Rd?

2011-10-16 Thread Yihui Xie
DDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base other attached packages: [1] devtools_0.4 loaded via a namespace (and not attached): [1] RCurl_1.6-10 Than

Re: [R] What does \Sexpr[results=rd]{} exactly mean in Rd?

2011-10-17 Thread Yihui Xie
Thanks a lot! Sorry for cross-posting, but I did it intentially because I tend to believe Barry Rowlingson (Why R-help Must Die!), and I will summarize the answers here later to StackOverflow. Another user also told me this worked for 2.13.1, but not later versions. Regards, Yihui -- Yihui Xie

Re: [R] heatmap for plotting categorical matrix

2011-10-24 Thread Yihui Xie
not sure about gplots, but the one in base R should work well if you specify the scaling method to be 'none': heatmap(a4[1:40, ], Rowv=NA, Colv=NA, col=c("grey", "blue", "purple", "red"), scale='none') Regards, Yihui -- Yihui X

Re: [R] Seeming failure of options(width=60)

2012-03-25 Thread Yihui Xie
break a single string into several lines (use strwrap() instead in that case). See ?options for the exact meaning of the width option. # this may help you understand 'width' options(width = 50) rep(1, 100) options(width = 90) rep(1, 100) Regards, Yihui -- Yihui Xie Phone: 515-294-2

Re: [R] Seeming failure of options(width=60)

2012-03-26 Thread Yihui Xie
well. Again, you are free to customize the output with any LaTeX environments, not necessarily limited to listings. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Mar 26, 2012 at 8:30 AM

Re: [R] Making Knitr work

2012-03-28 Thread Yihui Xie
You must have set the package option 'base.dir' (opts_knit$set(base.dir = )), and this directory does not exist. I do not recommend you to use this option unless you really understand it. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statis

Re: [R] \Sexpr{}

2012-04-02 Thread Yihui Xie
just FYI: the knitr package supports HTML as well and will not be interfered by R2HTML. See http://yihui.name/knitr/demo/minimal/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Apr 2

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-04 Thread Yihui Xie
Herik's suggestion is an absolutely good practice which guarantees the device is always closed. That is what I did in the knitr package, so you can probably take a look at http://yihui.name/knitr/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Stati

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-05 Thread Yihui Xie
compilation. In all, anything but Windows Notepad. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Apr 5, 2012 at 11:22 AM, Duncan Murdoch wrote: > On 04/04/2012 3:25 PM, Alexander Shenkin wr

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-05 Thread Yihui Xie
new clean R session. If you run into speed issues (e.g. you have chunks which require intensive computing), you can consider using cache, which the knitr package has reasonably good support. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics,

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-05 Thread Yihui Xie
built. You can take a look at the Cache section in the manual: https://github.com/downloads/yihui/knitr/knitr-manual.pdf And more explanations for using cache safely here: http://yihui.name/knitr/demo/cache/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of

Re: [R] How do Sweave users collaborate with Word users?

2012-04-07 Thread Yihui Xie
SVN or GIT. Markdown is easy to write and cleaner compared to Word. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Apr 7, 2012 at 3:54 PM, Alexander Shenkin wrote: > Hello All, >

Re: [R] Support for R in highlight.js

2012-04-12 Thread Yihui Xie
There are numerous JS libraries for syntax highlighting. I have never tried highlight.js yet, but I wrote something for SyntaxHighlighter which might be easily translated to highlight.js: http://yihui.name/en/2010/09/syntaxhighlighter-brush-for-the-r-language/ Regards, Yihui -- Yihui Xie Phone

Re: [R] Long command in Sweave

2012-04-13 Thread Yihui Xie
. However, the absolutely reliable answer is that you should do it by yourself (either manually or with a decent code editor). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Apr 13, 2012 at 9

[R] is there a way to call python like source(file, echo = TRUE) in R?

2012-04-13 Thread Yihui Xie
"' Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] Compiling graphics into the same PDF file

2012-04-16 Thread Yihui Xie
not generated? Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Apr 16, 2012 at 9:31 AM, damiloveu wrote: > Thanks, Ista. > > I inserted fig=TRUE to the chunk and it did work

Re: [R] Using Sweave to generate multiple documents

2012-01-16 Thread Yihui Xie
quot;. The same chunk can be used in your summary, full report and slides without being typed repeatedly if you put this chunk outside of these documents. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames

Re: [R] visualization for k-mean clustering

2012-01-17 Thread Yihui Xie
You mean the process of clustering (the algorithm)? Have you looked at kmeans.ani() in the animation package? Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jan 17, 2012 at 2:48 AM

[R] [R-pkgs] New package knitr

2012-01-18 Thread Yihui Xie
report and feature request are welcome: use https://github.com/yihui/knitr/issues or https://groups.google.com/group/knitr or StackOverflow or r-help. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] Sweave question - Setting Soutput code chunks to stay inside page margins?

2012-01-19 Thread Yihui Xie
f the string does not contain spaces. Let me add the SO link for future reference as well: http://stackoverflow.com/q/8907613/559676 Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Jan 19,

Re: [R] cacheSweave questions (usage and forward compatibility)

2012-01-19 Thread Yihui Xie
. issues #36/#34/#25/... in its GitHub repository); Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Jan 19, 2012 at 4:56 AM, Tal Galili wrote: > Hello all, > > I would like to as

Re: [R] semi-transparency not supported in devel R? "alpha" cannot be specified in qplot()

2012-01-22 Thread Yihui Xie
, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Jan 21, 2012 at 4:39 PM, Tengfei Yin wrote: > Hi dear all, > > In my laptop(ubuntu 11.10 64bit), I maintained a released R (2.14) and a > d

Re: [R] Interactive map graphics.

2012-01-24 Thread Yihui Xie
If you are using Windows, I'm afraid you have to give up because there are no Windows binaries for these packages yet. If you are under Linux or Mac, you can follow the instructions in https://github.com/ggobi/cranvas/wiki Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui

Re: [R] Interactive map graphics.

2012-01-24 Thread Yihui Xie
Exactly. It is very complicated to get them to run under Windows. Hopefully in the future, there will be Windows versions, but I guess this will not happen in the very near future. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] pgfSweave doesn't lazyload my objects

2012-02-02 Thread Yihui Xie
I can reproduce it but I do not know why this happens. FWIW, I tried the knitr package and it worked well except that you have to write cache=TRUE or FALSE instead of true/false. library(knitr) knit('test_pgf.Rnw') Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://

Re: [R] configure lyx2.0.2 with sweave in windows 32 bit.

2012-02-14 Thread Yihui Xie
LyX (configure PATH). BTW, lyx-us...@lists.lyx.org may be a better mailing list to go. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Feb 14, 2012 at 9:03 AM, David Winsemius wrote

Re: [R] configure lyx2.0.2 with sweave in windows 32 bit.

2012-02-14 Thread Yihui Xie
I just looked at Jeff's tutorials; they are great! I no longer see instructions on noweb or Sweave.sty, so I highly recommend them as well. I will add links in the official manual. Thanks, Jeff! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics,

Re: [R] LaTeX and Sweave on windows

2012-02-15 Thread Yihui Xie
Please read the very last two lines in the footer of your email below. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Feb 15, 2012 at 8:55 AM, Bos, Roger wrote: > I am completely

Re: [R] R Package "example" section of .Rd file question (think it's a non-ASCII issue, but not sure...)

2012-02-15 Thread Yihui Xie
Man, the original reply told you to use backticks `` rather than double quotes "". They are very different in R; see ?Quotes And GSE19829-GPL570_eset is really a bad name. I recommend you to rename it. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Dep

Re: [R] Computing plot size in Sweave

2012-02-20 Thread Yihui Xie
ue from a variable x). Note width/height have been renamed to fig.width/fig.height in knitr. See http://yihui.name/knitr/ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Feb 20, 2012 at

Re: [R] Computing plot size in Sweave

2012-02-20 Thread Yihui Xie
ats jumping around? And you also want to hide them in the backyard so the readers won't see them. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Feb 20, 2012 at 3:34 PM, Marc Schwar

Re: [R] Sweave Print xtable

2012-02-26 Thread Yihui Xie
print(xtable(...), ..., table.placement = '') this is an xtable problem; see ?print.xtable 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, Feb 26, 2012 at 3:30 PM, Ricca

Re: [R] Sweave: Avoiding recompilation of figures

2012-04-26 Thread Yihui Xie
I guess there is not a steep learning curve if you want to use cache in knitr or cacheSweave -- just use the chunk option cache=TRUE and you are all set. <>= # time-consuming computation here @ Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics

Re: [R] Usage line in .pdf version of manual is truncated

2012-05-01 Thread Yihui Xie
reformat code. This is what I do with all my packages. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Mon, Apr 30, 2012 at 10:37 PM, Joshua Wiley wrote: > Break the line :) > > On Mo

[R] [R-pkgs] New version of the knitr package (0.5)

2012-05-03 Thread Yihui Xie
knitr/blob/master/inst/examples/knitr-lang.Rmd Suggestions and questions are welcome; please join the mailing list https://groups.google.com/group/knitr or file issues to Github. Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State Un

Re: [R] [Sweave] string.prefix without hyphen-minus

2012-05-04 Thread Yihui Xie
<- paste(options$prefix.string, "-", options$label, sep = "") else chunkprefix <- options$label } else chunkprefix <- paste(options$prefix.string, "-", formatC(options$chunknr, flag = "0", width = 3), sep = "")

Re: [R] Sweave, beamer and alert within code chunks

2012-05-09 Thread Yihui Xie
want, and you may need one hour or two learning the design. BTW, I'm not sure if it is my problem or yours -- your code does not actually run under my R 2.15.0. Long live the reproducible research! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Stati

[R] how to remove the 'promise' attribute of an R object (.Random.seed)?

2012-05-22 Thread Yihui Xie
not find it. The R function typeof() does not reveal it, but the TYPEOF() function in src/main/RNG.c says it is a 'promise'. My question is, how to make R use the real value of .Random.seed instead of complaining about the promise? Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465

Re: [R] how to remove the 'promise' attribute of an R object (.Random.seed)?

2012-05-22 Thread Yihui Xie
, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, May 22, 2012 at 12:49 PM, wrote: > On Tue, 22 May 2012, Yihui Xie wrote: > >> Hi, >> >> The problem arises when I lazyLoad()

Re: [R] how to remove the 'promise' attribute of an R object (.Random.seed)?

2012-05-22 Thread Yihui Xie
Thanks! That is exactly what I did (https://github.com/yihui/knitr/blob/master/R/cache.R#L44) but I was wondering if .Random.seed could be better recognized when it is lazy loaded. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

<    1   2   3   4   >