- using R Under development (unstable) (2025-12-18 r89199)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
Debian clang version 21.1.7 (1)
Debian flang version 21.1.7 (1)
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘psidR/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘psidR’ version ‘2.3’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/1s] 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 whether package ‘psidR’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... 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/2s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/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 ... [7s/10s] OK
- checking Rd files ... [0s/1s] 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 examples ... [1s/2s] ERROR
Running examples in ‘psidR-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: build.panel
> ### Title: build.panel: Build PSID panel data set
> ### Aliases: build.panel
>
> ### ** Examples
>
>
> # ######################################
> # reproducible example on artifical data.
> # run this with example(build.panel).
> # ######################################
>
> ## make reproducible family data sets for 2 years
> ## variables are: family income (Money) and age
>
> ## Data acquisition step:
> ## run build.panel with sascii=TRUE
>
> # testPSID creates artifical PSID data
> td <- testPSID(N=12,N.attr=0)
> fam1985 <- data.table::copy(td$famvars1985)
> fam1986 <- data.table::copy(td$famvars1986)
> IND2019ER <- data.table::copy(td$IND2019ER)
>
> # create a temporary datadir
> my.dir <- tempdir()
> #save those in the datadir
> # notice different R formats admissible
> save(fam1985,file=paste0(my.dir,"/FAM1985ER.rda"))
> save(fam1986,file=paste0(my.dir,"/FAM1986ER.RData"))
> save(IND2019ER,file=paste0(my.dir,"/IND2019ER.RData"))
>
> ## end Data acquisition step.
>
> # now define which famvars
> famvars <- data.frame(year=c(1985,1986),
+ money=c("Money85","Money86"),
+ age=c("age85","age86"))
>
> # create ind.vars
> indvars <- data.frame(year=c(1985,1986),ind.weight=c("ER30497","ER30534"))
>
> # call the builder
> # data will contain column "relation.head" holding the relationship code.
>
> d <- build.panel(datadir=my.dir,fam.vars=famvars,
+ ind.vars=indvars,
+ heads.only=FALSE)
INFO [2025-12-20 06:34:00] found FAM1985ER.rda already downloaded
INFO [2025-12-20 06:34:00] found FAM1986ER.rda already downloaded
INFO [2025-12-20 06:34:00] Will download missing datasets now
INFO [2025-12-20 06:34:00] will download latest individual index: IND2021ER
This can take several hours/days to download.
want to go ahead? give me 'yes' or 'no'.
INFO [2025-12-20 06:34:00] psidR: Loading Family data from .rda files
INFO [2025-12-20 06:34:00] psidR: loaded individual file: /home/hornik/tmp/scratch/RtmpepzoTe/IND2019ER.RData
INFO [2025-12-20 06:34:00] psidR: total memory load in MB: 1
INFO [2025-12-20 06:34:01] psidR: currently working on data for year 1985
INFO [2025-12-20 06:34:01] psidR: currently working on data for year 1986
Error in `[.data.table`(data2, , `:=`(present, length(year)), by = pid) :
attempt access index 10/10 in VECTOR_ELT
Calls: build.panel -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [4s/4s] ERROR
Running ‘testthat.R’ [4s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(psidR)
>
> test_check("psidR")
DEBUG [2025-12-20 06:34:03] years:
[1] 1985 1986
DEBUG [2025-12-20 06:34:03] datadir: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/
DEBUG [2025-12-20 06:34:03] any.wealth? 0
DEBUG [2025-12-20 06:34:03] datadir contains:
[1] "FAM1985ER.rda" "FAM1986ER.RData" "IND2017ER.RData"
DEBUG [2025-12-20 06:34:03] family df:
year file
18 1985 1074
19 1986 1075
INFO [2025-12-20 06:34:03] found FAM1985ER.rda already downloaded
INFO [2025-12-20 06:34:03] found FAM1986ER.rda already downloaded
INFO [2025-12-20 06:34:03] Will download missing datasets now
INFO [2025-12-20 06:34:03] will download latest individual index: IND2021ER
This can take several hours/days to download.
want to go ahead? give me 'yes' or 'no'.
INFO [2025-12-20 06:34:03] psidR: Loading Family data from .rda files
INFO [2025-12-20 06:34:03] psidR: loaded individual file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/IND2017ER.RData
INFO [2025-12-20 06:34:03] psidR: total memory load in MB: 1
DEBUG [2025-12-20 06:34:03] psidR: here is the list of hardcoded PSID variables
DEBUG [2025-12-20 06:34:03] psidR: The merge is based on equal values in ind.interview and fam.interview
DEBUG [2025-12-20 06:34:03] ids:
Key: <year>
year ind.interview ind.seq ind.head ind.head.num fam.interview stratum
<num> <char> <char> <char> <num> <char> <char>
1: 1968 ER30001 <NA> ER30003 1 V3 ER31996
2: 1969 ER30020 ER30021 ER30022 1 V442 ER31996
3: 1970 ER30043 ER30044 ER30045 1 V1102 ER31996
4: 1971 ER30067 ER30068 ER30069 1 V1802 ER31996
5: 1972 ER30091 ER30092 ER30093 1 V2402 ER31996
6: 1973 ER30117 ER30118 ER30119 1 V3002 ER31996
7: 1974 ER30138 ER30139 ER30140 1 V3402 ER31996
8: 1975 ER30160 ER30161 ER30162 1 V3802 ER31996
9: 1976 ER30188 ER30189 ER30190 1 V4302 ER31996
10: 1977 ER30217 ER30218 ER30219 1 V5202 ER31996
11: 1978 ER30246 ER30247 ER30248 1 V5702 ER31996
12: 1979 ER30283 ER30284 ER30285 1 V6302 ER31996
13: 1980 ER30313 ER30314 ER30315 1 V6902 ER31996
14: 1981 ER30343 ER30344 ER30345 1 V7502 ER31996
15: 1982 ER30373 ER30374 ER30375 1 V8202 ER31996
16: 1983 ER30399 ER30400 ER30401 10 V8802 ER31996
17: 1984 ER30429 ER30430 ER30431 10 V10002 ER31996
18: 1985 ER30463 ER30464 ER30465 10 V11102 ER31996
19: 1986 ER30498 ER30499 ER30500 10 V12502 ER31996
20: 1987 ER30535 ER30536 ER30537 10 V13702 ER31996
21: 1988 ER30570 ER30571 ER30572 10 V14802 ER31996
22: 1989 ER30606 ER30607 ER30608 10 V16302 ER31996
23: 1990 ER30642 ER30643 ER30644 10 V17702 ER31996
24: 1991 ER30689 ER30690 ER30691 10 V19002 ER31996
25: 1992 ER30733 ER30734 ER30735 10 V20302 ER31996
26: 1993 ER30806 ER30807 ER30808 10 V21602 ER31996
27: 1994 ER33101 ER33102 ER33103 10 ER2002 ER31996
28: 1995 ER33201 ER33202 ER33203 10 ER5002 ER31996
29: 1996 ER33301 ER33302 ER33303 10 ER7002 ER31996
30: 1997 ER33401 ER33402 ER33403 10 ER10002 ER31996
31: 1999 ER33501 ER33502 ER33503 10 ER13002 ER31996
32: 2001 ER33601 ER33602 ER33603 10 ER17002 ER31996
33: 2003 ER33701 ER33702 ER33703 10 ER21002 ER31996
34: 2005 ER33801 ER33802 ER33803 10 ER25002 ER31996
35: 2007 ER33901 ER33902 ER33903 10 ER36002 ER31996
36: 2009 ER34001 ER34002 ER34003 10 ER42002 ER31996
37: 2011 ER34101 ER34102 ER34103 10 ER47302 ER31996
38: 2013 ER34201 ER34202 ER34203 10 ER53002 ER31996
39: 2015 ER34301 ER34302 ER34303 10 ER60002 ER31996
40: 2017 ER34501 ER34502 ER34503 10 ER66002 ER31996
41: 2019 ER34701 ER34702 ER34703 10 ER72002 ER31996
42: 2021 ER34901 ER34902 ER34903 10 ER78002 ER31996
year ind.interview ind.seq ind.head ind.head.num fam.interview stratum
INFO [2025-12-20 06:34:03] psidR: currently working on data for year 1985
DEBUG [2025-12-20 06:34:03] ind.vars.yr:
ind.weight
<char>
1: ER30497
DEBUG [2025-12-20 06:34:03] ind.notnas:
ind.weight
<char>
1: ER30497
DEBUG [2025-12-20 06:34:03] loaded family file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/FAM1985ER.rda
DEBUG [2025-12-20 06:34:03] current memory load in MB: 1
INFO [2025-12-20 06:34:03] psidR: currently working on data for year 1986
DEBUG [2025-12-20 06:34:03] ind.vars.yr:
ind.weight
<char>
1: ER30534
DEBUG [2025-12-20 06:34:03] ind.notnas:
ind.weight
<char>
1: ER30534
DEBUG [2025-12-20 06:34:03] loaded family file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/FAM1986ER.RData
DEBUG [2025-12-20 06:34:03] current memory load in MB: 1
Saving _problems/test_buildpanel-30.R
INFO [2025-12-20 06:34:03] found FAM1985ER.rda already downloaded
INFO [2025-12-20 06:34:03] found FAM1986ER.rda already downloaded
INFO [2025-12-20 06:34:03] Will download missing datasets now
INFO [2025-12-20 06:34:03] will download latest individual index: IND2021ER
This can take several hours/days to download.
want to go ahead? give me 'yes' or 'no'.
INFO [2025-12-20 06:34:04] psidR: Loading Family data from .rda files
INFO [2025-12-20 06:34:04] psidR: loaded individual file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/IND2017ER.RData
INFO [2025-12-20 06:34:04] psidR: total memory load in MB: 1
INFO [2025-12-20 06:34:04] psidR: currently working on data for year 1985
INFO [2025-12-20 06:34:04] dropping non-heads leaves 1037 obs
INFO [2025-12-20 06:34:04] psidR: currently working on data for year 1986
INFO [2025-12-20 06:34:04] dropping non-heads leaves 985 obs
Saving _problems/test_buildpanel-70.R
INFO [2025-12-20 06:34:04] found FAM1985ER.rda already downloaded
INFO [2025-12-20 06:34:04] found FAM1986ER.rda already downloaded
INFO [2025-12-20 06:34:04] Will download missing datasets now
INFO [2025-12-20 06:34:04] will download latest individual index: IND2021ER
This can take several hours/days to download.
want to go ahead? give me 'yes' or 'no'.
INFO [2025-12-20 06:34:04] psidR: Loading Family data from .rda files
INFO [2025-12-20 06:34:04] psidR: loaded individual file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/IND2017ER.RData
INFO [2025-12-20 06:34:04] psidR: total memory load in MB: 1
INFO [2025-12-20 06:34:04] psidR: currently working on data for year 1985
INFO [2025-12-20 06:34:04] dropping non-current-heads leaves 805 obs
INFO [2025-12-20 06:34:04] psidR: currently working on data for year 1986
INFO [2025-12-20 06:34:04] dropping non-current-heads leaves 751 obs
Saving _problems/test_buildpanel-87.R
INFO [2025-12-20 06:34:04] found FAM1985ER.rda already downloaded
INFO [2025-12-20 06:34:04] found FAM1986ER.rda already downloaded
INFO [2025-12-20 06:34:04] Will download missing datasets now
INFO [2025-12-20 06:34:04] will download latest individual index: IND2021ER
This can take several hours/days to download.
want to go ahead? give me 'yes' or 'no'.
INFO [2025-12-20 06:34:04] psidR: Loading Family data from .rda files
INFO [2025-12-20 06:34:04] psidR: loaded individual file: /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/psidR/testdata/IND2017ER.RData
INFO [2025-12-20 06:34:04] psidR: total memory load in MB: 1
INFO [2025-12-20 06:34:04] psidR: currently working on data for year 1985
INFO [2025-12-20 06:34:04] full 1985 sample has 2000 obs
INFO [2025-12-20 06:34:04] you selected 500 obs belonging to SRC
INFO [2025-12-20 06:34:04] psidR: currently working on data for year 1986
INFO [2025-12-20 06:34:04] full 1986 sample has 2000 obs
INFO [2025-12-20 06:34:04] you selected 500 obs belonging to SRC
Saving _problems/test_buildpanel-104.R
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 6 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_buildpanel.R:30:5'): check balanced sample design ──────────────
Error in ``[.data.table`(data2, , `:=`(present, length(year)), by = pid)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─psidR::build.panel(...) at test_buildpanel.R:30:5
2. ├─data2[, `:=`(present, length(year)), by = pid]
3. └─data.table:::`[.data.table`(...)
── Error ('test_buildpanel.R:70:3'): check subsetting to head and wife sample ──
Error in ``[.data.table`(data2, , `:=`(present, length(year)), by = pid)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─psidR::build.panel(...) at test_buildpanel.R:70:3
2. ├─data2[, `:=`(present, length(year)), by = pid]
3. └─data.table:::`[.data.table`(...)
── Error ('test_buildpanel.R:87:3'): check subsetting to current heads only ────
Error in ``[.data.table`(data2, , `:=`(present, length(year)), by = pid)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─psidR::build.panel(...) at test_buildpanel.R:87:3
2. ├─data2[, `:=`(present, length(year)), by = pid]
3. └─data.table:::`[.data.table`(...)
── Error ('test_buildpanel.R:104:3'): check subsetting to core/immigrant/latino ──
Error in ``[.data.table`(data2, , `:=`(present, length(year)), by = pid)`: attempt access index 10/10 in VECTOR_ELT
Backtrace:
▆
1. └─psidR::build.panel(...) at test_buildpanel.R:104:3
2. ├─data2[, `:=`(present, length(year)), by = pid]
3. └─data.table:::`[.data.table`(...)
[ FAIL 4 | WARN 0 | SKIP 0 | PASS 6 ]
Error:
! Test failures.
Execution halted
- checking PDF version of manual ... [4s/6s] OK
- checking HTML version of manual ... [1s/1s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs