[R-pkg-devel] Fwd: Re: [CRAN-pretest-archived] CRAN submission SSLR 0.9.0
I do not speak roxygen, but you have to register the S3 method. Best, Uwe Ligges
On 10.03.2020 17:28, fpalomares at correo.ugr.es wrote:
Hi, I thiks its weird:
The error is:? no applicable method for 'fit' applied to an object of
class "model_sslr"
In the code:
#' fit
#'
#' @title fit object
#' @param object object
#' @param ... other parameters to be passed
#' @rdname fit
#' @export fit
fit <- function(object, ...){
? UseMethod("fit")
}
And:
#' @title Fit with formula and data
#' @description Funtion to fit through the formula
#' @param object is the model
#' @param formula is the formula
#' @param data is the total data train
#' @param ... unused in this case
#' @importFrom rlang quos
#' @rdname fit
#' @export
#' @export fit.model_sslr
fit.model_sslr <- function(object, formula = NULL, data = NULL, ...) {
? dots <- quos(...)
? if (all(c("x", "y") %in% names(dots)))
??? rlang::abort("`fit.model_sslr()` is for the formula methods. Use
`fit_xy()` instead.")
? fit_form_interface <- check_form_interface(formula, data)
? x_and_y <- get_x_y(formula, data)
? eval_env <- rlang::env()
? eval_env$x <- x_and_y$x
? eval_env$y <- x_and_y$y
? fit_interface <- check_xy_interface(eval_env$x, eval_env$y)
? elapsed <- system.time(model <- object$fit_function(eval_env$x,
eval_env$y))
new_model_sslr_fitted(model,class(model),object$args,colnames(eval_env$x),elapsed,formula)
}
Thanks
El 2020-03-10 16:19, ligges at statistik.tu-dortmund.de escribi?:
Dear maintainer, package SSLR_0.9.0.tar.gz does not pass the incoming checks automatically, please see the following pre-tests: Windows: <https://win-builder.r-project.org/incoming_pretest/SSLR_0.9.0_20200310_160158/Windows/00check.log> Status: 2 ERRORs, 1 WARNING, 1 NOTE Debian: <https://win-builder.r-project.org/incoming_pretest/SSLR_0.9.0_20200310_160158/Debian/00check.log> Status: 1 ERROR, 1 WARNING, 1 NOTE Please fix all problems and resubmit a fixed version via the webform. If you are not sure how to fix the problems shown, please ask for help on the R-package-devel mailing list: <https://stat.ethz.ch/mailman/listinfo/r-package-devel> If you are fairly certain the rejection is a false positive, please reply-all to this message and explain. More details are given in the directory: <https://win-builder.r-project.org/incoming_pretest/SSLR_0.9.0_20200310_160158/> The files will be removed after roughly 7 days. No strong reverse dependencies to be checked. Best regards, CRAN teams' auto-check service Flavor: r-devel-linux-x86_64-debian-gcc, r-devel-windows-ix86+x86_64 Check: CRAN incoming feasibility, Result: NOTE ? Maintainer: 'Francisco Jes??s Palomares Alabarce <fpalomares at correo.ugr.es>' ? New submission ? Possibly mis-spelled words in DESCRIPTION: ??? SSLR (23:14) ??? VM (27:37) ? Found the following (possibly) invalid URLs: ??? URL: https://cran.r-project.org/web/packages/RSSL/RSSL.pdf ????? From: inst/doc/introduction.html ??????????? inst/doc/models.html ????? Status: 200 ????? Message: OK ????? CRAN URL not in canonical form ??? The canonical URL of the CRAN page for a package is ????? https://CRAN.R-project.org/package=pkgname ? Found the following (possibly) invalid file URI: ??? URI: www.cs.ucr.edu/~eamonn/time_series_data/ ????? From: man/coffee.Rd ? The Description field should not start with the package name, ??? 'This package' or similar. Flavor: r-devel-windows-ix86+x86_64 Check: running examples for arch 'i386', Result: ERROR ? Running examples in 'SSLR-Ex.R' failed ? The error most likely occurred in: ? > base::assign(".ptime", proc.time(), pos = "CheckExEnv") ? > ### Name: COREG ? > ### Title: General Interface for COREG model ? > ### Aliases: COREG ? > ? > ### ** Examples ? > ? > library(tidyverse) ? -- Attaching packages --------------------------------------- tidyverse 1.3.0 -- ? v ggplot2 3.3.0???? v purrr?? 0.3.3 ? v tibble? 2.1.3???? v dplyr?? 0.8.5 ? v tidyr?? 1.0.2???? v stringr 1.4.0 ? v readr?? 1.3.1???? v forcats 0.5.0 ? -- Conflicts ------------------------------------------ tidyverse_conflicts() -- ? x dplyr::filter() masks stats::filter() ? x dplyr::lag()??? masks stats::lag() ? > library(tidymodels) ? -- Attaching packages -------------------------------------- tidymodels 0.1.0 -- ? v broom???? 0.5.5???? v rsample?? 0.0.5 ? v dials???? 0.0.4???? v tune????? 0.0.1 ? v infer???? 0.5.1???? v workflows 0.1.0 ? v parsnip?? 0.0.5???? v yardstick 0.0.5 ? v recipes?? 0.1.9 ? -- Conflicts ----------------------------------------- tidymodels_conflicts() -- ? x scales::discard()?? masks purrr::discard() ? x dplyr::filter()???? masks stats::filter() ? x recipes::fixed()??? masks stringr::fixed() ? x dplyr::lag()??????? masks stats::lag() ? x dials::margin()???? masks ggplot2::margin() ? x yardstick::spec()?? masks readr::spec() ? x recipes::step()???? masks stats::step() ? x recipes::yj_trans() masks scales::yj_trans() ? > library(SSLR) ? > ? > data <- na.omit(airquality) ? > #data <- na.omit(airquality) ? > ? > cls <- which(colnames(data) == "Ozone") ? > ? > colnames(data)[cls]<- "class" ? > ? > set.seed(1) ? > train.index? <- sample(nrow(data), round(0.7 * nrow(data))) ? > train <- data[ train.index,] ? > test? <- data[-train.index,] ? > ? > ? > #% LABELED ? > labeled.index <- sample(nrow(train), round(0.2 * nrow(train))) ? > train[-labeled.index,cls] <- NA ? > ? > m <- COREG(max.iter = 2) %>% fit(class ~ ., data = train) ? Error in UseMethod("fit") : ??? no applicable method for 'fit' applied to an object of class "model_sslr" ? Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> fit ? Execution halted Flavor: r-devel-windows-ix86+x86_64 Check: running examples for arch 'x64', Result: ERROR ? Running examples in 'SSLR-Ex.R' failed ? The error most likely occurred in: ? > base::assign(".ptime", proc.time(), pos = "CheckExEnv") ? > ### Name: COREG ? > ### Title: General Interface for COREG model ? > ### Aliases: COREG ? > ? > ### ** Examples ? > ? > library(tidyverse) ? -- Attaching packages --------------------------------------- tidyverse 1.3.0 -- ? v ggplot2 3.3.0???? v purrr?? 0.3.3 ? v tibble? 2.1.3???? v dplyr?? 0.8.5 ? v tidyr?? 1.0.2???? v stringr 1.4.0 ? v readr?? 1.3.1???? v forcats 0.5.0 ? -- Conflicts ------------------------------------------ tidyverse_conflicts() -- ? x dplyr::filter() masks stats::filter() ? x dplyr::lag()??? masks stats::lag() ? > library(tidymodels) ? -- Attaching packages -------------------------------------- tidymodels 0.1.0 -- ? v broom???? 0.5.5???? v rsample?? 0.0.5 ? v dials???? 0.0.4???? v tune????? 0.0.1 ? v infer???? 0.5.1???? v workflows 0.1.0 ? v parsnip?? 0.0.5???? v yardstick 0.0.5 ? v recipes?? 0.1.9 ? -- Conflicts ----------------------------------------- tidymodels_conflicts() -- ? x scales::discard()?? masks purrr::discard() ? x dplyr::filter()???? masks stats::filter() ? x recipes::fixed()??? masks stringr::fixed() ? x dplyr::lag()??????? masks stats::lag() ? x dials::margin()???? masks ggplot2::margin() ? x yardstick::spec()?? masks readr::spec() ? x recipes::step()???? masks stats::step() ? x recipes::yj_trans() masks scales::yj_trans() ? > library(SSLR) ? > ? > data <- na.omit(airquality) ? > #data <- na.omit(airquality) ? > ? > cls <- which(colnames(data) == "Ozone") ? > ? > colnames(data)[cls]<- "class" ? > ? > set.seed(1) ? > train.index? <- sample(nrow(data), round(0.7 * nrow(data))) ? > train <- data[ train.index,] ? > test? <- data[-train.index,] ? > ? > ? > #% LABELED ? > labeled.index <- sample(nrow(train), round(0.2 * nrow(train))) ? > train[-labeled.index,cls] <- NA ? > ? > m <- COREG(max.iter = 2) %>% fit(class ~ ., data = train) ? Error in UseMethod("fit") : ??? no applicable method for 'fit' applied to an object of class "model_sslr" ? Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> fit ? Execution halted Flavor: r-devel-windows-ix86+x86_64 Check: re-building of vignette outputs, Result: WARNING ? Error(s) in re-building vignettes: ? --- re-building 'classification.Rmd' using rmarkdown ? Quitting from lines 58-60 (classification.Rmd) ? Error: processing vignette 'classification.Rmd' failed with diagnostics: ? no applicable method for 'fit' applied to an object of class "model_sslr" ? --- failed re-building 'classification.Rmd' ? --- re-building 'fit.Rmd' using rmarkdown ? --- finished re-building 'fit.Rmd' ? --- re-building 'introduction.Rmd' using rmarkdown ? --- finished re-building 'introduction.Rmd' ? --- re-building 'models.Rmd' using rmarkdown ? --- finished re-building 'models.Rmd' ? --- re-building 'regression.Rmd' using rmarkdown ? Quitting from lines 51-53 (regression.Rmd) ? Error: processing vignette 'regression.Rmd' failed with diagnostics: ? no applicable method for 'fit' applied to an object of class "model_sslr" ? --- failed re-building 'regression.Rmd' ? SUMMARY: processing the following files failed: ??? 'classification.Rmd' 'regression.Rmd' ? Error: Vignette re-building failed. ? Execution halted Flavor: r-devel-linux-x86_64-debian-gcc Check: examples, Result: ERROR ? Running examples in 'SSLR-Ex.R' failed ? The error most likely occurred in: ? > base::assign(".ptime", proc.time(), pos = "CheckExEnv") ? > ### Name: COREG ? > ### Title: General Interface for COREG model ? > ### Aliases: COREG ? > ? > ### ** Examples ? > ? > library(tidyverse) ? ?????? Attaching packages ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? tidyverse 1.3.0 ?????? ? ??? ggplot2 3.3.0???? ??? purrr?? 0.3.3 ? ??? tibble? 2.1.3???? ??? dplyr?? 0.8.5 ? ??? tidyr?? 1.0.2???? ??? stringr 1.4.0 ? ??? readr?? 1.3.1???? ??? forcats 0.5.0 ? ?????? Conflicts ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? tidyverse_conflicts() ?????? ? ??? dplyr::filter() masks stats::filter() ? ??? dplyr::lag()??? masks stats::lag() ? > library(tidymodels) ? ?????? Attaching packages ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????? tidymodels 0.1.0 ?????? ? ??? broom???? 0.5.5???? ??? rsample?? 0.0.5 ? ??? dials???? 0.0.4???? ??? tune????? 0.0.1 ? ??? infer???? 0.5.1???? ??? workflows 0.1.0 ? ??? parsnip?? 0.0.5???? ??? yardstick 0.0.5 ? ??? recipes?? 0.1.9 ? ?????? Conflicts ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? tidymodels_conflicts() ?????? ? ??? scales::discard()?? masks purrr::discard() ? ??? dplyr::filter()???? masks stats::filter() ? ??? recipes::fixed()??? masks stringr::fixed() ? ??? dplyr::lag()??????? masks stats::lag() ? ??? dials::margin()???? masks ggplot2::margin() ? ??? yardstick::spec()?? masks readr::spec() ? ??? recipes::step()???? masks stats::step() ? ??? recipes::yj_trans() masks scales::yj_trans() ? > library(SSLR) ? > ? > data <- na.omit(airquality) ? > #data <- na.omit(airquality) ? > ? > cls <- which(colnames(data) == "Ozone") ? > ? > colnames(data)[cls]<- "class" ? > ? > set.seed(1) ? > train.index? <- sample(nrow(data), round(0.7 * nrow(data))) ? > train <- data[ train.index,] ? > test? <- data[-train.index,] ? > ? > ? > #% LABELED ? > labeled.index <- sample(nrow(train), round(0.2 * nrow(train))) ? > train[-labeled.index,cls] <- NA ? > ? > m <- COREG(max.iter = 2) %>% fit(class ~ ., data = train) ? Error in UseMethod("fit") : ??? no applicable method for 'fit' applied to an object of class "model_sslr" ? Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> fit ? Execution halted Flavor: r-devel-linux-x86_64-debian-gcc Check: re-building of vignette outputs, Result: WARNING ? Error(s) in re-building vignettes: ??? ... ? --- re-building 'classification.Rmd' using rmarkdown ? Quitting from lines 58-60 (classification.Rmd) ? Error: processing vignette 'classification.Rmd' failed with diagnostics: ? no applicable method for 'fit' applied to an object of class "model_sslr" ? --- failed re-building 'classification.Rmd' ? --- re-building 'fit.Rmd' using rmarkdown ? --- finished re-building 'fit.Rmd' ? --- re-building 'introduction.Rmd' using rmarkdown ? --- finished re-building 'introduction.Rmd' ? --- re-building 'models.Rmd' using rmarkdown ? --- finished re-building 'models.Rmd' ? --- re-building 'regression.Rmd' using rmarkdown ? Quitting from lines 51-53 (regression.Rmd) ? Error: processing vignette 'regression.Rmd' failed with diagnostics: ? no applicable method for 'fit' applied to an object of class "model_sslr" ? --- failed re-building 'regression.Rmd' ? SUMMARY: processing the following files failed: ??? 'classification.Rmd' 'regression.Rmd' ? Error: Vignette re-building failed. ? Execution halted
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel