[R] How to express a tree?

2009-10-27 Thread Hesen Peng
main list) contains all its corresponding branches. Is there any simpler way of doing this? Thank you very much. Best wishes, -- Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Invitation to connect on LinkedIn

2009-10-13 Thread Hesen Peng
LinkedIn Hesen Peng requested to add you as a connection on LinkedIn: -- Arnaud, I'd like to add you to my professional network on LinkedIn. - Hesen Accept invitation from Hesen Peng http://www.linkedin.com/e/qlt6CtWzi7sEoE_As_C0_wMf

Re: [R] Is there a 'vi' mode in R?

2009-08-07 Thread Hesen Peng
ject.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] Conditional expand.grid()

2009-07-11 Thread Hesen Peng
[1,]     5     5     6     6     6     6     7     7     7     8     8     9 > [2,]     9    10     7     8     9    10     8     9    10     9    10    10 > > > On Sat, Jul 11, 2009 at 9:23 AM, Hesen Peng wrote: >> Hello my R buddies, >> >> I'm trying to gene

[R] Conditional expand.grid()

2009-07-11 Thread Hesen Peng
here must be some easier way of doing this. Besides, if inequality condition is applied at the very beginning, this will save me a lot of memory if n goes to a very large number. Is there any suggestions? Thanks a lot. Best wishes, -- 彭河森 Hesen Peng http://hesen.pen

Re: [R] Partial loop?

2009-06-27 Thread Hesen Peng
stat.com > +44 (0)20 8525 0696 > http://www.burns-stat.com > (home of "The R Inferno" and "A Guide for the Unwilling S User") > > > Hesen Peng wrote: >> >> My dear R buddies, >> >> I'm writing a loop program like this: >> >>

[R] Partial loop?

2009-06-26 Thread Hesen Peng
My dear R buddies, I'm writing a loop program like this: for(i in 1:n){ for(j in 1:i){ ... } } I wonder if there is any simple apply()-like function to make the loop a little bit easier and faster. Thanks a lot. Best wishes, -- 彭河森 Hesen Peng http://hesen.peng.googlepage

Re: [R] Constrained Optimization, a full example

2009-06-16 Thread Hesen Peng
H, I'm assuming that you are trying to find the solution of \beta to the question: argmin |y-X\beta|_2^2, which is a quadratic programming problem. On Tue, Jun 16, 2009 at 6:29 PM, Hesen Peng wrote: > Hello, > > Since the optimization goal is quadratic and constraint is linea

Re: [R] Constrained Optimization, a full example

2009-06-16 Thread Hesen Peng
gt; > opti <- constrOptim(c(0.5, 0.5, 0.1), rss, NULL, ui = rbind(c(0, 0), c(1, > 0), c(0, 1)), ci = c(0, 1, 1)); > > > > >        [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://st

Re: [R] Multiple use of par()

2009-04-04 Thread Hesen Peng
to work, either. Anyone has any suggestions? Thanks a lot, Best wishes, On Sat, Apr 4, 2009 at 6:06 AM, Dieter Menne wrote: > > > Hesen Peng-2 wrote: >> >> I created a plot function which used par(mfcol=c(2,1)) so that I could >> have two plots together using just one

[R] Multiple use of par()

2009-04-03 Thread Hesen Peng
his? I guess that I may either need to change the way I plot foo, e.g. using some function rather than par(), or use some parameters at the beginning. Thank you very much, Best wishes, -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-hel

Re: [R] This site may harm your computer - Google warning about cran website

2009-01-31 Thread Hesen Peng
://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __

Re: [R] Reading mixed tables

2008-11-29 Thread Hesen Peng
- DF[-1,] > DFs <- lapply(split(DF0, cumsum(is.na(DF0[,3]))), na.omit) > DFs > > > On Sat, Nov 29, 2008 at 6:51 PM, Hesen Peng <[EMAIL PROTECTED]> wrote: >> Dear R buddies, >> >> This weekend I became interested in solving Google Code Jam proble

Re: [R] Reading mixed tables

2008-11-29 Thread Hesen Peng
rsory look at that problem > I was guessing that it is more like linear programming than statistics. > > -- > David Winsemius > > > On Nov 29, 2008, at 6:51 PM, Hesen Peng wrote: > >> Dear R buddies, >> >> This weekend I became interested in solving Google Co

[R] Reading mixed tables

2008-11-29 Thread Hesen Peng
. Any suggestions? Thanks a lot. Best wishes, -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.htm

Re: [R] More than doubling performance with snow

2008-11-25 Thread Hesen Peng
es on your > computer (rather than, say, 8 cores). > > Hope this clarifies things a bit (and is reasonably accurate, since I don't > have much experience with parallelisation), > Stefan > > [ [EMAIL PROTECTED] | http://purl.org/stefan.evert ] > > ______ > R-help@r-pr

Re: [R] More than doubling performance with snow

2008-11-24 Thread Hesen Peng
-- Forwarded message -- From: Hesen Peng <[EMAIL PROTECTED]> Date: Mon, Nov 24, 2008 at 9:28 AM Subject: Re: [R] More than doubling performance with snow To: Prof Brian Ripley <[EMAIL PROTECTED]> I'm sorry but I don't quite understand what "not runn

[R] More than doubling performance with snow

2008-11-23 Thread Hesen Peng
: yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm bogomips: 4521.97 c

Re: [R] How is R working in multicore and multiprocessor environment?

2008-11-23 Thread Hesen Peng
s you have a > problem that is making heavy use of matrix operations. > > On Sun, Nov 23, 2008 at 4:38 PM, Hesen Peng <[EMAIL PROTECTED]> wrote: >> My Dear R buddies, >> >> I'm feeling ashamed that I've been running my R program on some >> servers for a while

[R] How is R working in multicore and multiprocessor environment?

2008-11-23 Thread Hesen Peng
ple single-thread R program. Thanks a lot. Best wishes, -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-

Re: [R] Mathematica now working with Nvidia GPUs --> any plan for R?

2008-11-20 Thread Hesen Peng
014 Cph. K > (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 > ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 > > ______ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/

Re: [R] ParallelR

2008-10-09 Thread Hesen Peng
kets, i.e., no additional dependencies. Martin > > "Hesen Peng" <[EMAIL PROTECTED]> writes: > >> Hi, >> >> I wonder if there are any parallel package which do not rely on mpi or pvm? >> >> On Wed, Oct 8, 2008 at 5:09 PM, Markus Schmidb

Re: [R] ParallelR

2008-10-09 Thread Hesen Peng
Smfak+oLrQjXU= > =fPMX > -END PGP SIGNATURE- > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and prov

[R] When to set small values to 0?

2008-10-02 Thread Hesen Peng
st of the value just wander at 10^-8 scale and never shrink exactly to zero. So I guess I should manually add a threshold to set the values to zero. But does anyone know any choice of these thresholds? Thanks very much. -- 彭河森 Hesen Peng http://hesen.peng.

Re: [R] Convex optimization in R?

2008-09-26 Thread Hesen Peng
AIL PROTECTED] >> >> Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html >> >> >> >> >> ---- >> >> >> >> -Original M

[R] Convex optimization in R?

2008-09-10 Thread Hesen Peng
package in R to do this? Thank you very much, Best wishes, -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.o

Re: [R] Multiple column/row names?

2008-08-18 Thread Hesen Peng
ames are easy since they are just one line. The column names > I don't think can be constructed. Why do you want two column names? > You won't be able to access them. You can always create your own > object and put the two column names on it. > > On Mon, Aug 18, 2008 at 1

[R] Multiple column/row names?

2008-08-11 Thread Hesen Peng
Hi all, I wonder if there is a way to create a matrix with two (or even more) column/row names? Thank you very much. Have a nice day. -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] *apply function for arrays?

2008-05-18 Thread Hesen Peng
ur second > situation other than a double for loop. Unless > G is linear, I think all other solutions will be > equivalent to a double for loop, though the > loops may be hidden. > > > Patrick Burns > [EMAIL PROTECTED] > +44 (0)20 8525 0696 > http://www.burns-stat.com

[R] *apply function for arrays?

2008-05-17 Thread Hesen Peng
R)==c(nrow(M),nrow(N)), and R[i,j] <- G(M[i,], N[j,]). And I wonder whether I may use some functions like outer to the matrix. Thank you very much and have a nice weekend. -- 彭河森 Hesen Peng http://hesen.peng.googlepages.com/ __ R-help@r-project

Re: [R] mean for each row

2008-03-16 Thread Hesen Peng
nd > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible

Re: [R] fastest way to compute the squared Euclidean distance between two vectors in R

2008-01-31 Thread Hesen Peng
___ > Looking for last minute shopping deals? > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.o

Re: [R] Fortran level mismatch between package and R

2008-01-18 Thread Hesen Peng
list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- 彭河森 Hesen Peng __ R-help@r-project