Skip to content

Commit

Permalink
Fix R for createFrame updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnocandel committed Dec 31, 2014
1 parent 08604c6 commit f52f6a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/h2o-package/R/ParseImport.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ h2o.assign <- function(data, key) {
.h2o.exec2(expr = data@key, h2o = data@h2o, dest_key = key)
}

h2o.createFrame <- function(object, key, rows, cols, seed, randomize, value, real_range, categorical_fraction, factors, integer_fraction, integer_range, missing_fraction, response_factors, binary_fraction=0.1, binary_ones_fraction=0.02) {
h2o.createFrame <- function(object, key, rows, cols, seed, randomize, value, real_range, categorical_fraction, factors, integer_fraction, integer_range, missing_fraction, response_factors, binary_fraction, binary_ones_fraction) {
if(!is.numeric(rows)) stop("rows must be a numeric value")
if(!is.numeric(cols)) stop("cols must be a numeric value")
if(!is.numeric(seed)) stop("seed must be a numeric value")
Expand Down
7 changes: 4 additions & 3 deletions R/h2o-package/man/h2o.createFrame.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Create an H2O data frame from scratch, with optional randomization. Supports cat
}
\usage{
h2o.createFrame(object, key, rows, cols, seed, randomize, value, real_range,
categorical_fraction, factors, integer_fraction, integer_range,
categorical_fraction, factors, integer_fraction, integer_range, binary_fraction, binary_ones_fraction,
missing_fraction, response_factors)
}
%- maybe also 'usage' for other objects documented here.
Expand Down Expand Up @@ -41,8 +41,9 @@ localH2O = h2o.init(beta = TRUE)
myframe = h2o.createFrame(localH2O, 'myframekey', rows = 1000, cols = 10,
seed = -12301283, randomize = TRUE, value = 0, real_range = 2.0,
categorical_fraction = 0.2, factors = 100,
integer_fraction = 0.2, integer_range = 100, missing_fraction = 0.1,
response_factors = 2)
integer_fraction = 0.2, integer_range = 100,
binary_fraction = 0.1, binary_ones_fraction = 0.01,
missing_fraction = 0.1, response_factors = 2)
head(myframe)
summary(myframe)
h2o.shutdown(localH2O)
Expand Down
2 changes: 1 addition & 1 deletion R/h2o-package/man/h2o.interaction.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ localH2O = h2o.init()
myframe = h2o.createFrame(localH2O, 'framekey', rows = 20, cols = 5,
seed = -12301283, randomize = TRUE, value = 0,
categorical_fraction = 0.8, factors = 10, real_range = 1,
integer_fraction = 0.2, integer_range = 10, missing_fraction = 0.2,
integer_fraction = 0.2, integer_range = 10, binary_fraction = 0, missing_fraction = 0.2,
response_factors = 1)[,-1]
myframe[,3] <- as.factor(myframe[,3])
summary(myframe)
Expand Down

0 comments on commit f52f6a4

Please sign in to comment.