you can test this for yourself. NaN's are considered NA
> is.na(NaN)
[1] TRUE
Here are some of the functions you requested. In general you can search for them with getAnywhere (and a combination of methods, as replace_na is a method for data.frame)
> getAnywhere(replace_na.data.frame)
A single object matching ‘replace_na.data.frame’ was found
It was found in the following places
registered S3 method for replace_na from namespace tidyr
namespace:tidyr
with value
function (data, replace = list(), ...)
{
stopifnot(is_list(replace))
replace_vars <- intersect(names(replace), names(data))
for (var in replace_vars) {
check_replacement(replace[[var]], var)
data[[var]][!is_complete(data[[var]])] <- replace[[var]]
}
data
}
<bytecode: 0x0000028478f60e18>
<environment: namespace:tidyr>
> getAnywhere(is_complete)[2]
function (x)
{
if (typeof(x) == "list") {
!vapply(x, is_empty, logical(1))
}
else {
!is.na(x)
}
}
<bytecode: 0x0000028478ee8b48>
<environment: namespace:tidyr>