Re: [R] Relase positive with log and zero of negative with 0

2009-11-18 Thread Martin Maechler
> "PE" == Peter Ehlers > on Mon, 16 Nov 2009 06:55:00 -0700 writes: PE> David Winsemius wrote: >> >> On Nov 15, 2009, at 10:18 AM, wrote: >> >>> This is a very simple question but I couldn't form a site search >>> quesry that would return a reasonable resul

Re: [R] Relase positive with log and zero of negative with 0

2009-11-16 Thread David Winsemius
On Nov 16, 2009, at 8:55 AM, Peter Ehlers wrote: David Winsemius wrote: On Nov 15, 2009, at 10:18 AM, wrote: This is a very simple question but I couldn't form a site search quesry that would return a reasonable result set. Say I have a vector: x <- c(0,2,3,4,5,-1,-2) I want to replac

Re: [R] Relase positive with log and zero of negative with 0

2009-11-16 Thread Peter Ehlers
David Winsemius wrote: On Nov 15, 2009, at 10:18 AM, wrote: This is a very simple question but I couldn't form a site search quesry that would return a reasonable result set. Say I have a vector: x <- c(0,2,3,4,5,-1,-2) I want to replace all of the values in 'x' with the log of x. Natu

Re: [R] Relase positive with log and zero of negative with 0

2009-11-15 Thread David Winsemius
On Nov 15, 2009, at 10:18 AM, wrote: This is a very simple question but I couldn't form a site search quesry that would return a reasonable result set. Say I have a vector: x <- c(0,2,3,4,5,-1,-2) I want to replace all of the values in 'x' with the log of x. Naturally this runs into pro

Re: [R] Relase positive with log and zero of negative with 0

2009-11-15 Thread Berwin A Turlach
G'day Kevin, On Sun, 15 Nov 2009 7:18:18 -0800 wrote: > This is a very simple question but I couldn't form a site search > quesry that would return a reasonable result set. > > Say I have a vector: > > x <- c(0,2,3,4,5,-1,-2) > > I want to replace all of the values in 'x' with the log of x. >

[R] Relase positive with log and zero of negative with 0

2009-11-15 Thread rkevinburton
This is a very simple question but I couldn't form a site search quesry that would return a reasonable result set. Say I have a vector: x <- c(0,2,3,4,5,-1,-2) I want to replace all of the values in 'x' with the log of x. Naturally this runs into problems since some of the values are negative