Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
# Subsetting Advanced R
NA > 5
10 == NA
NA + 10
NA / 2
NA == NA
is.na(x) # x == NA
## Return a logical vector indicating which elements are NaN 0/0 Inf-Inf
is.nan(x)
is.na(x)
is.nan(x)
for(i in 4:21)
{
cresult[,i] <- as.integer(cresult[,i])
}
cresult[!complete.cases(cresult),]
nrow(cresult[!complete.cases(cresult),])
# The following code gives you the number of unknown values in each row of the
dataset