Re: [R] Replace values based on neither condition

2022-10-28 Thread Luigi Marongiu
Perfect, thank you! On Fri, Oct 28, 2022 at 11:53 AM Rui Barradas wrote: > > Às 10:43 de 28/10/2022, Luigi Marongiu escreveu: > > Hello, > > I have a data frame with a string column. All data that are neither > > "POS" nor "NEG" should've replaced by an NA. How can I implement that > > (even with

Re: [R] Replace values based on neither condition

2022-10-28 Thread Rui Barradas
Às 10:43 de 28/10/2022, Luigi Marongiu escreveu: Hello, I have a data frame with a string column. All data that are neither "POS" nor "NEG" should've replaced by an NA. How can I implement that (even with extra libraries)? My attempts actually wipe out POS and NEG... Thank you ``` df = data.fram

[R] Replace values based on neither condition

2022-10-28 Thread Luigi Marongiu
Hello, I have a data frame with a string column. All data that are neither "POS" nor "NEG" should've replaced by an NA. How can I implement that (even with extra libraries)? My attempts actually wipe out POS and NEG... Thank you ``` df = data.frame(a = 1:5, b = c("", "31.35", "POS", "20.61"