From the course: Cleaning Bad Data in R

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Numbers stored as text

Numbers stored as text

From the course: Cleaning Bad Data in R

Start my 1-month free trial

Numbers stored as text

- Currency values can often cause data quality issues that require cleaning prior to performing analysis. Just as we discussed with units of weight, we need to make sure that any currency values we have in our data set have clearly identified units. If we simply have a column for example that says price, how should we interpret that value? Is it US dollars or Canadian dollars? Euros? Or some other currency. The second issue that we might encounter is that we have problems with the formatting of currency values when we try to read them into R. Lets take a look at an example in a real data set. I have the code set up here to load a data set containing information on medicare expense reimbursement. Lets go ahead and run through this code and load the data file. And then we'll take a look at a summary of this data set. You can see immediately that there are some problems here. Look at these three values. Average charges, average total payments, and average medicare payments. I would…

Contents