na_to_nan: Replace NA missing values with NaN

Description Usage Arguments Value Examples

View source: R/pre_processing.R

Description

Helper function to convert NA values in a data.frame to NaN. This ensures the correct conversion of missing values when reticulate converts R objects to their Python equivalent. See the reticulate package documentation on type conversions for more information.

Usage

1

Arguments

df

Data frame, or object coercible to one.

Value

Data frame with NA values replaced with NaN values.

Examples

1
na_to_nan(data.frame(a = c(1,NA,0,0,NA,NA)))

rMIDAS documentation built on Jan. 30, 2021, 9:05 a.m.