Displaying 20 results from an estimated 1000 matches similar to: "two small wishes for R"
2003 Mar 05
8
how to find the location of the first TRUE of a logical vector
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
http://www.geocities.com/jg_liao
2003 Jul 23
5
Dismal R performance of Athlon moble CPU?
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 is only 30% faster, in fact slightly slower than a
Celeron 1.50 GB laptop. I am very disappointed
2002 Aug 06
3
hard to believe speed difference
First, I love R and am grateful to be using this free and extremely
high quality software.
Recently I have been comparing two algorithms and naturally I
programmed in R first. It is so slow that I can almost feel its pain.
So I decided to do a comparison with Java. To draw 500,0000 truncated
normal, Java program takes 2 second and R takes 72 seconds. Not a
computer science major, I find it hard
2004 Sep 08
1
64 bit R slower than 32 bit R on Sun Sparc Solaris?
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 bit version of R. Anyone
knows why this is so? Thanks!
Jason
=====
Jason Liao, http://www.geocities.com/jg_liao
Dept. of Biostatistics,
2005 Apr 18
2
when can we expect Prof Tierney's compiled R?
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/bmtrxweb
University of Medicine and Dentistry of New Jersey
683 Hoes Lane West, Piscataway‚ NJ 08854
2006 May 10
3
new package error message
My coauthor made a new R package GeneLogit (100% R code) which installs
ok on R 2.3 on Windows. But when I type
library(GeneLogit)
it gave the error message
Error in library(GeneLogit) : 'GeneLogit' is not a valid package --
installed < 2.0.0?
It runs on R 1.9.0 just fine. It seems that others have encountered
same problem but no solution is found by googling
How can I fix this
2003 Jul 26
0
R benchmark, moble Pentium III, 1.13 GHs
Hi Jason,
I suppose you installed the Matrix library, and it is working on your computer? If yes, may be det.Matrix() was removed, or renamed in the Matrix library you have (I cannot check this for the latest version, because I am away of the office until August 1st), but I will do that next week.
In the meantime, you can replace 'det.Matrix' by 'det.default', and it should run.
2002 Feb 01
4
ROC curves using R
I did some serach around. It seems that ROC curve computation is not
supported on R. Anyone has some leads? Thanks.
Jason
=====
Jason G. Liao, Ph.D.
Division of Biometrics
UMDNJ School of Public Health
335 George Street, Suite 2200
New Brunswick, NJ 08903-2688
phone (732) 235-9748, fax (732) 235-9777
http://www.geocities.com/jg_liao
__________________________________________________
Great
2004 Aug 12
4
truly object oriented programming in R
Good morning! I recently implemented a KD tree in JAVA for faster
kernel density estimation (part of the code follows). It went well. To
hook it with R, however, has proved more difficult. My question is: is
it possible to implement the algorithm in R? My impression seems to
indicate no as the code requires a complete class-object framework that
R does not support. But is there an R package or
2002 Apr 12
1
summary: Generalized linear mixed model software
Thanks to those who responded to my inquiry about generalized linear
mixed models on R and S-plus. Before I summarize the software, I note
that there are several ways of doing statistical inference for
generalized linear mixed models:
(1)Standard maximum likelihood estimation, computationally intensive
due to intractable likelihood function
(2) Penalized quasi likelihood or similar
2001 Dec 19
2
how to get unique vectors
First, happy holidays, everyone! Thanks to the R team for bringing out
1.4 before the new year.
I have 10000 integer triplets stored in A[1:10000, 1:3]. I would like
to find the unique triplets among the 10000 ones with possible
duplications. What is the easiest way for this. I know the function
unique(), which apply to a vector, not the 10000*3 array in my problem.
Thanks in advance.
Jason
2002 Apr 01
2
writing a package for generalized linear mixed modesl
Happy new month, everyone!
I am planning to write a NIH grant proposal to study ways to speed
Monte Carlo based maximum likelihood algorithm for hierarchical models
with a focus on generalized linear mixed models (GLM with random
effects). I thought it would be nice and also increase the chance of
funding if I could produce an R package in the process. I understand
that Prof. Pinheiro ang Bates
2004 Jan 09
0
minimization using Powell's method without derivative
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 well either. I just went through Numerical
Recipes book. The book discusses another method without
2004 Feb 04
0
Very Fast Multivariate Kernel Density Estimation
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 Mathlab interface by Alexander Ihler of MIT:
http://ssg.mit.edu/~ihler/code/kde.shtml
I wondered if a
2008 Jan 31
3
fastest way to compute the squared Euclidean distance between two vectors in R
I have a program which needs to compute squared Euclidean distance
between two vectors million of times, which the Rprof shows is the
bottleneck. I wondered if there is any faster way than my own simple
function
distance2 = function(x1, x2)
{
temp = x1-x2
sum(temp*temp)
}
I have searched the R-help archives and can not find anything except
when the arguments are matrices. Thanks for any
2006 Aug 24
4
extremely slow recursion in R?
I recently coded a recursion algorithm in R and ir ran a few days
without returning any result. So I decided to try a simple case of
computing binomial coefficient using recusrive relationship
choose(n,k) = choose(n-1, k)+choose(n-1,k-1)
I implemented in R and Fortran 90 the same algorithm (code follows).
The R code finishes 31 minutes and the Fortran 90 program finishes in 6
seconds. So the
2005 Jun 15
1
random number generator: same seed used in different sessions
I did several simulation sessions and the result turned out to be a
surprise. After some investigation, I found that different R sessions
of the program used the same seed. Simply, in R210, if I start R and
type rnorm(1), I always get the same random number. This is
contradictary to what is in the R document
Initially, there is no seed; a new one is created from the
current time when one
2007 Feb 21
2
how much performance penalty does this incur, scalar as a vector of one element?
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, http://www.geocities.com/jg_liao
Associate Professor of Biostatistics
Drexel University School of Public
2008 Jul 14
5
A question about using function plot
Hello, everyone! I have spent two hours to get what I wanted in a simple situation and have not been successful. The set up is extremely simple
x = c(1,2,4,8)
y = c(1,2,3,4)
plot(x, y)
What I need, however, is for the 4 points of 1,2,4,8 to be spaced evenly, not by their numerical scale. Also, there should not be any other values such as 5,6,7 marked on the axis.
So I tried the following
x =
2002 Sep 01
2
Converting the columns of a data frame to numeric
Hello,
I have a data frame whose columns are factors with numeric levels and I
want to convert the columns to numeric so that I can treat the data frame
as a matrix.
I found a way of doing this but would like to know if there is an easier way.
My way is:
M <- matrix(ncol=ncol(df) , nrow=nrow(df) , as.numeric(as.matrix(df)))
where 'df' is the data frame.
I am wondering if there is