[R] .Call and to reclaim the memory by allocVector

2007-08-23 Thread Yongchao Ge
Hi, I am not sure if this is a bug and I apologize if it is something I didn't read carefully in the R extension manual. My initial search on the R help and R devel list archive didn't find useful information. I am using .Call (as written in the R extension manual) for the C code and have foun

[R] Profiling R code and C code (Rprof and gprof)

2005-02-16 Thread Yongchao Ge
Hi, I have searched R mail list archive and couldn't find my answers. The R extension describes how to make use of Rprof to profile R code. gprof can be also used for the same purpose for the C codes when the C codes are written independently and provided with a main() function. I'm currently

Re: [R] generating normal numbers: GetRNGstate, PutRNGstate

2004-03-03 Thread Yongchao Ge
See my reply at the end of the email. > > I'd like to generate thousands of normal numbers from my C function using > > the C API functions provided R. I have two options: > > > > 1. double norm_rand(); (page 61 of R extension 1.8.1) > > 2. double rnorm(double mu, double sigma); (page 58 of R ex

[R] generating normal numbers: GetRNGstate, PutRNGstate

2004-03-03 Thread Yongchao Ge
Hi I'd like to generate thousands of normal numbers from my C function using the C API functions provided R. I have two options: 1. double norm_rand(); (page 61 of R extension 1.8.1) 2. double rnorm(double mu, double sigma); (page 58 of R extension 1.8.1) If my understanding of R-exts is corre

Re: [R] the huge postscript plot

2003-07-05 Thread Yongchao Ge
> Which points up that the problem is in your .ps viewer, nowhere else. > That's not surprising; postscript is a *print* description language and > primarily intended for high-quality printing. For a long time postscript > printers contained more powerful processors than workstations (let alone >

Re: [R] the huge postscript plot

2003-07-05 Thread Yongchao Ge
> Another alternative is to insert pdf graphs into latex. The way you do this > is to use pdflatex with the graphicx package. In the preamble of your latex > document, put > > \usepackage[pdftex]{graphicx} instead of \usepackage[dvips]{graphicx} > > somewhere. When you run the document, use pdflat

RE: [R] the huge postscript plot

2003-07-05 Thread Yongchao Ge
our 60,000 points, since you probably can't > see them all distinctly anyway. You could sample, say, 1 of them. > > Hope this helps, > > Matt Wiener > > -Original Message- > From: Yongchao Ge [mailto:[EMAIL PROTECTED] > Sent: Friday, July 04, 2003 7:06 P

[R] the huge postscript plot

2003-07-04 Thread Yongchao Ge
Hi, I'm just wondering how I can do to make a huge postscript plot be manageable. My question is that I have to draw around 60,000 points which makes it painfully slow to print or view in gv or put it into latex document, though it is very fast to produce the postscript file. A simple example is