- using R Under development (unstable) (2025-12-24 r89227)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
Debian clang version 21.1.8 (1)
Debian flang version 21.1.8 (1)
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘FuzzyClass/DESCRIPTION’ ... OK
- this is package ‘FuzzyClass’ version ‘0.1.7’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/2s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘FuzzyClass’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the package can be unloaded cleanly ... [0s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [17s/22s] OK
- checking Rd files ... [1s/2s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/0s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [3s/4s] ERROR
Running examples in ‘FuzzyClass-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: DWFuzzyHipergeometricNaiveBayes
> ### Title: Double Weighted Fuzzy Hipergeometric Naive Bayes
> ### Aliases: DWFuzzyHipergeometricNaiveBayes
>
> ### ** Examples
>
>
> set.seed(1)
>
> substituir_zero <- function(x) {
+ if (x == 0) {
+ while(1){
+ new_valor <- rhyper(1,3,30,10)
+ if(new_valor != 0){
+ return(new_valor)
+ }
+ }
+ } else {
+ return(x)
+ }
+ }
>
> #Building dataframe
> class1 <- data.frame(rhyper(72,3,30,10),
+ sample(seq(1,5),72,replace = TRUE), class = "Bem treinado")
> colnames(class1)[1] <- "sucessos"
> class1$sucessos <- sapply(class1$sucessos, substituir_zero)
> colnames(class1)[2] <- "tentativas"
> colnames(class1)[3] <- "avaliação"
> class2 <- data.frame(rhyper(72,3,17,12),
+ sample(seq(4,7),72,replace = TRUE), class = "Mediano")
> colnames(class2)[1] <- "sucessos"
> #class2$sucessos <- ifelse(class2$sucessos == 0, 2, class2$sucessos)
> colnames(class2)[2] <- "tentativas"
> colnames(class2)[3] <- "avaliação"
> class3 <- data.frame(rhyper(72,3,9,11),
+ sample(seq(7,10),72,replace = TRUE), class = "Precisa treinar")
> colnames(class3)[1] <- "sucessos"
> #class3$sucessos <- ifelse(class3$sucessos == 0, 3, class3$sucessos)
> colnames(class3)[2] <- "tentativas"
> colnames(class3)[3] <- "avaliação"
> data <- rbind(class1,class2,class3)
>
> # Weights
> weta1 <- c(0.22, 0.33, 0.45)
> wdelta1 <- c(0.33,0.33,0.33)
>
> #spliting dataframe
> split <- caTools::sample.split(t(data[, 1]), SplitRatio = 0.7)
> Train <- subset(data, split == "TRUE")
> Test <- subset(data, split == "FALSE")
>
> test <- Test[, -3]
> fit_NHT <- DWFuzzyHipergeometricNaiveBayes(
+ train = Train[, -3],
+ cl = Train[, 3], cores = 2,
+ fuzzy = TRUE,
+ wdelta = wdelta1,
+ weta = weta1)
2.535463
3.704793
5.163978
>
> pred_NHT <- predict(fit_NHT, test)
Error in xtfrm.data.frame(list(X1 = 0.00019180046324433, X2 = 0.000155110502235661, :
cannot xtfrm data frames
Calls: predict ... sapply -> lapply -> FUN -> xtfrm -> xtfrm.data.frame
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [9s/16s] OK
Running ‘test_type.R’ [9s/15s]
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [5s/10s] OK
- checking PDF version of manual ... [5s/7s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR