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
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
>
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
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,
>
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
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=
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
7 matches
Mail list logo