0

I'm new to R and have a fairly simple question. I am working with a data frame and want to convert one of the columns from a character to numeric. The issue I am running into is that it represents a price and is currently formatted as $7 for 7 dollars. I want to make this 7. When i use as.numeric it returns all NAs. I also tried gsub("$","", cookies$Price), but the $ isn't dropping off.

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
JB17
  • 65
  • 1
  • 8

0 Answers0