# This file is part of the standard setup for testthat. # It is recommended that you do not modify it. # # Where should you do additional test configuration? # Learn more about the roles of various files in: # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview # * https://testthat.r-lib.org/articles/special-files.html library(testthat) library(RiemannLebesgueForest) test_that("my_function returns the correct prediction and tree structure", { # Test code with expectations # data(airquality) # set.seed(217) # ozone.rlf <- RLForest(Ozone ~ ., data=airquality,na.action=na.omit,ntreesub=1,replace=FALSE,Lp=0.8) # print(ozone.rlf) # (predict(ozone.rlf, airquality)) set.seed(17) x <- matrix(runif(5e2), 100) y <- runif(100) (myrlf <- RLForest(x, y,ntreesub=1,replace=FALSE,Lp=0.8)) (predict(myrlf, x)) })