- using R Under development (unstable) (2023-12-01 r85656)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
clang version 17.0.5
flang-new version 17.0.5
- running under: Fedora Linux 36 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘admiral/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘admiral’ version ‘0.12.3’
- 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 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 ‘admiral’ can be installed ... [25s/32s] OK
See the install log for details.
- 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 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 ... [33s/42s] OK
- checking Rd files ... 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 contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... NOTE
Note: found 12 marked UTF-8 strings
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... ERROR
Running examples in ‘admiral-Ex.R’ failed
The error most likely occurred in:
> ### Name: create_query_data
> ### Title: Creates a queries dataset as input dataset to the
> ### 'dataset_queries' argument in 'derive_vars_query()'
> ### Aliases: create_query_data
> ### Keywords: create_aux
>
> ### ** Examples
>
> library(tibble)
> library(dplyr, warn.conflicts = FALSE)
> library(pharmaversesdtm)
> library(admiral)
>
> # creating a query dataset for a customized query
> cqterms <- tribble(
+ ~TERMNAME, ~TERMID,
+ "APPLICATION SITE ERYTHEMA", 10003041L,
+ "APPLICATION SITE PRURITUS", 10003053L
+ ) %>%
+ mutate(SRCVAR = "AEDECOD")
>
> cq <- query(
+ prefix = "CQ01",
+ name = "Application Site Issues",
+ definition = cqterms
+ )
>
> create_query_data(queries = list(cq))
# A tibble: 2 × 5
TERMNAME TERMID SRCVAR PREFIX GRPNAME
<chr> <int> <chr> <chr> <chr>
1 APPLICATION SITE ERYTHEMA 10003041 AEDECOD CQ01 Application Site Issues
2 APPLICATION SITE PRURITUS 10003053 AEDECOD CQ01 Application Site Issues
>
> # create a query dataset for SMQs
> pregsmq <- query(
+ prefix = "SMQ02",
+ id = auto,
+ definition = basket_select(
+ name = "Pregnancy and neonatal topics (SMQ)",
+ scope = "NARROW",
+ type = "smq"
+ )
+ )
>
> bilismq <- query(
+ prefix = "SMQ04",
+ definition = basket_select(
+ id = 20000121L,
+ scope = "BROAD",
+ type = "smq"
+ )
+ )
>
> # The get_terms function from pharmaversesdtm is used for this example.
> # In a real application a company-specific function must be used.
> create_query_data(
+ queries = list(pregsmq, bilismq),
+ get_terms_fun = pharmaversesdtm:::get_terms,
+ version = "20.1"
+ )
Error in `assert_terms()`:
! Variable `TERMNAME` or `TERMID` is required.
None of them is in object returned by calling get_terms_fun(basket_select = basket_select(name = "Pregnancy and neonatal topics (SMQ)", id = NULL, scope = "NARROW", type = "smq"), version = "20.1", keep_id = TRUE).
Provided variables: `TERMCHAR`, `SRCVAR`, `GRPNAME` and `GRPID`
Backtrace:
▆
1. └─admiral::create_query_data(...)
2. └─admiral:::get_terms_from_db(...)
3. └─admiral::assert_terms(...)
4. └─rlang::abort(...)
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [124s/148s] OK
Running ‘testthat.R’ [123s/147s]
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes in ‘inst/doc’ ... OK
- checking re-building of vignette outputs ... [136s/179s] OK
- checking PDF version of manual ... [27s/38s] OK
- checking HTML version of manual ... [19s/31s] OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 1 ERROR, 1 NOTE