Re: [R] how much performance penalty does this incur, scalar as a vector of one element?

2007-02-27 Thread Jason Liao
Recently, a new Ruby implementation makes it several times faster: http://www.antoniocangiano.com/articles/2007/02/19/ruby-implementations-shootout-ruby-vs-yarv-vs-jruby-vs-gardens-point-ruby-net-vs-rubinius-vs-cardinal Jason Liao, http://www.geocities.com/jg_liao Associate Professor

[R] how much performance penalty does this incur, scalar as a vector of one element?

2007-02-21 Thread Jason Liao
I have been comparing R with other languages and systems. One peculiar feature of R is there is no scalar. Instead, it is just a vector of length one. I wondered how much performance penalty this deign cause, particular in situations with many scalars in a program. Thanks. Jason Liao

[R] An example of using rJava

2006-11-29 Thread Jason Liao
/importance_sampling/java is where the java code is. x = runif(1000) y = runif(1000) #the above are two vectors to convolve #now you can call the Java method as z=.jcall(my_convolve, [D, convolve, x,y) #z stores the result Hope this helps. Jason Liao, http://www.geocities.com/jg_liao

Re: [R] Linking R with Fortran 90: make: m2c: Command not found

2006-10-04 Thread Jason Liao
by adding the following line somewhere in your Makefile. %.o : %.mod hope this helps!!! Jason Liao, http://www.geocities.com/jg_liaoAssociate Professor of Biostatistics Drexel University School of Public Health 245 N. 15th Street, Mail Stop 660 Philadelphia, PA 19102-1192 phone 215-762-3934

[R] Linking R with Fortran 90: make: m2c: Command not found

2006-10-03 Thread Jason Liao
gang.f90 m2c-o jian.o jian.mod make: m2c: Command not found make: *** [jian.o] Error 127 Can anyone point me to the direction to solve this problem. Thank you in advance. Jason Liao, http://www.geocities.com/jg_liaoAssociate Professor of Biostatistics Drexel University School of Public Health 245

Re: [R] extremely slow recursion in R?

2006-08-25 Thread Jason Liao
). of course, such comparsions don't make too much sense: the reason to use R will definitely not be its speed (which, luckily, often does not matter), but the combination of flexible language, the number of available libraries and the good 2D graphics. joerg Jason Liao, http

[R] extremely slow recursion in R?

2006-08-24 Thread Jason Liao
==0) then value = 1. else if(k==n) then value = 1. else value = choose(n-1, k) + choose(n-1, k-1) end if end function program main write(*,*) choose(30, 15) end program Jason Liao, http://www.geocities.com/jg_liao Department of Epidemiology and Biostatistics Drexel

Re: [R] new package error message

2006-05-10 Thread Jason Liao
: +44 1865 272595 Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb University of Medicine and Dentistry of New Jersey 683 Hoes Lane West, Piscataway‚ NJ 08854 phone 732-235-5429, School of Public Health office phone 732-235-9824, Cancer Institute

[R] new package error message

2006-05-09 Thread Jason Liao
have encountered same problem but no solution is found by googling How can I fix this problem? Many thanks. Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb University of Medicine and Dentistry of New Jersey 683 Hoes Lane West, Piscataway‚ NJ

[R] new computer for running R, Coore Duo or Athlon X2? + Operating system choice

2006-04-29 Thread Jason Liao
lines of code. Which operating system will make this the easiest? I mostly work on Windows but would open to Mac OS X or Linux if the benefit is compelling. Thanks in advance. Jason Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb University

[R] random number generator: same seed used in different sessions

2005-06-15 Thread Jason Liao
as expected. Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb University of Medicine and Dentistry of New Jersey 683 Hoes Lane West, Piscataway‚ NJ 08854 phone 732-235-5429, School of Public Health office phone 732-235-9824, Cancer Institute of New

Re: [R] random number generator: same seed used in different sessions

2005-06-15 Thread Jason Liao
Thank you, Prof. Ripley. Yes, it turned out that different R sessions (batch mode) loaded the same work space. Inserting rm(list=ls(all=TRUE)) on top of the code solves the problem. --- Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 15 Jun 2005, Jason Liao wrote: I did several

RE: [R] when can we expect Prof Tierney's compiled R?

2005-04-20 Thread Jason Liao
From: Jason Liao I am excited to learn that Prof. Tierney is bringing to us compiled R. I would like to learn when it will be available. This information will be useful in scheduling some of my projects. Thanks. Jason Jason Liao, http://www.geocities.com/jg_liao Dept

[R] when can we expect Prof Tierney's compiled R?

2005-04-18 Thread Jason Liao
I am excited to learn that Prof. Tierney is bringing to us compiled R. I would like to learn when it will be available. This information will be useful in scheduling some of my projects. Thanks. Jason Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2.umdnj.edu

Re: [R] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-08 Thread Jason Liao
natively). Jason Liao wrote: Hello, everyone! I guess no one is still using R on Sun Sparc these days. But our department has a (pretty new) two-CPU Sun server. We recently compiled R as a 64 bit application and expected a performance boost. But it runs 25-30% slower than the 32

[R] 64 bit R slower than 32 bit R on Sun Sparc Solaris?

2004-09-07 Thread Jason Liao
? Thanks! Jason = Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2.umdnj.edu/bmtrxweb University of Medicine and Dentistry of New Jersey phone 732-235-5429, School of Public Health office phone 732-235-8611, Cancer Institute of New Jersey office moble phone 908

Re: [R] truly object oriented programming in R Thank you all

2004-08-13 Thread Jason Liao
it is done. Currently, implemented in Java, the KD tree kernel density algorithm can be an order faster than the double loop brute force method. I will find out this will remain true in R. Regards, Jason --- Thomas Lumley [EMAIL PROTECTED] wrote: On Thu, 12 Aug 2004, Jason Liao wrote: Dear

[R] truly object oriented programming in R

2004-08-12 Thread Jason Liao
; for (int i=0; ibBox[0].length;i++) { diff = (bBox[1][i] - bBox[0][i])/2.; value += diff*diff; } return Math.sqrt(value); } } = Jason Liao, http://www.geocities.com/jg_liao Dept. of Biostatistics, http://www2

Re: [R] truly object oriented programming in R

2004-08-12 Thread Jason Liao
continues until the data points are divided. Does R's list support this recursive data structure? If yes, can you give a sample program? Regards, Jason --- Thomas Lumley [EMAIL PROTECTED] wrote: On Thu, 12 Aug 2004, Jason Liao wrote: Good morning! I recently implemented a KD tree in JAVA

[R] huge speed up in R 1.90 alpha

2004-03-19 Thread Jason Liao
I have a microarray analysis program using Monte Carlo Markov chain. I downloaded R 1.9 alpha and saw FOUR times increase in speed. Completelyly amazing. Specifically, one iteration takes 44 seconds under R 1.8.1 and only 10 seconds under R 1.9.0 alpha. I have averaged over many iterations so

[R] Very Fast Multivariate Kernel Density Estimation

2004-02-04 Thread Jason Liao
One of the real advances (in my humble oppinion of course) of 2003 is the Very Fast Multivariate Kernel Density Estimation algorithm by Alex Gray which achieves several order of speed improvement by using Computational Geometry to organize the data. The algorithm is now implemented in C++ with

[R] minimization using Powell's method without derivative

2004-01-08 Thread Jason Liao
Good evening! I have a multi-dimensional minimization problem whose gradient is pretty hard to code. I tried Nelder and Mead method implemented in function optim and it does not work well. I also tried the quasi Newton method in optim using difference as approximate derivative. It does not work

[R] testing if two multivariate samples are from the samedistribution

2003-08-27 Thread Jason Liao
Hello, everyone! I wonder if any R package can do the multivariate Smirnov test. Specifically, let x_1,..,x_n and y_1,...,y_m be multivariate vectors. I would like to test if the two samples are from the same underlying multivariate distribution. Thanks in advance. Jason = Jason G. Liao,

[R] R benchmark, moble Pentium III, 1.13 GHs

2003-07-24 Thread Jason Liao
I got the following using the benchmark program at http://www.sciviews.org/other/benchmark.htm under Windows 2000 prof., 256 MB of RAM R Benchmark 2 = Number of times each test is run__: 3 I. Matrix calculation - Creation,

[R] Dismal R performance of Athlon moble CPU?

2003-07-23 Thread Jason Liao
I have been using a laptop computer of Pentium III 1.13 Ghz. I heard that AMD's Athlon has excellent floating point capacity. So I bought a Athlon 2200+ laptop yesterday. I expected that new Athlon 2200+ will be twice as fast as the P III 1.13 GB. I ran a R simulation program and the new computer

RE: [R] Dismal R performance of Athlon moble CPU?

2003-07-23 Thread Jason Liao
have a dual P4 Xeon 2.4 GHz with 8GB RAM, and jobs run more than twice as fast as my PIII 933MHz laptop. Andy -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:55 PM To: Jason Liao Cc: [EMAIL PROTECTED] Subject: Re: [R

[R] how to find the location of the first TRUE of a logical vector

2003-03-05 Thread Jason Liao
without having to check the vector element by element? Thanks a lot! Jason = Jason G. Liao, Ph.D. Division of Biometrics University of Medicine and Dentistry of New Jersey 335 George Street, Suite 2200 New Brunswick, NJ 08903-2688 phone (732) 235-8611, fax (732) 235-9777