Description Usage Arguments Details Value Author(s) See Also Examples
Omits observations with values which a not regular (=Not a Regular Value) when object is a vector, a factor, a data.frame or a matrix.
1 | NaRV.omit(x)
|
x |
|
Irregular values are defined as NA
, NaN
, Inf
and
-Inf
Values in numerics and NA
in factors and
characters.
Returns objects of class
vector, factor, data.frame or matrix
in the same way as na.omit
does. Returns all other
objects unchanged and prints a warning.
Rene Locher
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[,1] [,2] [,3]
[1,] NA 3 6
[2,] 1 4 7
[3,] 2 5 NA
[,1] [,2] [,3]
[1,] 1 4 7
attr(,"na.action")
[1] 1 3
attr(,"class")
[1] "omit"
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 NA 2.8 4.7 1.2 versicolor
2 5.5 2.4 3.8 1.1 versicolor
3 6.7 3.3 5.7 2.5 virginica
4 4.9 3.1 1.5 0.1 setosa
5 6.2 2.8 4.8 1.8 virginica
6 5.5 2.5 4.0 1.3 versicolor
7 6.0 2.2 4.0 1.0 versicolor
8 4.9 3.0 1.4 0.2 setosa
9 6.3 3.3 6.0 2.5 virginica
10 6.1 3.0 4.6 1.4 <NA>
11 6.5 3.0 5.5 1.8 virginica
12 6.9 3.1 5.1 2.3 virginica
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
2 5.5 2.4 3.8 1.1 versicolor
3 6.7 3.3 5.7 2.5 virginica
4 4.9 3.1 1.5 0.1 setosa
5 6.2 2.8 4.8 1.8 virginica
6 5.5 2.5 4.0 1.3 versicolor
7 6.0 2.2 4.0 1.0 versicolor
8 4.9 3.0 1.4 0.2 setosa
9 6.3 3.3 6.0 2.5 virginica
11 6.5 3.0 5.5 1.8 virginica
12 6.9 3.1 5.1 2.3 virginica
[1] 1 2 3 4 5 6 7 8 9 10
[1] 9 8 4 6 5 2 7 1 3
attr(,"na.action")
[1] 1
attr(,"class")
[1] "omit"
Levels: 1 2 3 4 5 6 7 8 9
[1] <NA> 9 8 7 1 6 2 4 3 5
Levels: 1 2 3 4 5 6 7 8 9 <NA>
[1] <NA> 9 8 7 1 6 2 4 3 5
Levels: 1 2 3 4 5 6 7 8 9 <NA>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.