h2o.fillna: fillNA

View source: R/frame.R

h2o.fillnaR Documentation

fillNA

Description

Fill NA's in a sequential manner up to a specified limit

Usage

h2o.fillna(x, method = "forward", axis = 1, maxlen = 1L)

Arguments

x

an H2OFrame

method

A String: "forward" or "backward"

axis

An Integer 1 for row-wise fill (default), 2 for column-wise fill

maxlen

An Integer for maximum number of consecutive NA's to fill

Value

An H2OFrame after filling missing values

Examples

## Not run: 
library(h2o)
h2o.init()

frame_with_nas <- h2o.createFrame(rows = 6, cols = 2,
                                  categorical_fraction = 0.0, 
                                  missing_fraction = 0.7, 
                                  seed = 123)
frame <- h2o.fillna(frame_with_nas, "forward", axis = 1, maxlen = 2L)

## End(Not run)

h2o documentation built on May 29, 2024, 4:26 a.m.