* using log directory ‘/srv/hornik/tmp/CRAN/DeclareDesign.Rcheck’ * using R Under development (unstable) (2023-07-18 r84703) * using platform: x86_64-pc-linux-gnu * R was compiled by Debian clang version 16.0.6 (3) GNU Fortran (Debian 12.3.0-5) 12.3.0 * running under: Debian GNU/Linux trixie/sid * using session charset: UTF-8 * checking for file ‘DeclareDesign/DESCRIPTION’ ... OK * this is package ‘DeclareDesign’ version ‘1.0.4’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... [4s/4s] Note_to_CRAN_maintainers Maintainer: ‘Graeme Blair ’ * 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 ‘DeclareDesign’ can be installed ... [3s/3s] OK * 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 R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [1s/1s] 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 ... [0s/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 ... [10s/10s] OK * checking Rd files ... [0s/0s] 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 ... [17s/17s] ERROR Running examples in ‘DeclareDesign-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: modify_design > ### Title: Modify a design after the fact > ### Aliases: modify_design insert_step delete_step replace_step > > ### ** Examples > > > my_model <- + declare_model( + N = 100, + U = rnorm(N), + Y_Z_0 = U, + Y_Z_1 = U + rnorm(N, mean = 2, sd = 2) + ) > > my_assignment <- declare_assignment(Z = complete_ra(N, m = 50)) > my_assignment_2 <- declare_assignment(Z = complete_ra(N, m = 25)) > > design <- my_model + my_assignment > > draw_data(design) ID U Y_Z_0 Y_Z_1 Z 1 001 -0.626453811 -0.626453811 0.13281283 1 2 002 0.183643324 0.183643324 2.26787507 1 3 003 -0.835628612 -0.835628612 -0.65747191 0 4 004 1.595280802 1.595280802 3.91133835 1 5 005 0.329507772 0.329507772 1.02033848 1 6 006 -0.820468384 -0.820468384 4.71410615 1 7 007 0.487429052 0.487429052 3.92084400 1 8 008 0.738324705 0.738324705 4.55867316 1 9 009 0.575781352 0.575781352 3.34415207 1 10 010 -0.305388387 -0.305388387 5.05896377 0 11 011 1.511781168 1.511781168 2.24030826 0 12 012 0.389843236 0.389843236 1.46655378 1 13 013 -0.621240581 -0.621240581 4.24332390 1 14 014 -2.214699887 -2.214699887 -1.51609259 1 15 015 1.124930918 1.124930918 2.71016943 0 16 016 -0.044933609 -0.044933609 1.16945053 0 17 017 -0.016190263 -0.016190263 1.34382400 1 18 018 0.943836211 0.943836211 2.38560960 0 19 019 0.821221195 0.821221195 3.80959786 1 20 020 0.593901321 0.593901321 2.23924036 0 21 021 0.918977372 0.918977372 1.90706245 0 22 022 0.782136301 0.782136301 5.46821395 0 23 023 0.074564983 0.074564983 1.64540617 1 24 024 -1.989351696 -1.989351696 -0.34846476 0 25 025 0.619825748 0.619825748 2.41944427 1 26 026 -0.056128740 -0.056128740 3.36920387 1 27 027 -0.155795507 -0.155795507 1.69707569 1 28 028 -1.470752384 -1.470752384 0.45397927 0 29 029 -0.478150055 -0.478150055 0.15852899 0 30 030 0.417941560 0.417941560 1.76940102 0 31 031 1.358679552 1.358679552 3.47900043 0 32 032 -0.102787727 -0.102787727 0.71942330 0 33 033 0.387671612 0.387671612 3.45066400 1 34 034 -0.053805041 -0.053805041 -1.09059320 0 35 035 -1.377059557 -1.377059557 1.23605616 1 36 036 -0.414994563 -0.414994563 -1.48789421 1 37 037 -0.394289954 -0.394289954 1.00375779 1 38 038 -0.059313397 -0.059313397 0.88412679 0 39 039 1.100025372 1.100025372 1.79583581 1 40 040 0.763175748 0.763175748 2.64938219 1 41 041 -0.164523596 -0.164523596 -1.99324245 0 42 042 -0.253361680 -0.253361680 4.09980494 1 43 043 0.696963375 0.696963375 -0.63298150 1 44 044 0.556663199 0.556663199 1.62960240 0 45 045 -0.688755695 -0.688755695 -0.92059590 0 46 046 -0.707495157 -0.707495157 -0.20913316 0 47 047 0.364581962 0.364581962 6.53891505 1 48 048 0.768532925 0.768532925 2.80332416 1 49 049 -0.112346212 -0.112346212 -0.68494727 0 50 050 0.881107726 0.881107726 -0.40010334 1 51 051 0.398105880 0.398105880 3.29848008 0 52 052 -0.612026393 -0.612026393 1.35085394 0 53 053 0.341119691 0.341119691 1.70498294 1 54 054 -1.129363096 -1.129363096 -0.98808739 0 55 055 1.433023702 1.433023702 0.45810308 0 56 056 1.980399899 1.980399899 1.83001531 1 57 057 -0.367221476 -0.367221476 3.63283613 0 58 058 -1.044134626 -1.044134626 -0.28666802 1 59 059 0.569719627 0.569719627 -0.19913407 1 60 060 -0.135054604 -0.135054604 5.60352664 0 61 061 2.401617761 2.401617761 5.25181852 1 62 062 -0.039240003 -0.039240003 1.48346580 1 63 063 0.689739362 0.689739362 4.80670546 0 64 064 0.028002159 0.028002159 3.80084746 1 65 065 -0.743273209 -0.743273209 0.01824069 0 66 066 0.188792300 0.188792300 6.60099723 0 67 067 -1.804958629 -1.804958629 -0.31501269 0 68 068 1.465554862 1.465554862 0.61656556 1 69 069 0.153253338 0.153253338 1.86445413 1 70 070 2.172611670 2.172611670 4.58768835 0 71 071 0.475509529 0.475509529 7.09146633 0 72 072 -0.709946431 -0.709946431 1.50165830 0 73 073 0.610726353 0.610726353 3.52472396 1 74 074 -0.934097632 -0.934097632 0.91159650 1 75 075 -1.253633400 -1.253633400 0.07836492 0 76 076 0.291446236 0.291446236 2.22199418 0 77 077 -0.443291873 -0.443291873 3.13198734 0 78 078 0.001105352 0.001105352 6.15159537 1 79 079 0.074341324 0.074341324 4.12912620 1 80 080 -0.589520946 -0.589520946 3.82629585 1 81 081 -0.568668733 -0.568668733 -1.03131558 0 82 082 -0.135178615 -0.135178615 3.83261252 0 83 083 1.178086997 1.178086997 3.61793660 1 84 084 -1.523566800 -1.523566800 -2.45806686 1 85 085 0.593946188 0.593946188 3.63599167 1 86 086 0.332950371 0.332950371 2.01544116 1 87 087 1.063099837 1.063099837 5.99227446 1 88 088 -0.304183924 -0.304183924 0.16365208 0 89 089 0.370018810 0.370018810 1.50959530 0 90 090 0.267098791 0.267098791 0.41487980 0 91 091 -0.542520031 -0.542520031 1.10327205 0 92 092 1.207867806 1.207867806 4.01189136 0 93 093 1.160402616 1.160402616 1.69690627 0 94 094 0.700213650 0.700213650 4.36095999 1 95 095 1.586833455 1.586833455 1.17066788 1 96 096 0.558486426 0.558486426 0.46251760 0 97 097 -1.276592208 -1.276592208 3.60572321 0 98 098 -0.573265414 -0.573265414 -0.60496034 0 99 099 -1.224612615 -1.224612615 1.59933681 0 100 100 -0.473400636 -0.473400636 0.76444726 1 > > design_modified <- replace_step(design, 2, my_assignment_2) > > draw_data(design) ID U Y_Z_0 Y_Z_1 Z 1 001 -1.316245160 -1.316245160 0.35593293 0 2 002 0.919803678 0.919803678 6.44690768 0 3 003 0.398130155 0.398130155 3.92330318 1 4 004 -0.407528579 -0.407528579 3.81533358 0 5 005 1.324258630 1.324258630 1.47784472 0 6 006 -0.701231669 -0.701231669 1.62745201 1 7 007 -0.580614304 -0.580614304 3.72903607 1 8 008 -1.001072181 -1.001072181 0.88588497 1 9 009 -0.668178607 -0.668178607 -2.92689990 0 10 010 0.945184953 0.945184953 3.63487648 0 11 011 0.433702150 0.433702150 -1.37620874 0 12 012 1.005159218 1.005159218 1.38281891 1 13 013 -0.390118664 -0.390118664 4.25788998 0 14 014 0.376370292 0.376370292 3.60764399 0 15 015 0.244164924 0.244164924 4.42750284 1 16 016 -1.426257342 -1.426257342 1.18695238 1 17 017 1.778429287 1.778429287 3.55811176 0 18 018 0.134447661 0.134447661 0.28582211 1 19 019 0.765598999 0.765598999 5.95142651 0 20 020 0.955136677 0.955136677 3.04515787 1 21 021 -0.050565701 -0.050565701 0.51917750 0 22 022 -0.305815420 -0.305815420 3.42463078 1 23 023 0.893673702 0.893673702 5.04255562 0 24 024 -1.047298149 -1.047298149 4.74401140 0 25 025 1.971337386 1.971337386 2.76534278 1 26 026 -0.383632106 -0.383632106 0.83463225 1 27 027 1.654145302 1.654145302 2.82170124 1 28 028 1.512212694 1.512212694 2.76089785 0 29 029 0.082965734 0.082965734 1.34970384 1 30 030 0.567220915 0.567220915 1.97586601 1 31 031 -1.024548480 -1.024548480 3.85909234 1 32 032 0.323006503 0.323006503 0.92792992 0 33 033 1.043612458 1.043612458 2.26727745 1 34 034 0.099078487 0.099078487 3.40415139 0 35 035 -0.454136909 -0.454136909 3.79540798 0 36 036 -0.655781852 -0.655781852 -0.20000346 1 37 037 -0.035922423 -0.035922423 0.94790515 0 38 038 1.069161461 1.069161461 4.11640264 0 39 039 -0.483974930 -0.483974930 3.55153352 0 40 040 -0.121010111 -0.121010111 1.37666071 1 41 041 -1.294140004 -1.294140004 -2.15412690 0 42 042 0.494312836 0.494312836 5.91255490 1 43 043 1.307901520 1.307901520 6.17804066 0 44 044 1.497041009 1.497041009 2.07629872 1 45 045 0.814702731 0.814702731 2.68456758 1 46 046 -1.869788790 -1.869788790 -3.38872626 0 47 047 0.482029504 0.482029504 3.62147545 1 48 048 0.456135603 0.456135603 5.68082920 0 49 049 -0.353400286 -0.353400286 -1.62796158 0 50 050 0.170489471 0.170489471 0.61135244 1 51 051 -0.864035954 -0.864035954 -0.14638982 0 52 052 0.679230774 0.679230774 1.31696799 1 53 053 -0.327101015 -0.327101015 -2.39367221 1 54 054 -1.569082185 -1.569082185 1.43284493 0 55 055 -0.367450756 -0.367450756 -1.43104704 0 56 056 1.364434929 1.364434929 3.31443965 0 57 057 -0.334281365 -0.334281365 2.85168808 1 58 058 0.732750042 0.732750042 2.33635920 1 59 059 0.946585640 0.946585640 4.73060243 0 60 060 0.004398704 0.004398704 1.95296856 1 61 061 -0.352322306 -0.352322306 0.35235679 1 62 062 -0.529695509 -0.529695509 2.76302332 0 63 063 0.739589226 0.739589226 1.87192375 0 64 064 -1.063457415 -1.063457415 4.48176495 0 65 065 0.246210844 0.246210844 2.20969142 0 66 066 -0.289499367 -0.289499367 3.41613062 1 67 067 -2.264889356 -2.264889356 0.14543645 1 68 068 -1.408850456 -1.408850456 -5.42494765 1 69 069 0.916019329 0.916019329 0.18379547 1 70 070 -0.191278951 -0.191278951 0.96051653 0 71 071 0.803283216 0.803283216 3.27689054 1 72 072 1.887474463 1.887474463 -0.79797178 0 73 073 1.473881181 1.473881181 5.39727445 0 74 074 0.677268492 0.677268492 1.46841702 1 75 075 0.379962687 0.379962687 0.87420813 1 76 076 -0.192798426 -0.192798426 -1.30402161 1 77 077 1.577891795 1.577891795 0.67010432 1 78 078 0.596234109 0.596234109 2.70889778 1 79 079 -1.173576941 -1.173576941 1.84516187 1 80 080 -0.155642535 -0.155642535 -2.35140845 1 81 081 -1.918909820 -1.918909820 -1.92763378 0 82 082 -0.195258846 -0.195258846 2.87628460 0 83 083 -2.592327670 -2.592327670 -1.49840184 0 84 084 1.314002167 1.314002167 7.64473917 1 85 085 -0.635543001 -0.635543001 3.85595034 0 86 086 -0.429978839 -0.429978839 2.76101723 0 87 087 -0.169318332 -0.169318332 1.84045057 1 88 088 0.612218174 0.612218174 3.17093974 0 89 089 0.678340177 0.678340177 1.26652793 0 90 090 0.567951972 0.567951972 3.82398628 0 91 091 -0.572542604 -0.572542604 4.38788532 1 92 092 -1.363291256 -1.363291256 2.80356856 1 93 093 -0.388722244 -0.388722244 -0.01521076 1 94 094 0.277914132 0.277914132 -0.95983957 0 95 095 -0.823081122 -0.823081122 0.95760748 1 96 096 -0.068840934 -0.068840934 2.81293781 0 97 097 -1.167662326 -1.167662326 3.53432563 0 98 098 -0.008309014 -0.008309014 -0.64552798 1 99 099 0.128855402 0.128855402 2.85762459 1 100 100 -0.145875628 -0.145875628 2.32112404 0 > > ## Not run: > ##D > ##D design <- > ##D declare_model( > ##D N = 100, > ##D U = rnorm(N), > ##D potential_outcomes(Y ~ 0.20 * Z + U) > ##D ) + > ##D declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) + > ##D declare_assignment(Z = complete_ra(N, m = N/2)) + > ##D declare_measurement(Y = reveal_outcomes(Y ~ Z)) + > ##D declare_estimator(Y ~ Z, inquiry = "ATE") > ##D > ##D insert_step(design, declare_sampling(S = complete_rs(N, n = 50)), > ##D after = 1) > ##D > ##D # If you are using a design created by a designer, for example from > ##D # the DesignLibrary package, you will not have access to the step > ##D # objects. Instead, you can always use the label of the step. > ##D > ##D design <- DesignLibrary::two_arm_designer() > ##D > ##D # get the labels for the steps > ##D names(design) > ##D > ##D insert_step(design, > ##D declare_sampling(S = complete_rs(N, n = 50)), > ##D after = "potential_outcomes") > ##D > ##D > ## End(Not run) > > > delete_step(design, 3) Error in find_step(design, step, "delete") : Could not find step to delete in design Calls: delete_step -> find_step Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [39s/39s] OK Running ‘testthat.R’ [39s/39s] * checking PDF version of manual ... [3s/3s] OK * checking HTML version of manual ... [1s/1s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR