Re: [R] If Loop I Think

2019-10-27 Thread William Michels via R-help
Hi Phillip, I wanted to follow up with you regarding your earlier post. Below is a different way to work up your data than I posted earlier. I took the baseball data you posted, stripped out leading-and-following blank lines, removed all trailing spaces on each line, and removed the "R1", "R2" an

Re: [R] If Loop I Think

2019-10-24 Thread William Michels via R-help
W. Michels, Ph.D. On Wed, Oct 23, 2019 at 12:40 AM PIKAL Petr wrote: > > Hi > > ***do not think in if or if loops in R***. > > to elaborate Jim's solution further > > With simple function based on logical expression > fff <- function(x) (x!="")+0 >

Re: [R] If Loop I Think

2019-10-23 Thread PIKAL Petr
Behalf Of Jim Lemon > Sent: Wednesday, October 23, 2019 12:26 AM > To: Phillip Heinrich > Cc: r-help > Subject: Re: [R] If Loop I Think > > Hi Philip, > Try this: > > phdf<-read.table( > text="Row Outs RunnerFirst RunnerSecond RunnerThird R1 R2 R3 > 1 0

Re: [R] If Loop I Think

2019-10-22 Thread Jim Lemon
x27;ll know more once I'm done. > > Can you suggest any other sources? > > Thanks. > > -Original Message- > From: Jim Lemon > Sent: Tuesday, October 22, 2019 3:26 PM > To: Phillip Heinrich > Cc: r-help > Subject: Re: [R] If Loop I Think > > Hi Philip, >

Re: [R] If Loop I Think

2019-10-22 Thread David Winsemius
On 10/22/19 1:54 PM, Phillip Heinrich wrote: Row Outs RunnerFirst RunnerSecond RunnerThird R1 R2 R3 1 0 2 1 3 1 4 1 arenn001 5 2 arenn001 6 0 7 0 perad001 8 0 polla001 perad001 9 0 goldp001 polla001 perad001 10 0 lamb

Re: [R] If Loop I Think

2019-10-22 Thread Jim Lemon
Hi Philip, Try this: phdf<-read.table( text="Row Outs RunnerFirst RunnerSecond RunnerThird R1 R2 R3 1 0 2 1 3 1 4 1 arenn001 5 2 arenn001 6 0 7 0 perad001 8 0 polla001 perad001 9 0 goldp001 polla001 perad001 10 0 lambj001 goldp001 11 1 lambj001 goldp001 12 2 lambj001 13 0 14 1 ", header=

[R] If Loop I Think

2019-10-22 Thread Phillip Heinrich
Row Outs RunnerFirst RunnerSecond RunnerThird R1 R2 R3 1 0 2 1 3 1 4 1 arenn001 5 2 arenn001 6 0 7 0 perad001 8 0 polla001 perad001 9 0 goldp001 polla001 perad001 10 0 lambj001