Below Data is my working data **
Brand CompanyAdvertising**
Apple $719M
Google $3.6B
Microsoft $3.2B
CocaCola $4B
Facebook $281M
Disney $120M
I want to convert the above data into below data ( in company advertising column want to change all values into Numeric and in same unit i.e in Billions)
Brand CompanyAdvertising
Apple .719
Google 3.6
Microsoft 3.2
CocaCola 4
Facebook .281
Disney .120
I request to please help me. I am currently doing it like this way i am as.numeric(gsub('[$,M]', "", data$CompanyAdevertising))*1e-3.....Now that ouput which i am getting is
**.719 NA NA NA .281 .120
Warning message:
NAs introduced by coercion**