Skip to content
Snippets Groups Projects
Commit cb3fa745 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo

parent ab60a0a1
No related branches found
No related tags found
No related merge requests found
Package: algoli
Type: Package
Version: 0.0.1
Version: 0.0.2
Authors@R: c(person("Jean-Marie", "Lepioufle", , "jml@nilu.no", role=c("aut","cre")),
person("NILU",role="cph"))
Title: algoli
......
......@@ -54,12 +54,12 @@ algdoor_object <- function(service){
invisible()
}
df_algdoor <- function(x,name,as_factor){
df_algdoor <- function(x,name){
fun <- try(utils::getFromNamespace("df",core_algdoor()),silent=TRUE)
if (inherits(fun,"try-error")==TRUE) {
stop("algdoor model function not found")
} else {
res <- do.call("fun",list(sc=sc_,x=x,name=name,as_factor=as_factor))
res <- do.call("fun",list(sc=sc_,x=x,name=name))
return(res)
}
}
......@@ -157,13 +157,13 @@ algdoor_object <- function(service){
invisible()
}
data_train <- function(x,as_factor){
train_<<- df_algdoor(x=x,name="train_",as_factor=as_factor)
data_train <- function(x){
train_<<- df_algdoor(x=x,name="train_")
invisible()
}
data_test <- function(x,as_factor){
test_ <<- df_algdoor(x=x,name="test_",as_factor=as_factor)
data_test <- function(x){
test_ <<- df_algdoor(x=x,name="test_")
invisible()
}
......@@ -181,11 +181,11 @@ algdoor_object <- function(service){
invisible()
}
dataset <- function(dataset,col_bind=NULL,train=80,test=20,seed=NULL,as_factor=NULL){
dataset <- function(dataset,col_bind=NULL,train=80,test=20,seed=NULL){
get_col_bind(col_bind)
tmp <- split_algdoor(copy_algdoor(dataset) ,train=train,test=test,seed=seed)
if (train!=0L) data_train(x=tmp$train,as_factor=as_factor)
data_test(x=tmp$test,as_factor=as_factor)
if (train!=0L) data_train(x=tmp$train)
data_test(x=tmp$test)
invisible()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment