ay, April 18, 2019 2:39 PM
> To: r-help (mailto:r-help@r-project.org) <mailto:r-help@r-project.org>
> Subject: [R] Help with a setting some values of a df vector to 0 but not all
> values
>
> Good morning.
>
> #RStudio Version 1.1.456
> sessionInfo()
> #R version
ect.org)
> Subject: [R] Help with a setting some values of a df vector to 0 but not all
> values
>
> Good morning.
>
> #RStudio Version 1.1.456
> sessionInfo()
> #R version 3.5.3 (2019-03-11)
> #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows >= 8
&
Yes, thank you Eric, that's got it, sheesh, I knew it was simple.
Many thanks.
WHP
From: Eric Berger
Sent: Thursday, April 18, 2019 8:47 AM
To: Bill Poling
Cc: r-help (r-help@r-project.org)
Subject: Re: [R] Help with a setting some values of a df vector to 0 but not
all value
df$ClaimManagerID[ !(df$ClaimManagerID %in% c(1565,1569,1674,415,1564))] <-
0
On Thu, Apr 18, 2019 at 3:39 PM Bill Poling wrote:
> Good morning.
>
> #RStudio Version 1.1.456
> sessionInfo()
> #R version 3.5.3 (2019-03-11)
> #Platform: x86_64-w64-mingw32/x64 (64-bit)
> #Running under: Windows >=
Good morning.
#RStudio Version 1.1.456
sessionInfo()
#R version 3.5.3 (2019-03-11)
#Platform: x86_64-w64-mingw32/x64 (64-bit)
#Running under: Windows >= 8 x64 (build 9200)
I have a df column that looks like the below.
#68 ID's including the 0 value
I want to set all the values to 0 with the exc
5 matches
Mail list logo