* using log directory 'd:/Rcompile/CRANpkg/local/4.7/sjlabelled.Rcheck' * using R Under development (unstable) (2026-05-01 r89993 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * current time: 2026-05-03 18:42:33 UTC * checking for file 'sjlabelled/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'sjlabelled' version '1.2.0' * package encoding: UTF-8 * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'sjlabelled' can be installed ... OK * checking installed package size ... OK * checking package directory ... 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 ... [0s] OK * checking whether the package can be loaded with stated dependencies ... [0s] OK * checking whether the package can be unloaded cleanly ... [0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s] OK * checking whether the namespace can be unloaded cleanly ... [1s] OK * checking loading without being on the library search path ... [0s] 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 ... [6s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... 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] OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [1s] ERROR Running examples in 'sjlabelled-Ex.R' failed The error most likely occurred in: > ### Name: as_factor > ### Title: Convert variable into factor and keep value labels > ### Aliases: as_factor to_factor as_factor.data.frame > > ### ** Examples > > if (require("sjmisc") && require("magrittr")) { + data(efc) + # normal factor conversion, loses value attributes + x <- as.factor(efc$e42dep) + frq(x) + + # factor conversion, which keeps value attributes + x <- as_factor(efc$e42dep) + frq(x) + + # create partially labelled vector + x <- set_labels( + efc$e42dep, + labels = c( + `1` = "independent", + `4` = "severe dependency", + `9` = "missing value" + )) + + # only copy existing value labels + as_factor(x) %>% head() + get_labels(as_factor(x), values = "p") + + # also add labels to non-labelled values + as_factor(x, add.non.labelled = TRUE) %>% head() + get_labels(as_factor(x, add.non.labelled = TRUE), values = "p") + + + # easily coerce specific variables in a data frame to factor + # and keep other variables, with their class preserved + as_factor(efc, e42dep, e16sex, c172code) %>% head() + + # use select-helpers from dplyr-package + if (require("dplyr")) { + as_factor(efc, contains("cop"), c161sex:c175empl) %>% head() + } + } Loading required package: sjmisc Loading required package: magrittr Error in as.data.frame.integer(x[[i]], optional = TRUE) : row names contain missing values Calls: frq ... data.frame -> as.data.frame -> as.data.frame.integer Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [2s] OK Running 'testthat.R' [1s] * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [9s] ERROR Error(s) in re-building vignettes: --- re-building 'intro_sjlabelled.Rmd' using rmarkdown Quitting from intro_sjlabelled.Rmd:216-225 [unnamed-chunk-21] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `as.data.frame.integer()`: ! row names contain missing values --- Backtrace: ▆ 1. ├─... %>% frq() 2. └─sjmisc::frq(.) 3. └─sjmisc:::frq_helper(...) 4. └─base::data.frame(table(x, useNA = "always")) 5. ├─base::as.data.frame(x[[i]], optional = TRUE) 6. └─base::as.data.frame.table(x[[i]], optional = TRUE) 7. ├─base::eval(ex) 8. │ └─base::eval(ex) 9. └─base::data.frame(...) 10. ├─base::as.data.frame(x[[i]], optional = TRUE) 11. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'intro_sjlabelled.Rmd' failed with diagnostics: row names contain missing values --- failed re-building 'intro_sjlabelled.Rmd' --- re-building 'labelleddata.Rmd' using rmarkdown --- finished re-building 'labelleddata.Rmd' --- re-building 'quasiquotation.Rmd' using rmarkdown Quitting from quasiquotation.Rmd:31-57 [unnamed-chunk-2] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `as.data.frame.integer()`: ! row names contain missing values --- Backtrace: ▆ 1. └─sjmisc::frq(test, dummy1) 2. └─sjmisc:::frq_helper(...) 3. └─base::data.frame(table(x, useNA = "always")) 4. ├─base::as.data.frame(x[[i]], optional = TRUE) 5. └─base::as.data.frame.table(x[[i]], optional = TRUE) 6. ├─base::eval(ex) 7. │ └─base::eval(ex) 8. └─base::data.frame(...) 9. ├─base::as.data.frame(x[[i]], optional = TRUE) 10. └─base::as.data.frame.integer(x[[i]], optional = TRUE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'quasiquotation.Rmd' failed with diagnostics: row names contain missing values --- failed re-building 'quasiquotation.Rmd' SUMMARY: processing the following files failed: 'intro_sjlabelled.Rmd' 'quasiquotation.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... [20s] OK * checking HTML version of manual ... [8s] OK * DONE Status: 2 ERRORs