I want to convert all the values to billion in dataframe and then calculate its mean.
DF1 <- data.frame("Brand"=c("a","b","c","d","e","f"),"Revenue"=c("$50.21 M","$20.31 B","$50.23 M","$41.45 B","$29.10 M","$32.21 M"))
show(DF1)
temp<-as.numeric(gsub("^[[:punct:]]", "",DF1$Revenue))
temp
temp_num<- as.numeric(as.character(DF1$Revenue))
Warning message: NAs introduced by coercion