* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/dummies.Rcheck’ * using R Under development (unstable) (2022-04-26 r82260) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘dummies/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘dummies’ version ‘1.5.6’ * 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 whether package ‘dummies’ can be installed ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... NOTE File LICENSE is not mentioned in the DESCRIPTION file. * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... 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 ... [4s/11s] NOTE dummy: no visible global function definition for ‘model.matrix’ dummy: no visible global function definition for ‘model.frame’ Undefined global functions or variables: model.frame model.matrix Consider adding importFrom("stats", "model.frame", "model.matrix") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... NOTE Rd file 'dummy.Rd': \usage lines wider than 90 characters: dummy.data.frame(data, names = NULL, omit.constants=TRUE, dummy.classes = getOption("dummy.classes"), all = TRUE, ...) These lines will be truncated in the PDF manual. * 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 examples ... ERROR Running examples in ‘dummies-Ex.R’ failed The error most likely occurred in: > ### Name: dummy > ### Title: Flexible, efficient creation of dummy variables. > ### Aliases: dummy dummy.data.frame > ### Keywords: manip models > > ### ** Examples > > > letters <- c( "a", "a", "b", "c", "d", "e", "f", "g", "h", "b", "b" ) > dummy( as.character(letters) ) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored as.character(letters)a as.character(letters)b as.character(letters)c [1,] 1 0 0 [2,] 1 0 0 [3,] 0 1 0 [4,] 0 0 1 [5,] 0 0 0 [6,] 0 0 0 [7,] 0 0 0 [8,] 0 0 0 [9,] 0 0 0 [10,] 0 1 0 [11,] 0 1 0 as.character(letters)d as.character(letters)e as.character(letters)f [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 1 0 0 [6,] 0 1 0 [7,] 0 0 1 [8,] 0 0 0 [9,] 0 0 0 [10,] 0 0 0 [11,] 0 0 0 as.character(letters)g as.character(letters)h [1,] 0 0 [2,] 0 0 [3,] 0 0 [4,] 0 0 [5,] 0 0 [6,] 0 0 [7,] 0 0 [8,] 1 0 [9,] 0 1 [10,] 0 0 [11,] 0 0 > dummy( letters[1:6] ) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored lettersa lettersb lettersc lettersd letterse [1,] 1 0 0 0 0 [2,] 1 0 0 0 0 [3,] 0 1 0 0 0 [4,] 0 0 1 0 0 [5,] 0 0 0 1 0 [6,] 0 0 0 0 1 > > l <- as.factor(letters)[ c(1:3,1:6,4:6) ] > dummy(l) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored la lb lc ld le [1,] 1 0 0 0 0 [2,] 1 0 0 0 0 [3,] 0 1 0 0 0 [4,] 1 0 0 0 0 [5,] 1 0 0 0 0 [6,] 0 1 0 0 0 [7,] 0 0 1 0 0 [8,] 0 0 0 1 0 [9,] 0 0 0 0 1 [10,] 0 0 1 0 0 [11,] 0 0 0 1 0 [12,] 0 0 0 0 1 > dummy(l, drop=FALSE) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored la lb lc ld le lf lg lh [1,] 1 0 0 0 0 0 0 0 [2,] 1 0 0 0 0 0 0 0 [3,] 0 1 0 0 0 0 0 0 [4,] 1 0 0 0 0 0 0 0 [5,] 1 0 0 0 0 0 0 0 [6,] 0 1 0 0 0 0 0 0 [7,] 0 0 1 0 0 0 0 0 [8,] 0 0 0 1 0 0 0 0 [9,] 0 0 0 0 1 0 0 0 [10,] 0 0 1 0 0 0 0 0 [11,] 0 0 0 1 0 0 0 0 [12,] 0 0 0 0 1 0 0 0 > dummy(l, sep=":") Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored l:a l:b l:c l:d l:e [1,] 1 0 0 0 0 [2,] 1 0 0 0 0 [3,] 0 1 0 0 0 [4,] 1 0 0 0 0 [5,] 1 0 0 0 0 [6,] 0 1 0 0 0 [7,] 0 0 1 0 0 [8,] 0 0 0 1 0 [9,] 0 0 0 0 1 [10,] 0 0 1 0 0 [11,] 0 0 0 1 0 [12,] 0 0 0 0 1 > dummy(l, sep="::", fun=as.logical) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored l::a l::b l::c l::d l::e [1,] TRUE FALSE FALSE FALSE FALSE [2,] TRUE FALSE FALSE FALSE FALSE [3,] FALSE TRUE FALSE FALSE FALSE [4,] TRUE FALSE FALSE FALSE FALSE [5,] TRUE FALSE FALSE FALSE FALSE [6,] FALSE TRUE FALSE FALSE FALSE [7,] FALSE FALSE TRUE FALSE FALSE [8,] FALSE FALSE FALSE TRUE FALSE [9,] FALSE FALSE FALSE FALSE TRUE [10,] FALSE FALSE TRUE FALSE FALSE [11,] FALSE FALSE FALSE TRUE FALSE [12,] FALSE FALSE FALSE FALSE TRUE > > # TESTING NAS > l <- c( NA, l, NA) > dummy(l) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored l1 l2 l3 l4 l5 lNA [1,] 0 0 0 0 0 1 [2,] 1 0 0 0 0 0 [3,] 1 0 0 0 0 0 [4,] 0 1 0 0 0 0 [5,] 1 0 0 0 0 0 [6,] 1 0 0 0 0 0 [7,] 0 1 0 0 0 0 [8,] 0 0 1 0 0 0 [9,] 0 0 0 1 0 0 [10,] 0 0 0 0 1 0 [11,] 0 0 1 0 0 0 [12,] 0 0 0 1 0 0 [13,] 0 0 0 0 1 0 [14,] 0 0 0 0 0 1 > dummy(l,sep=":") Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored l:1 l:2 l:3 l:4 l:5 l:NA [1,] 0 0 0 0 0 1 [2,] 1 0 0 0 0 0 [3,] 1 0 0 0 0 0 [4,] 0 1 0 0 0 0 [5,] 1 0 0 0 0 0 [6,] 1 0 0 0 0 0 [7,] 0 1 0 0 0 0 [8,] 0 0 1 0 0 0 [9,] 0 0 0 1 0 0 [10,] 0 0 0 0 1 0 [11,] 0 0 1 0 0 0 [12,] 0 0 0 1 0 0 [13,] 0 0 0 0 1 0 [14,] 0 0 0 0 0 1 > > > dummy(iris$Species) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored Speciessetosa Speciesversicolor Speciesvirginica [1,] 1 0 0 [2,] 1 0 0 [3,] 1 0 0 [4,] 1 0 0 [5,] 1 0 0 [6,] 1 0 0 [7,] 1 0 0 [8,] 1 0 0 [9,] 1 0 0 [10,] 1 0 0 [11,] 1 0 0 [12,] 1 0 0 [13,] 1 0 0 [14,] 1 0 0 [15,] 1 0 0 [16,] 1 0 0 [17,] 1 0 0 [18,] 1 0 0 [19,] 1 0 0 [20,] 1 0 0 [21,] 1 0 0 [22,] 1 0 0 [23,] 1 0 0 [24,] 1 0 0 [25,] 1 0 0 [26,] 1 0 0 [27,] 1 0 0 [28,] 1 0 0 [29,] 1 0 0 [30,] 1 0 0 [31,] 1 0 0 [32,] 1 0 0 [33,] 1 0 0 [34,] 1 0 0 [35,] 1 0 0 [36,] 1 0 0 [37,] 1 0 0 [38,] 1 0 0 [39,] 1 0 0 [40,] 1 0 0 [41,] 1 0 0 [42,] 1 0 0 [43,] 1 0 0 [44,] 1 0 0 [45,] 1 0 0 [46,] 1 0 0 [47,] 1 0 0 [48,] 1 0 0 [49,] 1 0 0 [50,] 1 0 0 [51,] 0 1 0 [52,] 0 1 0 [53,] 0 1 0 [54,] 0 1 0 [55,] 0 1 0 [56,] 0 1 0 [57,] 0 1 0 [58,] 0 1 0 [59,] 0 1 0 [60,] 0 1 0 [61,] 0 1 0 [62,] 0 1 0 [63,] 0 1 0 [64,] 0 1 0 [65,] 0 1 0 [66,] 0 1 0 [67,] 0 1 0 [68,] 0 1 0 [69,] 0 1 0 [70,] 0 1 0 [71,] 0 1 0 [72,] 0 1 0 [73,] 0 1 0 [74,] 0 1 0 [75,] 0 1 0 [76,] 0 1 0 [77,] 0 1 0 [78,] 0 1 0 [79,] 0 1 0 [80,] 0 1 0 [81,] 0 1 0 [82,] 0 1 0 [83,] 0 1 0 [84,] 0 1 0 [85,] 0 1 0 [86,] 0 1 0 [87,] 0 1 0 [88,] 0 1 0 [89,] 0 1 0 [90,] 0 1 0 [91,] 0 1 0 [92,] 0 1 0 [93,] 0 1 0 [94,] 0 1 0 [95,] 0 1 0 [96,] 0 1 0 [97,] 0 1 0 [98,] 0 1 0 [99,] 0 1 0 [100,] 0 1 0 [101,] 0 0 1 [102,] 0 0 1 [103,] 0 0 1 [104,] 0 0 1 [105,] 0 0 1 [106,] 0 0 1 [107,] 0 0 1 [108,] 0 0 1 [109,] 0 0 1 [110,] 0 0 1 [111,] 0 0 1 [112,] 0 0 1 [113,] 0 0 1 [114,] 0 0 1 [115,] 0 0 1 [116,] 0 0 1 [117,] 0 0 1 [118,] 0 0 1 [119,] 0 0 1 [120,] 0 0 1 [121,] 0 0 1 [122,] 0 0 1 [123,] 0 0 1 [124,] 0 0 1 [125,] 0 0 1 [126,] 0 0 1 [127,] 0 0 1 [128,] 0 0 1 [129,] 0 0 1 [130,] 0 0 1 [131,] 0 0 1 [132,] 0 0 1 [133,] 0 0 1 [134,] 0 0 1 [135,] 0 0 1 [136,] 0 0 1 [137,] 0 0 1 [138,] 0 0 1 [139,] 0 0 1 [140,] 0 0 1 [141,] 0 0 1 [142,] 0 0 1 [143,] 0 0 1 [144,] 0 0 1 [145,] 0 0 1 [146,] 0 0 1 [147,] 0 0 1 [148,] 0 0 1 [149,] 0 0 1 [150,] 0 0 1 > dummy(iris$Species[ c(1:3,51:53,101:103) ] ) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored Speciessetosa Speciesversicolor Speciesvirginica [1,] 1 0 0 [2,] 1 0 0 [3,] 1 0 0 [4,] 0 1 0 [5,] 0 1 0 [6,] 0 1 0 [7,] 0 0 1 [8,] 0 0 1 [9,] 0 0 1 > dummy(iris$Species[ c(1:3,51:53,101:103) ], sep=":" ) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored Species:setosa Species:versicolor Species:virginica [1,] 1 0 0 [2,] 1 0 0 [3,] 1 0 0 [4,] 0 1 0 [5,] 0 1 0 [6,] 0 1 0 [7,] 0 0 1 [8,] 0 0 1 [9,] 0 0 1 > dummy(iris$Species[ c(1:3,51:53) ], sep=":", drop=FALSE ) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored Species:setosa Species:versicolor Species:virginica [1,] 1 0 0 [2,] 1 0 0 [3,] 1 0 0 [4,] 0 1 0 [5,] 0 1 0 [6,] 0 1 0 > > > # TESTING TRAP FOR ONE LEVEL > dummy( as.factor(letters)[c(1,1,1,1)] ) as.factor(letters)a [1,] 1 [2,] 1 [3,] 1 [4,] 1 > dummy( as.factor(letters)[c(1,1,2,2)] ) as.factor(letters)a [1,] 1 [2,] 1 [3,] 1 [4,] 1 > dummy( as.factor(letters)[c(1,1,1,1)] , drop = FALSE ) Warning in model.matrix.default(~x - 1, model.frame(~x - 1), contrasts = FALSE) : non-list contrasts argument ignored as.factor(letters)a as.factor(letters)b as.factor(letters)c [1,] 1 0 0 [2,] 1 0 0 [3,] 1 0 0 [4,] 1 0 0 as.factor(letters)d as.factor(letters)e as.factor(letters)f [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 as.factor(letters)g as.factor(letters)h [1,] 0 0 [2,] 0 0 [3,] 0 0 [4,] 0 0 > > > dummy.data.frame(iris) ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- dummies --- call from context --- NULL --- call from argument --- dummy.classes == "ALL" || class(data[, nm]) %in% dummy.classes --- R stacktrace --- where 1: dummy.data.frame(iris) --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- --- function search by body --- ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 3 NOTEs See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/dummies.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:16.70, 24.06 + 5.13