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 xieyi...@gmail.com 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 xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

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

2011-03-05 Thread Yihui Xie
methods base Regards, Yihui -- Yihui Xie xieyi...@gmail.com 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

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 xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

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 xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

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

2011-02-02 Thread Yihui Xie
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 xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University

[R] possible bug in packageVersion()?

2011-01-27 Thread Yihui Xie
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 xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

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

2011-01-25 Thread Yihui Xie
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, Yihui -- Yihui Xie xieyi

Re: [R] Windows, OSX and Linux: updating a graphic device and double buffering

2011-01-23 Thread Yihui Xie
the Graphics task view needs to be updated too if double buffering is already implemented: http://cran.r-project.org/web/views/Graphics.html Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames

[R] (OT) System admin of Rweb at Tama University

2011-01-15 Thread Yihui Xie
information on the web page. Google translate did not help either. Therefore I'm trying the mailing list in case anybody knows the contact information. Thanks a lot! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University

[R] [R-pkgs] Package Rd2roxygen v0.1-5

2011-01-11 Thread Yihui Xie
('Rd2roxygen') ## or http://cran.r-project.org/web/packages/Rd2roxygen/vignettes/Rd2roxygen.pdf Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

[R] [R-pkgs] Package animation update 2.0-1

2011-01-11 Thread Yihui Xie
?expression) to 'expr', e.g. saveHTML(expression(for  (i in 1:10) plot(runif(30; but note this argument does not *have  to* be a real R expression -- you can still use an arbitrary R code  chunk, e.g. saveHTML(for (i in 1:10) plot(runif(30))) (thanks,  Aquery) Regards, Yihui -- Yihui Xie xieyi

Re: [R] OT: Reducing pdf file size

2011-01-06 Thread Yihui Xie
Has anyone succeeded in porting any PDF compression tools to R so far? Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Jan 5, 2011 at 7:34 PM, Andrew Miles rstuff.mi

[R] convert expressions to characters

2011-01-05 Thread Yihui Xie
() as the text argument)? as.character(x) [1] { as.character() only returns {. as.character(expression({1})) [1] { as.character(expression(1,2+3)) [1] 1 2+3 Thanks a lot! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] convert expressions to characters

2011-01-05 Thread Yihui Xie
I see. Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Jan 5, 2011 at 4:10 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 11-01-05 4:47 PM, Yihui Xie

[R] [R-pkgs] Package animation update (v2.0-0)

2011-01-04 Thread Yihui Xie
; and they will  keep the current working directory untouched when evaluating 'expr'  (i.e.  'expr' will be evaluated under getwd()) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] Sweave for big data analysis

2011-01-01 Thread Yihui Xie
from R core. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sat, Jan 1, 2011 at 6:54 AM, Liviu Andronic landronim...@gmail.com wrote: (slightly off-topic) Hello On Sat

Re: [R] Sweave for big data analysis

2010-12-31 Thread Yihui Xie
I still recommend the pgfSweave package (as usual) -- you can cache both data objects (using cacheSweave) and graphics (using pgf). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames

Re: [R] R-forge is down?

2010-12-30 Thread Yihui Xie
so it is the same for the new packages submitted to CRAN (FTP)? I see the packages in the incoming directory date back to 12/24. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

Re: [R] rgl.snapshot() : no longer works?

2010-12-30 Thread Yihui Xie
Thanks a lot! Unfortunately we have no access to r-forge these days... Could you put the latest version in your homepage? (the one in http://www.stats.uwo.ca/faculty/murdoch/software/ is outdated) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department

Re: [R] rgl.snapshot() : no longer works?

2010-12-30 Thread Yihui Xie
That's great! Thanks very much! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Dec 30, 2010 at 1:14 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 30/12/2010

Re: [R] rgl.snapshot() : no longer works?

2010-12-29 Thread Yihui Xie
Hi, Is there any progress so far? It seems R 2.12.1 under Windows still does not have the rgl.snapshot() support. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Nov

Re: [R] Integration with LaTex and LyX

2010-12-13 Thread Yihui Xie
with probability 95%. There will be substantial changes in LyX 2.0, and I will need to modify my configurations after LyX 2.0 is out (hopefully early next year). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

Re: [R] Can't install Sweave

2010-12-11 Thread Yihui Xie
Is it a good idea to put Sweave.sty and other style files into CTAN as a LaTeX package? (instead of pointing the users to file.path(R.home(), 'share', 'texmf') each time they run into troubles) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department

Re: [R] How to print colorful R output??

2010-12-10 Thread Yihui Xie
of the above vignette is what you want, more details are here: http://yihui.name/en/2010/10/how-to-start-using-pgfsweave-in-lyx-in-one-minute/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall

Re: [R] latex() hangs R console

2010-12-07 Thread Yihui Xie
) } if (.Platform$OS.type == 'windows') system = shell system(cmd, intern = TRUE, wait = TRUE) invisible(NULL) } environment: namespace:Hmisc Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor

Re: [R] LaTeX, MiKTeX, LyX: A Guide for the Perplexed

2010-12-07 Thread Yihui Xie
did not answer your questions directly, but the video might give you an idea how easy it looks (well, only looks easy -- learning Sweave is unavoidable). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215

[R] [R-pkgs] formatR update (0.1-5)

2010-12-03 Thread Yihui Xie
* i/360) # pause for a while Sys.sleep(0.01) } For more information, see http://yihui.name/en/2010/12/formatr-update-0-1-5/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA

[R] New package Rd2roxygen: Convert Rd to roxygen documentation

2010-12-01 Thread Yihui Xie
(person(Hadley, Wickham, email = h.wick...@gmail.com, role = aut), person(Yihui, Xie, email = x...@yihui.name, role = c(aut, cre))) Author: Hadley Wickham and Yihui Xie Maintainer: Yihui Xie x...@yihui.name Depends: roxygen Description: Functions to convert Rd to roxygen documentation. It can

[R] How to stop roxygen from creating Rd for functions that are not exported?

2010-11-26 Thread Yihui Xie
will be documented, although only f is visible to the users. Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R-help@r

[R] Go (back) from Rd to roxygen

2010-11-25 Thread Yihui Xie
R packages. Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com 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

Re: [R] Go (back) from Rd to roxygen

2010-11-25 Thread Yihui Xie
Awesome! Thanks a lot! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Nov 25, 2010 at 8:09 PM, Hadley Wickham had...@rice.edu wrote: Since roxygen is a great help

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Yihui Xie
this would not affect Sweave users, unless they really want 12 digits in the output (e.g. the standard error is 0.123456789012). Since format() can respect getOption('digits'), it will be much easier to control the number of digits globally. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294

Re: [R] a rounding option for \Sexpr{}?

2010-11-19 Thread Yihui Xie
especially for decimals. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Nov 19, 2010 at 9:55 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 19/11/2010 10:38 AM

Re: [R] Sweave Dynamic Graph Question

2010-11-19 Thread Yihui Xie
=tex' to insert animation chunks in real-time in Sweave. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Nov 19, 2010 at 6:06 PM, Dirk Eddelbuettel e...@debian.org wrote

Re: [R] simple loop problemo (Geo brownian motion)

2010-11-19 Thread Yihui Xie
parallel groups of random walks: https://github.com/hadley/ggplot2/wiki/Using-ggplot2-animations-to-demonstrate-several-parallel-numerical-experiments-in-a-single-layout Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State

[R] a rounding option for \Sexpr{}?

2010-11-18 Thread Yihui Xie
in \Sexpr{}? e.g. can we make \Sexpr{} respect getOption('digits')? Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R-help@r

Re: [R] R Applications for Force.com/ Salesforce

2010-11-10 Thread Yihui Xie
I guess this is not OT for r-devel and r-packages -- it's simply spam. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Nov 10, 2010 at 2:19 AM, Gavin Simpson

Re: [R] Line numbers in Sweave

2010-11-03 Thread Yihui Xie
the error in the last but one example: http://had.co.nz/ggplot2/stat_smooth.html Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Nov 2, 2010 at 5:09 PM, Duncan Murdoch

[R] Line numbers in Sweave

2010-11-02 Thread Yihui Xie
in the source file. Do we have any options to turn off this reporting? Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA __ R

Re: [R] Web forum - should I make one?

2010-09-21 Thread Yihui Xie
to myself. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA 2010/9/21 Vojtěch Zeisek vojtech.zei...@opensuse.org: Hello On Sep 21, 2010, at 11:40 AM, Kjetil Halvorsen wrote

[R] a reliable way to check the latest version of R on CRAN?

2010-09-16 Thread Yihui Xie
available? compareVersion(newver, oldver) == 1L Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com 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

Re: [R] Is there a bisection method in R?

2010-09-10 Thread Yihui Xie
/compstat:bisection_method You may play with any univariate function f(x) once you install.packages('animation'). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Sep 10, 2010 at 5:10 PM

Re: [R] Help request: highlighting R code on WordPress.com blogs

2010-09-09 Thread Yihui Xie
for Java and VB (they didn't define the list of functions because there are too many). Then what we need to do is just to insert a few keywords like TRUE/FALSE/for/while in the JS. I would like to contribute 10 minutes on this if nobody will pick up this job. Regards, Yihui -- Yihui Xie xieyi

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

2010-08-24 Thread Yihui Xie
://yihui.name/en/2010/04/formatr-farewell-to-ugly-r-code/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com 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 cbe...@tajo.ucsd.edu wrote

Re: [R] newton.method

2010-07-29 Thread Yihui Xie
, Yihui -- Yihui Xie xieyi...@gmail.com 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 sj...@caa.columbia.edu wrote: newton.method is in package 'animation'. Thanks Ravi. BBSolve

Re: [R] help with restart

2010-05-06 Thread Yihui Xie
)) : 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 xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Wed, May 5, 2010

Re: [R] [R-pkgs] formatR: farewell to ugly R code... Problem with too old ver. of Gtk

2010-04-18 Thread Yihui Xie
of GUI's now. For example, a screenshot for the Java interface is here: http://yihui.name/en/2010/04/formatr-farewell-to-ugly-r-code/#comment-9788 Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall

[R] [R-pkgs] formatR: farewell to ugly R code

2010-04-16 Thread Yihui Xie
can be found here: http://yihui.name/en/2010/04/formatr-farewell-to-ugly-r-code/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA ___ R

Re: [R] WinBUGS Question

2010-04-13 Thread Yihui Xie
='model_i.bug',...) } The above code might need paste() here and there, e.g. paste('data_', i, sep=''). I don't know if WinBUGS itself supports such a loop. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor

Re: [R] From THE R BOOK - Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

2010-03-30 Thread Yihui Xie
some proportion data which fell in [0,1]). E.g. y=rbinom(10, size = 1, prob = .3); x=rnorm(y) # or y = factor(y) glm(y~x, family = binomial) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall

Re: [R] XML: Slower parsing over time with htmlTreeParse()

2010-03-15 Thread Yihui Xie
-- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Mon, Mar 15, 2010 at 7:09 AM, Janko Thyson janko.thy...@ku-eichstaett.de wrote: Sorry, I listed the wrong package in the header of my previous post

Re: [R] rmaxwell in C

2010-03-12 Thread Yihui Xie
)) stop(argument 'a' must be positive) sqrt(2 * rgamma(n = n, 1.5)/a) } environment: namespace:VGAM Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Fri, Mar 12, 2010

Re: [R] rmaxwell in C

2010-03-12 Thread Yihui Xie
The manual R-exts, section 6.7.1 should help if you want to call rgamma() in C. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2010/3/12 xie x...@yihui.name: rmaxwell

[R] parse an HTML page with verbose error message (using XML)

2010-03-11 Thread Yihui Xie
cannot return detailed error messages, while the second one will stop the program... Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA

Re: [R] SVGAnnotation in Windows

2010-03-07 Thread Yihui Xie
SVGAnnotation works fine for me under Windows. I guess Cleber was using R 2.10. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2010/3/6 Uwe Ligges lig...@statistik.tu

Re: [R] Sweve/cacheSweave

2010-02-11 Thread Yihui Xie
The control sequence marked to be read again should not appear between \csname and \endcsname. (I cc'ed to Cameron to see if I'm correct) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA

Re: [R] Is SEM package of R suitable for sem analysis

2009-12-27 Thread Yihui Xie
software, in which I can only feel the blind faith in software. Sigh... The good thing is, R is open source, so is the sem package. You can see everything in it, and you can extend it as you wish (in case your teacher think it is less suitable). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone

[R] problems in building R with libpng/cairo/jpeg

2009-12-27 Thread Yihui Xie
-- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] An unprofessional message

2009-12-24 Thread Yihui Xie
plot.new() plot.window(c(1, n), c(0, 1)) for (i in 1:n) text(i, 0.5, x[i], srt = angle[i], cex = runif(1, 1, 4), col = sample(colors(), 1)) Sys.sleep(0.02) } Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State

Re: [R] An unprofessional message

2009-12-24 Thread Yihui Xie
I have wrapped it into a Flash animation, so we can really see it now: http://yihui.name/en/2009/12/merry-christmas-using-r/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA

Re: [R] animated R plots

2009-12-23 Thread Yihui Xie
(0:1, 0:1) for (i in 1:10) { points(x[i], y[i]) Sys.sleep(0.1) } # this is equivalent to the above animation # but 10 image frames are generated in the end for (i in 1:10) { plot(0:1, 0:1) points(x[1:i], y[1:i]) Sys.sleep(0.1) } Regards, Yihui -- Yihui Xie xieyi...@gmail.com

Re: [R] How to remove R banner?

2009-12-02 Thread Yihui Xie
Rgui (Windows) does support '--quiet'. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Tue, Dec 1, 2009 at 11:17 PM, Sharpie ch...@sharpsteen.net wrote: Peng Yu wrote

Re: [R] Announcement: the 2nd Chinese R Conference

2009-12-02 Thread Yihui Xie
industry - Java programming with R - social network analysis - writing R extensions For more details, please visit: http://cos.name/useR/useR-2009/ Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University

[R] How to extract the variable names from a formula

2009-11-19 Thread Yihui Xie
Hi all, Suppose I have a formula: a = log(y) ~ x1 + I(x2^2) How can I extract the original variable names 'y', 'x1', 'x2' from this formula? Thanks a lot! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University

Re: [R] vignettes: .png graphics or pre-compiled .pdf

2009-11-14 Thread Yihui Xie
it as a package. This has been in my mind for a long time. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2009/11/14 Michael Friendly frien...@yorku.ca: Thanks, Yihui Your

Re: [R] vignettes: .png graphics or pre-compiled .pdf

2009-11-13 Thread Yihui Xie
Hi Michael, I have a dirty solution as attached to use png() for Sweave. HTH. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Fri, Nov 13, 2009 at 10:02 AM, Michael

Re: [R] vignettes: .png graphics or pre-compiled .pdf

2009-11-13 Thread Yihui Xie
I was reminded that the attachments were blocked by the list, so I send these links again: http://yihui.name/en/wp-content/uploads/2009/11/Sweave2.Rnw http://yihui.name/en/wp-content/uploads/2009/11/Sweave2.r http://yihui.name/en/wp-content/uploads/2009/11/Sweave2.pdf Regards, Yihui -- Yihui Xie

Re: [R] Silently loading an R package.

2009-11-13 Thread Yihui Xie
please read the 'Details' section of ?require To suppress messages during the loading of packages use 'suppressPackageStartupMessages': this will suppress all messages from R itself but not necessarily all those from package authors. Regards, Yihui -- Yihui Xie xieyi...@gmail.com

Re: [R] Rpad and R 2.10.0

2009-11-12 Thread Yihui Xie
Good job, Jeff! I've downloaded the source package, modified HTMLargs() as you suggested and recompiled the package. Rpad works perfectly now! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor

[R] deparse() and the 'else' statement

2009-11-09 Thread Yihui Xie
(and not attached): [1] tools_2.10.0 Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Rpad and R 2.10.0

2009-11-07 Thread Yihui Xie
Yes I noticed the same problem since R 2.10.0, and I don't know why either. Let's forward the email to the maintainer. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2009/11

Re: [R] about the cox result

2009-11-03 Thread Yihui Xie
coef(summary(fit_cox)) should give you what you wanted. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Tue, Nov 3, 2009 at 12:31 AM, 孟欣 lm_meng...@163.com wrote: Hi all

Re: [R] qqplot

2009-11-02 Thread Yihui Xie
abline(0,1) is somewhere in the upper-left corner which you are unable to see. At least the first distribution seems to have a larger mean than the second one (i.e. they are not the same distribution). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name

[R] Announcement: the 2nd Chinese R Conference

2009-10-29 Thread Yihui Xie
, and Shanghai useRs: user-2009...@cos.name Thanks! P.S. we hope the next conference will be better prepared; please contact user-2...@cos.name if you have any suggestions on the 3rd Chinese R Conference. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name

[R] Datasets for The Statistical Sleuth

2009-10-24 Thread Yihui Xie
already done the work of packing up all the data sets. Thanks a lot! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA __ R-help@r

Re: [R] how do you know which functions are being debugged?

2009-10-23 Thread Yihui Xie
) is.function(get(i)))], isdebugged) f FALSE Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Fri, Oct 23, 2009 at 12:28 PM, Andrew Yee y...@post.harvard.edu wrote

Re: [R] how do you know which functions are being debugged?

2009-10-23 Thread Yihui Xie
Oops... I forgot to mention that 'envir' (or 'pos') should be specified in ls()/get() in my last reply if you are looking for debugged functions in environments other than .GlobalEnv. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department

Re: [R] celebrating revision 50000

2009-10-10 Thread Yihui Xie
I extracted the data for hours of a day and created some graphs here: http://yihui.name/en/2009/10/5-revisions-committed-to-r/ Certainly our R core gods are so very hard-working and devoted that some even commit revisions to R at 3am in the morning! Regards, Yihui -- Yihui Xie xieyi

Re: [R] Problem with na.omit when using length()

2009-10-05 Thread Yihui Xie
just put na.omit() inside length() if you intend to omit the NA elements of the vector (otherwise you are trying to omit the NA's of the returned value of length() which is a scalar 2): length(na.omit(sno[a==1 b==0])) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http

[R] Modify base R functions in Rprofile.site

2009-10-04 Thread Yihui Xie
;LC_CTYPE=Chinese_People's Republic of China.936;LC_MONETARY=Chinese_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of China.936 attached base packages: [1] datasets utils stats graphics grDevices methods base Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread Yihui Xie
, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2009/10/4 cls59 ch...@sharpsteen.net: Yihui Xie wrote: Hi everyone, I want to modify two base R functions 'parse' and 'deparse

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread Yihui Xie
Hi Charlie, Thanks a lot! Your dark voodoo really helps! And also, thanks so much to Duncan for your detailed explanation! Finally I used Charlie's trick to modify makeRweaveLatexCoderunner(), and has left parse() deparse() untouched. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515

Re: [R] Is there a R function that can do similar things like 'pdist' in Matlab?

2009-09-30 Thread Yihui Xie
That's not correlation. It's distance instead. See ?dist Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Tue, Sep 29, 2009 at 8:22 PM, RT Ye rty...@gmail.com wrote: Hi

Re: [R] How to open only one file in a .gz file?

2009-09-27 Thread Yihui Xie
). You didn't tell us sessionInfo(), so I'm not sure whether you are able to use the tar command. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2009/9/27 Uwe Ligges lig

Re: [R] Create directory and copy files in R

2009-09-22 Thread Yihui Xie
'matrix'. Would you call your dog 'dog'? Anyway, it might clash with the function 'matrix'. -- Barry Rowlingson R-help (October 2004) Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall

Re: [R] R PNG graph width limitation

2009-09-22 Thread Yihui Xie
Given the DPI=72, do you really need a graph that's wider than 450 inches? Or can you really read a picture that is so wide? Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA

Re: [R] Problem in using BATCH command

2009-09-22 Thread Yihui Xie
' directory into your environment variable 'PATH'). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA On Tue, Sep 22, 2009 at 11:01 AM, Manuj Sharma smanuj1...@yahoo.in wrote: I

Re: [R] R PNG graph width limitation

2009-09-22 Thread Yihui Xie
Well, if you don't care about its width, I'd suggest you use the pdf() device instead, e.g. # 200 inches! pdf(hugeplot.pdf, width = 200, height = 200) par(mar = rep(0, 4)) plot(rnorm(1), pch = 19) dev.off() Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http

Re: [R] R PNG graph width limitation

2009-09-22 Thread Yihui Xie
. If you insist on reading the result of your clustering of 5981 cases, I'd suggest looking at smaller pieces of results at one time (i.e. sub-clusters). Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211

Re: [R] how to save plots automatically

2009-09-22 Thread Yihui Xie
Something like for(i in 1:20){ pdf(sprintf(myplot%d.pdf,i)) # your calculation and plots here dev.off() } If you have 100 plots in total, then you should have 5 graphs in each single pdf. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department

[R] panel.first passed to plot() in ...

2009-09-02 Thread Yihui Xie
with panel.first in ...? Thanks a lot! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA __ R-help@r-project.org mailing list https

Re: [R] Export rgl plot3d scatter

2009-06-29 Thread Yihui Xie
prefer using rgl directly. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872, China On Mon, Jun

Re: [R] graphically representing frequency of words in a speech?

2009-06-10 Thread Yihui Xie
to generate tag cloud, and it has fantastic 3D rotation effect of the cloud. I've spent a couple of hours porting it into R; see the source code and effect here: http://yihui.name/en/2009/06/creating-tag-cloud-using-r-and-flash-javascript-swfobject/ HTH. Regards, Yihui -- Yihui Xie xieyi...@gmail.com

Re: [R] How to generate pdf in more than 1 papes

2009-05-11 Thread Yihui Xie
, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872, China On Tue, May 12, 2009 at 1:14 PM, Xiaogang Yang

Re: [R] I'm offering $300 for someone who know R-programming to do the assignments for me.

2009-05-08 Thread Yihui Xie
Homework?... Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872, China On Fri, May 8, 2009

Re: [R] Dynamic visualisation of R data using Adobe FLEX

2009-05-02 Thread Yihui Xie
, 0.1), mgp = c(2, 0.5, 0), tcl = -0.3) least.squares() ani.stop() ani.options(oopt) ## P. S. I'm quite interested in interactive visualization using R and Flash (you may also want to know Flare and SWF Tools!), so please let me know if there's any progress in your project. Regards, Yihui -- Yihui

[R] new line between '}' and 'else' in function body

2009-04-03 Thread Yihui Xie
, e.g. f = function(x) { if (x) { 1 } # a new line here! else { 2 } } f(TRUE) [1] 1 f(FALSE) [1] 2 Seems strange... Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http

[R] extract tables as data.frames from HTML source

2009-04-03 Thread Yihui Xie
has already contributed a more general function (with the package XML or other packages). Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main

Re: [R] new line between '}' and 'else' in function body

2009-04-03 Thread Yihui Xie
} [7] }), srcfile = environment) instead. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin University of China, Beijing, 100872

<    1   2   3   4   >