Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

h2o.fillna

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

R Interface for the 'H2O' Scalable Machine Learning Platform

v3.32.1.2
Apache License (== 2.0)
Authors
Erin LeDell [aut, cre], Navdeep Gill [aut], Spencer Aiello [aut], Anqi Fu [aut], Arno Candel [aut], Cliff Click [aut], Tom Kraljevic [aut], Tomas Nykodym [aut], Patrick Aboyoun [aut], Michal Kurka [aut], Michal Malohlava [aut], Ludi Rehak [ctb], Eric Eckstrand [ctb], Brandon Hill [ctb], Sebastian Vidrio [ctb], Surekha Jadhawani [ctb], Amy Wang [ctb], Raymond Peck [ctb], Wendy Wong [ctb], Jan Gorecki [ctb], Matt Dowle [ctb], Yuan Tang [ctb], Lauren DiPerna [ctb], Tomas Fryda [ctb], H2O.ai [cph, fnd]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.