August 2017
Beginner to intermediate
382 pages
8h 44m
English
The next step will allow us to replace the missing value indicators. Then, we will clean the data so that the missing values indicated by the -19 code have the missing numeric value matrix provided by MATLAB, which (as mentioned) is NaN. To do this, we can use the standardizeMissing() function, which replaces the values specified in parentheses with standard missing values in an array or table:
>> SampleData = standardizeMissing(SampleData,-19);>> summary(SampleData(:,3))Variables: age: 12×1 double Values: Min 15 Median 25 Max 100 NumMissing 2
We may notice that -19 is no longer present, while the missing values are now 2 instead of 1. At this point, we can create a new table, SampleDataNew, and replace the ...
Read now
Unlock full access