* using log directory 'd:/RCompile/CRANincoming/R-devel/mhqol.Rcheck' * using R Under development (unstable) (2025-02-20 r87772 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'mhqol/DESCRIPTION' ... OK * this is package 'mhqol' version '0.2.0' * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: 'Stijn Peeters ' New submission License components with restrictions and base license permitting such: MIT + file LICENSE Found the following \keyword or \concept entries which likely give several index terms: File 'mhqol.Rd': \keyword{MHQoL,} \keyword{Utility,} File 'mhqol_LSS.Rd': \keyword{LSS,} \keyword{MHQoL,} File 'mhqol_scores_to_states.Rd': \keyword{MHQoL,} \keyword{States,} File 'mhqol_states_to_scores.Rd': \keyword{MHQoL,} \keyword{Scores,} File 'mhqol_utilities.Rd': \keyword{MHQoL,} \keyword{Utilities,} File 'mhqol_utilities_to_scores.Rd': \keyword{MHQoL,} \keyword{States,} File 'mhqol_utilities_to_states.Rd': \keyword{MHQoL,} \keyword{States,} File 'mhqol_valueset.Rd': \keyword{MHQoL,} \keyword{Valueset,} * 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 'mhqol' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... NOTE Malformed Description field: should contain one or more complete sentences. Invalid license file pointers: LICENSE Package listed in more than one of Depends, Imports, Suggests, Enhances: 'writexl' A package should be listed in only one of these fields. Missing dependency on R >= 4.1.0 because package code uses the pipe |> or function shorthand \(...) syntax added in R 4.1.0. File(s) using such syntax: 'mhqol.R' 'mhqol_LSS.R' 'mhqol_scores_to_states.R' 'mhqol_states_to_scores.R' 'mhqol_utilities.R' 'mhqol_utilities_to_scores.R' 'mhqol_utilities_to_states.R' 'mhqol_valueset.R' * checking top-level files ... NOTE Non-standard file/directory found at top level: 'data-raw' * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... WARNING Found the following file with non-ASCII characters: R/mhqol_LSS.R Portable packages must use only ASCII characters in their R code and NAMESPACE directives, except perhaps in comments. Use \uxxxx escapes for other characters. Function 'tools::showNonASCIIfile' can help in finding non-ASCII characters in files. * 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 ... NOTE mhqol_LSS: no visible global function definition for '%>%' mhqol_LSS: no visible global function definition for 'where' mhqol_scores_to_states: no visible binding for global variable 'SI' mhqol_scores_to_states: no visible binding for global variable 'IN' mhqol_scores_to_states: no visible binding for global variable 'MO' mhqol_scores_to_states: no visible binding for global variable 'RE' mhqol_scores_to_states: no visible binding for global variable 'DA' mhqol_scores_to_states: no visible binding for global variable 'PH' mhqol_scores_to_states: no visible binding for global variable 'FU' mhqol_utilities: no visible binding for global variable 'SI' mhqol_utilities: no visible binding for global variable 'IN' mhqol_utilities: no visible binding for global variable 'MO' mhqol_utilities: no visible binding for global variable 'RE' mhqol_utilities: no visible binding for global variable 'DA' mhqol_utilities: no visible binding for global variable 'PH' mhqol_utilities: no visible binding for global variable 'FU' mhqol_utilities_to_scores: no visible global function definition for 'flush.console' mhqol_utilities_to_states: no visible global function definition for 'flush.console' mhqol_valueset: no visible binding for global variable 'dimensions' Undefined global functions or variables: %>% DA FU IN MO PH RE SI dimensions flush.console where Consider adding importFrom("utils", "flush.console") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... NOTE Rd file 'mhqol.Rd': \examples lines wider than 100 characters: # Get the utility based on a numeric vector and calculate the total utility, not all dimensions and values are present mhqol(dimensions = c(IN = 2, MO = 3, RE = 2, DA = NA, PH = 2, FU = 3), metric = "total", ignore_invalid = TRUE, ignore_NA = TRUE) mhqol(dimensions = data.frame(SI = 1, IN = 2, MO = 3, RE = 2, DA = 1, PH = 2, FU = 3), metric = "average") Rd file 'mhqol_LSS.Rd': \examples lines wider than 100 characters: # Get the LSS based on a character vector and calculate the total LSS, not all dimensions are present mhqol_LSS(dimensions = c(IN = 2, MO = 3, RE = 2, DA = 1, PH = 2, FU = 3), metric = "total", ignore_invalid = TRUE) mhqol_LSS(dimensions = data.frame(SI = 1, IN = 2, MO = 3, RE = 2, DA = 1, PH = 2, FU = 3), metric = "average") Rd file 'mhqol_utilities.Rd': \examples lines wider than 100 characters: mhqol_utilities(dimensions = c(IN = 2, MO = 1, RE = 0, DA = 3, PH = 2, FU = 1), ignore_invalid = TRUE) Rd file 'mhqol_utilities_to_scores.Rd': \examples lines wider than 100 characters: mhqol_utilities_to_scores(utilities = c(IN = -0.018, DA = -0.021, PH = -0.064, FU = -0.106), ignore_invalid = TRUE) mhqol_utilities_to_scores(utilities = data.frame(SI = -0.137, IN = -0.184, MO = -0.063, RE = -0.172, DA = -0.021, PH = -0.243, FU = -0. ... [TRUNCATED] Rd file 'mhqol_utilities_to_states.Rd': \examples lines wider than 100 characters: mhqol_utilities_to_states(utilities = c(IN = -0.018, DA = -0.021, PH = -0.064, FU = -0.106), ignore_invalid = TRUE) mhqol_utilities_to_states(utilities = data.frame(SI = -0.137, IN = -0.184, MO = -0.063, RE = -0.172, DA = -0.021, PH = -0.243, FU = -0. ... [TRUNCATED] These lines will be truncated in the PDF manual. * checking Rd cross-references ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: 'df_utilities_countries' Undocumented data sets: 'df_utilities_countries' All user-level objects in a package should have documentation entries. See chapter 'Writing R documentation files' in the 'Writing R Extensions' manual. * checking for code/documentation mismatches ... WARNING Functions or methods with usage in Rd file 'hello.Rd' but not in code: 'hello' * checking Rd \usage sections ... WARNING Undocumented arguments in Rd file 'mhqol.Rd' 'country' Functions with \usage entries need to have the appropriate \alias entries, and all their arguments documented. The \usage entries must correspond to syntactically valid R code. See chapter 'Writing R documentation files' in the 'Writing R Extensions' manual. * checking Rd contents ... OK * checking for unstated dependencies in examples ... ERROR Warning: parse error in file 'lines': 76: unexpected ')' 113: PH = "I have no physical health problems", 114: FU = "I am very optimistic about my future"), retain_old_variables = FALSE)) ^ ** will not attempt to run examples * checking contents of 'data' directory ... WARNING Files not of a type allowed in a 'data' directory: 'df_utilities_countries.RDS' Please use e.g. 'inst/extdata' for non-R data files * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... SKIPPED * checking for unstated dependencies in 'tests' ... OK * checking tests ... ERROR Running 'testthat.R' Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(mhqol) > > test_check("mhqol") [ FAIL 5 | WARN 14 | SKIP 0 | PASS 92 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-mhqol_LSS.R:19:3'): Test whether the function returns an error when there is a score above 3 in the data ── `mhqol_scores_to_states(...)` did not throw the expected error. ── Failure ('test-mhqol_scores_to_states.R:134:3'): Test whether the function returns an error when there is a score below zero in the data ── `mhqol_scores_to_states(...)` did not throw the expected error. ── Failure ('test-mhqol_scores_to_states.R:146:3'): Test whether the function returns an error when there is a score above 3 in the data ── `mhqol_scores_to_states(...)` did not throw the expected error. ── Error ('test-mhqol_states_to_scores.R:108:3'): Test whether when retain_old_variables = TRUE, the function also returns the original variables in the data ── Error in `validate_states(states, valid_states)`: Error: Column PH contains unexpected values: I have physical health problems Backtrace: ▆ 1. └─mhqol::mhqol_states_to_scores(...) at test-mhqol_states_to_scores.R:108:3 2. └─mhqol (local) validate_states(states, valid_states) ── Error ('test-mhqol_states_to_scores.R:138:3'): Test whether when retain_old_variables = FALSE, the function does not return the original variables in the data ── Error in `validate_states(states, valid_states)`: Error: Column PH contains unexpected values: I have physical health problems Backtrace: ▆ 1. └─mhqol::mhqol_states_to_scores(...) at test-mhqol_states_to_scores.R:138:3 2. └─mhqol (local) validate_states(states, valid_states) [ FAIL 5 | WARN 14 | SKIP 0 | PASS 92 ] Error: Test failures Execution halted * checking PDF version of manual ... [13s] OK * checking HTML version of manual ... OK * DONE Status: 2 ERRORs, 5 WARNINGs, 5 NOTEs