Running examples in ‘ff-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: read.table.ffdf
> ### Title: Importing csv files into ff data.frames
> ### Aliases: read.table.ffdf read.csv.ffdf read.csv2.ffdf read.delim.ffdf
> ###   read.delim2.ffdf
> ### Keywords: IO file connection
> 
> ### ** Examples
> 
>  message("create some csv data on disk")
create some csv data on disk
>  x <- data.frame(
+    log=rep(c(FALSE, TRUE), length.out=26)
+  , int=1:26
+  , dbl=1:26 + 0.1
+  , fac=factor(letters)
+  , ord=ordered(LETTERS)
+  , dct=Sys.time()+1:26
+  , dat=seq(as.Date("1910/1/1"), length.out=26, by=1)
+  , stringsAsFactors = TRUE
+  )
>  x <- x[c(13:1, 13:1),]
>  csvfile <- tempPathFile(path=getOption("fftempdir"), extension="csv")
>  write.csv(x, file=csvfile, row.names=FALSE)
>  
>  cat("Simply read csv with header\n")
Simply read csv with header
>  y <- read.csv(file=csvfile, header=TRUE)
>  y
     log int  dbl fac ord                        dct        dat
1  FALSE  13 13.1   m   M 2025-03-05 15:32:25.954253 1910-01-13
2   TRUE  12 12.1   l   L 2025-03-05 15:32:24.954253 1910-01-12
3  FALSE  11 11.1   k   K 2025-03-05 15:32:23.954253 1910-01-11
4   TRUE  10 10.1   j   J 2025-03-05 15:32:22.954253 1910-01-10
5  FALSE   9  9.1   i   I 2025-03-05 15:32:21.954253 1910-01-09
6   TRUE   8  8.1   h   H 2025-03-05 15:32:20.954253 1910-01-08
7  FALSE   7  7.1   g   G 2025-03-05 15:32:19.954253 1910-01-07
8   TRUE   6  6.1   f   F 2025-03-05 15:32:18.954253 1910-01-06
9  FALSE   5  5.1   e   E 2025-03-05 15:32:17.954253 1910-01-05
10  TRUE   4  4.1   d   D 2025-03-05 15:32:16.954253 1910-01-04
11 FALSE   3  3.1   c   C 2025-03-05 15:32:15.954253 1910-01-03
12  TRUE   2  2.1   b   B 2025-03-05 15:32:14.954253 1910-01-02
13 FALSE   1  1.1   a   A 2025-03-05 15:32:13.954253 1910-01-01
14 FALSE  13 13.1   m   M 2025-03-05 15:32:25.954253 1910-01-13
15  TRUE  12 12.1   l   L 2025-03-05 15:32:24.954253 1910-01-12
16 FALSE  11 11.1   k   K 2025-03-05 15:32:23.954253 1910-01-11
17  TRUE  10 10.1   j   J 2025-03-05 15:32:22.954253 1910-01-10
18 FALSE   9  9.1   i   I 2025-03-05 15:32:21.954253 1910-01-09
19  TRUE   8  8.1   h   H 2025-03-05 15:32:20.954253 1910-01-08
20 FALSE   7  7.1   g   G 2025-03-05 15:32:19.954253 1910-01-07
21  TRUE   6  6.1   f   F 2025-03-05 15:32:18.954253 1910-01-06
22 FALSE   5  5.1   e   E 2025-03-05 15:32:17.954253 1910-01-05
23  TRUE   4  4.1   d   D 2025-03-05 15:32:16.954253 1910-01-04
24 FALSE   3  3.1   c   C 2025-03-05 15:32:15.954253 1910-01-03
25  TRUE   2  2.1   b   B 2025-03-05 15:32:14.954253 1910-01-02
26 FALSE   1  1.1   a   A 2025-03-05 15:32:13.954253 1910-01-01
>  cat("Read csv with header\n")
Read csv with header
>  ffy <- read.csv.ffdf(file=csvfile, header=TRUE)
>  ffy
ffdf (all open) dim=c(26,7), dimorder=c(1,2) row.names=NULL
ffdf virtual mapping
    PhysicalName VirtualVmode PhysicalVmode  AsIs VirtualIsMatrix
log          log      integer       integer FALSE           FALSE
int          int      integer       integer FALSE           FALSE
dbl          dbl       double        double FALSE           FALSE
fac          fac      integer       integer FALSE           FALSE
ord          ord      integer       integer FALSE           FALSE
dct          dct      integer       integer FALSE           FALSE
dat          dat      integer       integer FALSE           FALSE
    PhysicalIsMatrix PhysicalElementNo PhysicalFirstCol PhysicalLastCol
log            FALSE                 1                1               1
int            FALSE                 2                1               1
dbl            FALSE                 3                1               1
fac            FALSE                 4                1               1
ord            FALSE                 5                1               1
dct            FALSE                 6                1               1
dat            FALSE                 7                1               1
    PhysicalIsOpen
log           TRUE
int           TRUE
dbl           TRUE
fac           TRUE
ord           TRUE
dct           TRUE
dat           TRUE
ffdf data
                          log                        int
1  FALSE                      13                        
2  TRUE                       12                        
3  FALSE                      11                        
4  TRUE                       10                        
5  FALSE                       9                        
6  TRUE                        8                        
7  FALSE                       7                        
8  TRUE                        6                        
:                           :                          :
19 TRUE                        8                        
20 FALSE                       7                        
21 TRUE                        6                        
22 FALSE                       5                        
23 TRUE                        4                        
24 FALSE                       3                        
25 TRUE                        2                        
26 FALSE                       1                        
                          dbl                        fac
1  13.1                       m                         
2  12.1                       l                         
3  11.1                       k                         
4  10.1                       j                         
5   9.1                       i                         
6   8.1                       h                         
7   7.1                       g                         
8   6.1                       f                         
:                           :                          :
19  8.1                       h                         
20  7.1                       g                         
21  6.1                       f                         
22  5.1                       e                         
23  4.1                       d                         
24  3.1                       c                         
25  2.1                       b                         
26  1.1                       a                         
                          ord                        dct
1  M                          2025-03-05 15:32:25.954253
2  L                          2025-03-05 15:32:24.954253
3  K                          2025-03-05 15:32:23.954253
4  J                          2025-03-05 15:32:22.954253
5  I                          2025-03-05 15:32:21.954253
6  H                          2025-03-05 15:32:20.954253
7  G                          2025-03-05 15:32:19.954253
8  F                          2025-03-05 15:32:18.954253
:                           :                          :
19 H                          2025-03-05 15:32:20.954253
20 G                          2025-03-05 15:32:19.954253
21 F                          2025-03-05 15:32:18.954253
22 E                          2025-03-05 15:32:17.954253
23 D                          2025-03-05 15:32:16.954253
24 C                          2025-03-05 15:32:15.954253
25 B                          2025-03-05 15:32:14.954253
26 A                          2025-03-05 15:32:13.954253
                          dat
1  1910-01-13                
2  1910-01-12                
3  1910-01-11                
4  1910-01-10                
5  1910-01-09                
6  1910-01-08                
7  1910-01-07                
8  1910-01-06                
:                           :
19 1910-01-08                
20 1910-01-07                
21 1910-01-06                
22 1910-01-05                
23 1910-01-04                
24 1910-01-03                
25 1910-01-02                
26 1910-01-01                
>  sapply(ffy[,], class)
      log       int       dbl       fac       ord       dct       dat 
 "factor" "integer" "numeric"  "factor"  "factor"  "factor"  "factor" 
>  
>  message("reading with colClasses (an ordered factor wont'work in read.csv)")
reading with colClasses (an ordered factor wont'work in read.csv)
>  try(read.csv(file=csvfile, header=TRUE, colClasses=c(ord="ordered")
+  , stringsAsFactors = TRUE))
Error in methods::as(data[[i]], colClasses[i]) : 
  no method or default for coercing “character” to “ordered”
>  # TODO could fix this with the following two commands (Gabor Grothendieck) 
>  # but does not know what bad side-effects this could have
>  #setOldClass("ordered")
>  #setAs("character", "ordered", function(from) ordered(from))
>  y <- read.csv(file=csvfile, header=TRUE, colClasses=c(dct="POSIXct", dat="Date")
+  , stringsAsFactors = TRUE)
>  ffy <- read.csv.ffdf(
+    file=csvfile
+  , header=TRUE
+  , colClasses=c(ord="ordered", dct="POSIXct", dat="Date")
+  )
>  rbind(
+    ram_class = sapply(y, function(x)paste(class(x), collapse = ","))
+  , ff_class = sapply(ffy[,], function(x)paste(class(x), collapse = ","))
+  , ff_vmode = vmode(ffy)
+  )
          log       int       dbl       fac       ord             
ram_class "factor"  "integer" "numeric" "factor"  "factor"        
ff_class  "factor"  "integer" "numeric" "factor"  "ordered,factor"
ff_vmode  "integer" "integer" "double"  "integer" "integer"       
          dct              dat     
ram_class "POSIXct,POSIXt" "Date"  
ff_class  "POSIXct,POSIXt" "Date"  
ff_vmode  "double"         "double"
>  
>  message("NOTE that reading in chunks can change the sequence of levels and thus the coding")
NOTE that reading in chunks can change the sequence of levels and thus the coding
>  message("(Sorting levels during chunked reading can be too expensive)")
(Sorting levels during chunked reading can be too expensive)
>  levels(ffy$fac[])
 [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m"
>  ffy <- read.csv.ffdf(
+    file=csvfile
+  , header=TRUE
+  , colClasses=c(ord="ordered", dct="POSIXct", dat="Date")
+  , first.rows=6
+  , next.rows=10
+  , VERBOSE=TRUE
+  )
read.table.ffdf 1..6 (6)  csv-read=0.001sec ffdf-write=0.011sec
read.table.ffdf 7..16 (10)  csv-read=0.001sec ffdf-write=0.006sec
read.table.ffdf 17..26 (10)  csv-read=0.001secError in UseMethod("recodeLevels") : 
  no applicable method for 'recodeLevels' applied to an object of class "logical"
Calls: read.csv.ffdf -> read.table.ffdf -> recodeLevels
Execution halted