Re: [R] Data frame with Factor column missing data change to NA

2018-06-14 Thread Bill Poling
859932257 Remove Good to go now, for the moment, big smile! Thank you for your help Sir. WHP From: Bill Poling Sent: Thursday, June 14, 2018 6:49 AM To: 'Jim Lemon' Cc: r-help (r-help@r-project.org) Subject: RE: [R] Data frame with Factor column missing data change to NA #Good

Re: [R] Data frame with Factor column missing data change to NA

2018-06-14 Thread Bill Poling
HX recommended savings Claim paid without PHX recommended savings MRC Amount MRC Amount Appreciate your help Sir. WHP From: Jim Lemon [mailto:drjimle...@gmail.com] Sent: Wednesday, June 13, 2018 8:30 PM To: Bill Poling Cc: r-help (r-help@r-project.org) Subject: Re: [R] Data frame with Fa

Re: [R] Data frame with Factor column missing data change to NA

2018-06-13 Thread Jim Lemon
Hi Bill, It may be that the NonAcceptanceOther, being a character value, has "" (0 length string) rather than NA. You can convert that to NA like this: df2$NonAcceptanceOther[nchar(df2$NonAcceptanceOther) == 0]<-NA Jim On Thu, Jun 14, 2018 at 12:47 AM, Bill Poling wrote: > Good morning. > > #I

[R] Data frame with Factor column missing data change to NA

2018-06-13 Thread Bill Poling
Good morning. #I have df with a Factor column called "NonAcceptanceOther" that contains missing data. #Not every record in the df is expected to have a value in this column. # Typical values look like: # ERS # Claim paid without PHX recommended savings # Claim paid without PHX recommended savin