Running ‘test-add_sim_index_number.R’ [3s/4s]
  Running ‘test-filter_dv.R’ [0s/0s]
  Running ‘test-labeller.R’ [5s/5s]
  Running ‘test-softwaretype.R’ [0s/1s]
  Running ‘test-strat-col-detection.R’ [0s/1s]
  Running ‘test-vpc.R’ [4s/5s]
  Running ‘test-vpc_cat.R’ [2s/2s]
  Running ‘test-vpc_cens.R’ [8s/8s]
  Running ‘test-vpc_tte.R’ [7s/7s]
Running the tests in ‘tests/test-add_sim_index_number.R’ failed.
Complete output:
  > library(dplyr)
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > library(vpc)
  > library(testit)
  > Sys.setenv("R_TESTS" = "")
  > 
  > ## Load the theophylline PK dataset
  > obs <- Theoph
  > colnames(obs) <- c("id", "wt", "dose", "time", "dv")
  > obs <- obs %>%
  +   dplyr::group_by(id) %>%
  +   mutate(sex = round(runif(1))) # randomly assign a "sex" covariate
  > sim <- sim_data(obs, # the design of the dataset
  +                 model = function(x) { # the model
  +                   vpc:::pk_oral_1cmt (t = x$time, dose=x$dose * x$wt, ka = x$ka, ke = x$ke, cl = x$cl * x$wt)
  +                 },
  +                 error = list(additive = 0.1),
  +                 theta = c(2.774, 0.0718, .0361),                 # parameter values
  +                 omega_mat = c(0.08854,                           # specified as lower triangle by default;
  +                               0.02421, 0.02241,                  # note: assumed that every theta has iiv, set to 0 if no iiv.
  +                               0.008069, 0.008639, 0.02862),
  +                 par_names = c("ka", "ke", "cl"),                 # link the parameters in the model to the thetas/omegas
  +                 n = 500)
  Error: Assigned data `model(tmp_pred)` must be compatible with existing data.
  ✖ Existing data has 66000 rows.
  ✖ Assigned data has 132 rows.
  ℹ Only vectors of size 1 are recycled.
  Backtrace:
      █
   1. └─vpc::sim_data(...)
   2.   ├─base::`$<-`(...)
   3.   └─tibble:::`$<-.tbl_df`(...)
   4.     └─tibble:::tbl_subassign(...)
   5.       └─tibble:::vectbl_recycle_rhs(...)
   6.         └─base::tryCatch(...)
   7.           └─base:::tryCatchList(expr, classes, parentenv, handlers)
   8.             └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9.               └─value[[3L]](cond)
  Execution halted