standardizeMissing
Insert standard missing values
Description
replaces values specified inB
= standardizeMissing(A
,indicator
)indicator
with standard missing values inA
并返回一个站ardized array or table.
Missing values are defined according to the data type ofA
:
NaN
—double
,single
,duration
, andcalendarDuration
NaT
—datetime
—string
—categorical
' '
—char
{''}
—cell
of character vectors
IfA
is a table, then the data type of each column defines the missing value for that column.
specifies additional parameters for standardizing missing values using one or more name-value arguments. For example,B
= standardizeMissing(___,Name,Value
)standardizeMissing(A,indicator,'DataVariables',datavars)
standardizes missing values in the variables specified bydatavars
whenA
is a table or timetable.
Examples
Input Arguments
Algorithms
standardizeMissing
treats leading and trailing white space differently for cell arrays of character vectors, character arrays, and categorical arrays.
For cell arrays of character vectors,
standardizeMissing
does not ignore white space. All character vectors must match exactly a character vector specified inindicator
.For character arrays,
standardizeMissing
ignores trailing white space.For categorical arrays,
standardizeMissing
ignores leading and trailing white space.