Hey everyone,
I submitted my package to CRAN (this is not the first submission for this package) and it did not pass the CRAN check. This is the error they get and I have no idea how to fix it:
* checking tests ... ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(prepdat)
>
> test_check("prepdat")
Error: On CRAN
testthat results ================================================================
OK: 0 SKIPPED: 0 FAILED: 0
Execution halted
and this is how my test file looks (note that I used skip_on_cran; and here is a link to the test file on GitHub )
skip_on_cran()
library(prepdat)
data("finalized_stroopdata")
data("stroopdata")
context("Finalized table")
test_finalized_stroopdata <- prep(
dataset = stroopdata
, file_name = NULL
, file_path = NULL
, id = "subject"
, within_vars = c("block", "target_type")
, between_vars = c("order")
, dvc = "rt"
, dvd = "ac"
, keep_trials = NULL
, drop_vars = c()
, keep_trials_dvc = "raw_data$rt > 100 & raw_data$rt < 3000 & raw_data$ac == 1"
, keep_trials_dvd = "raw_data$rt > 100 & raw_data$rt < 3000"
, id_properties = c()
, sd_criterion = c(1, 1.5, 2)
, percentiles = c(0.05, 0.25, 0.75, 0.95)
, outlier_removal = 2
, keep_trials_outlier = "raw_data$ac == 1"
, decimal_places = 0
, notification = TRUE
, dm = c()
, save_results = FALSE
, results_name = "results.txt"
, results_path = NULL
, save_summary = FALSE
)
test_that("Finialized table is correct", {
expect_equal(test_finalized_stroopdata, finalized_stroopdata)
})
How can I fix this?
When I run devtools::check(document = FALSE) it goes without any errors, warnings, or notes.
Also, when I run devtools::test() (see below) the test goes without problems. I have no idea what can be the problem except that maybe for some reason the skip_on_cran() does not work.
Any help will be very much appreciated (also posted this question on Stackoverflow Stackoverflow),
Thank you,
Ayala
> test()
Loading prepdat
Testing prepdat
Finalized table:
raw_data has 5400 observations and 10 variables
subject block age gender order font_size trial_num target_type rt ac
1 5020 1 24 2 1 12 1 1 677 1
2 5020 1 24 2 1 12 2 1 538 1
3 5020 1 24 2 1 12 3 1 507 1
4 5020 1 24 2 1 12 4 1 2818 1
5 5020 1 24 2 1 12 5 1 582 1
6 5020 1 24 2 1 12 6 1 498 1
Found 1 between-subjects independent variable: order
Calculating between-subjects independent variables
Giving names for between-subjects variables
Finished between-subjects independent variables
Found 2 within-subject independent variables
within_condition column was added to raw_data
subject block age gender order font_size trial_num target_type rt ac
1 5020 1 24 2 1 12 1 1 677 1
2 5020 1 24 2 1 12 2 1 538 1
3 5020 1 24 2 1 12 3 1 507 1
4 5020 1 24 2 1 12 4 1 2818 1
5 5020 1 24 2 1 12 5 1 582 1
6 5020 1 24 2 1 12 6 1 498 1
within_condition
1 1_1
2 1_1
3 1_1
4 1_1
5 1_1
6 1_1
Finished within_condition column
Found dvc data
Creating data frame named raw_data_dvc for dvc data
Keeping trials according to keep_trials_dvc and deleting unnecessary trials in raw_data_dvc
All further calculations on dvc except outlier removal procedures will be done on the remaining trials
raw_data_dvc has 5260 observations and 11 variables
subject block age gender order font_size trial_num target_type rt ac
1 5020 1 24 2 1 12 1 1 677 1
2 5020 1 24 2 1 12 2 1 538 1
3 5020 1 24 2 1 12 3 1 507 1
4 5020 1 24 2 1 12 4 1 2818 1
5 5020 1 24 2 1 12 5 1 582 1
6 5020 1 24 2 1 12 6 1 498 1
within_condition
1 1_1
2 1_1
3 1_1
4 1_1
5 1_1
6 1_1
Found dvd data
Creating data frame named raw_data_dvd for dvd data
Keeping trials according to keep_trials_dvd and deleting unnecessary trials in raw_data_dvd
All further calculations on dvd will be done on the remaining trials
raw_data_dvd has 5356 observations and 11 variables
subject block age gender order font_size trial_num target_type rt ac
1 5020 1 24 2 1 12 1 1 677 1
2 5020 1 24 2 1 12 2 1 538 1
3 5020 1 24 2 1 12 3 1 507 1
4 5020 1 24 2 1 12 4 1 2818 1
5 5020 1 24 2 1 12 5 1 582 1
6 5020 1 24 2 1 12 6 1 498 1
within_condition
1 1_1
2 1_1
3 1_1
4 1_1
5 1_1
6 1_1
Your design is a mixed design (i.e., includes both between-subjects and within-subjects independent variables
Calculating mean dvc by id by within_condition
Calculating SD for dvc by id by within_condition using denominator n
Calculating median dvc by id by within_condition
Calculating mean dvc by id by within_condition after rejecting values above 1 SD
Calculating mean dvc by id by within_condition after rejecting values above 1.5 SD
Calculating mean dvc by id by within_condition after rejecting values above 2 SD
Counting number of rejected values for 1 SD
Counting number of rejected values for 1.5 SD
Counting number of rejected values for 2 SD
Counting number of values for dvc by id by within_condition before rejecting values according to sd_criterion
Calculating proportion of rejected values for dvc by id by within_condition for 1 SD
Calculating proportion of rejected values for dvc by id by within_condition for 1.5 SD
Calculating proportion of rejected values for dvc by id by within_condition for 2 SD
Calculating harmonic mean for dvc by id by condition
Calculating the 0.05 percentail for dvc by id by within_condition
Calculating the 0.25 percentail for dvc by id by within_condition
Calculating the 0.75 percentail for dvc by id by within_condition
Calculating the 0.95 percentail for dvc by id by within_condition
Keeping trials according to keep_trials_outlier and deleting unnecessary trials in raw_data
Outlier removal procedure will be calculated on the remaining trials
Calculating mean dvc by id by within_condition according to selected outlier removal procedure
Finished calculating means for dvc by id by within_condition according to modified-recursive procedure with moving criterion
Finished calculating dependent measures for dvc
Calculating mean dvd by id by within_condition
Calculating mean error by id by within_condition
Finished calculating dvd data
Creating results
Printing head results
subject order mdvc1 mdvc2 mdvc3 mdvc4 sdvc1 sdvc2 sdvc3 sdvc4
5013 5013 2 863 1038 1081 1103 328 214 417 321
5020 5020 1 707 781 637 713 410 362 305 328
5021 5021 2 655 742 559 653 162 170 121 144
5022 5022 1 604 725 580 650 108 153 128 135
5023 5023 2 747 827 909 963 265 200 347 243
5024 5024 1 616 793 667 764 125 157 182 180
meddvc1 meddvc2 meddvc3 meddvc4 t1dvc1 t1dvc2 t1dvc3 t1dvc4 t1.5dvc1
5013 758 1036 1014 1037 777 1047 1033 1065 790
5020 586 701 540 630 595 699 566 628 595
5021 633 780 540 630 632 760 536 625 630
5022 594 682 565 635 589 692 573 639 599
5023 726 834 821 900 724 825 858 923 718
5024 600 781 629 719 591 776 619 735 585
t1.5dvc2 t1.5dvc3 t1.5dvc4 t2dvc1 t2dvc2 t2dvc3 t2dvc4 n1tr1 n1tr2
5013 1013 1037 1054 809 1006 1001 1067 26 9
5020 699 566 626 595 699 566 632 11 2
5021 748 558 620 636 732 564 630 40 12
5022 698 569 627 602 725 563 638 25 11
5023 851 843 914 709 827 864 933 19 11
5024 756 619 745 591 756 635 751 30 9
n1tr3 n1tr4 n1.5tr1 n1.5tr2 n1.5tr3 n1.5tr4 n2tr1 n2tr2 n2tr3 n2tr4
5013 6 29 13 5 4 13 7 2 2 8
5020 2 12 11 2 2 11 11 2 2 10
5021 7 34 18 5 3 12 8 1 2 7
5022 5 44 12 7 2 17 6 0 1 7
5023 6 31 8 6 2 17 5 2 1 8
5024 5 21 15 3 5 7 10 3 2 4
ndvc1 ndvc2 ndvc3 ndvc4 p1tr1 p1tr2 p1tr3 p1tr4 p1.5tr1 p1.5tr2
5013 144 36 36 143 0.181 0.250 0.167 0.203 0.090 0.139
5020 143 35 36 142 0.077 0.057 0.056 0.085 0.077 0.057
5021 143 34 36 140 0.280 0.353 0.194 0.243 0.126 0.147
5022 143 34 36 144 0.175 0.324 0.139 0.306 0.084 0.206
5023 143 34 35 142 0.133 0.324 0.171 0.218 0.056 0.176
5024 144 35 36 143 0.208 0.257 0.139 0.147 0.104 0.086
p1.5tr3 p1.5tr4 p2tr1 p2tr2 p2tr3 p2tr4 rminv1 rminv2 rminv3 rminv4
5013 0.111 0.091 0.049 0.056 0.056 0.056 777 997 951 1019
5020 0.056 0.077 0.077 0.057 0.056 0.070 612 710 575 648
5021 0.083 0.086 0.056 0.029 0.056 0.050 617 701 501 626
5022 0.056 0.118 0.042 0.000 0.028 0.049 586 694 559 623
5023 0.057 0.120 0.035 0.059 0.029 0.056 685 773 823 908
5024 0.139 0.049 0.069 0.086 0.056 0.028 596 767 630 732
p0.05dvc1 p0.05dvc2 p0.05dvc3 p0.05dvc4 p0.25dvc1 p0.25dvc2
5013 539 744 575 704 666 890
5020 474 532 454 506 515 639
5021 447 485 457 484 552 595
5022 498 507 437 461 548 608
5023 433 482 549 668 641 722
5024 484 595 496 585 536 704
p0.25dvc3 p0.25dvc4 p0.75dvc1 p0.75dvc2 p0.75dvc3 p0.75dvc4
5013 858 910 958 1150 1182 1245
5020 508 575 684 764 625 702
5021 502 550 735 866 607 699
5022 528 564 650 834 610 734
5023 706 794 820 953 1027 1096
5024 556 658 660 832 696 838
p0.95dvc1 p0.95dvc2 p0.95dvc3 p0.95dvc4 mdvd1 mdvd2 mdvd3 mdvd4
5013 1463 1440 1780 1649 1.000 1.000 1 0.993
5020 1857 1198 1035 1568 1.000 0.972 1 0.986
5021 959 990 744 941 1.000 0.944 1 0.972
5022 745 971 707 888 0.993 0.944 1 1.000
5023 1035 1140 1405 1439 1.000 0.944 1 0.986
5024 887 1120 1063 1027 1.000 0.972 1 1.000
merr1 merr2 merr3 merr4 mrmc1 mrmc2 mrmc3 mrmc4 pmrmc1 pmrmc2 pmrmc3
5013 0.000 0.000 0 0.007 809 1038 1001 1058 4.861 0.000 5.556
5020 0.000 0.028 0 0.014 589 699 566 626 9.722 5.714 5.556
5021 0.000 0.056 0 0.028 655 742 572 642 0.000 0.000 2.778
5022 0.007 0.056 0 0.000 604 725 563 650 2.098 0.000 2.778
5023 0.000 0.056 0 0.014 709 827 843 955 4.167 0.000 8.333
5024 0.000 0.028 0 0.000 609 777 611 751 1.389 2.857 11.111
pmrmc4 nmrmc1 nmrmc2 nmrmc3 nmrmc4 tmrmc1 tmrmc2 tmrmc3 tmrmc4
5013 4.196 7 0 2 6 144 36 36 143
5020 7.746 14 2 2 11 144 35 36 142
5021 2.143 0 0 1 3 143 34 36 140
5022 0.000 3 0 1 0 143 34 36 144
5023 0.704 6 0 3 1 144 34 36 142
5024 2.083 2 1 4 3 144 35 36 144
prep() returned a data frame to console
Hip Hip Hooray! prep() finished
Have a great day and may all your results be significant!
.
DONE =====================================================================
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
> library(testthat) > library(prepdat) > > test_check("prepdat") Error: On CRAN testthat results ================================================================ OK: 0 SKIPPED: 0 FAILED: 0 Execution halted
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
* using log directory 'd:/RCompile/CRANguest/R-release/prepdat.Rcheck' * using R version 3.3.1 (2016-06-21) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'prepdat/DESCRIPTION' ... OK * this is package 'prepdat' version '1.0.8' * checking CRAN incoming feasibility ... NOTE Maintainer: 'Ayala S. Allon <ayala...@gmail.com>' Possibly mis-spelled words in DESCRIPTION: ANOVA (10:4) Jolicoeur (30:52) Selst (30:44) dataset (19:68, 20:45) txt (33:50) * 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 'prepdat' can be installed ... OK * checking installed package size ... OK * checking package 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 * loading checks for arch 'i386' ** 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 * loading checks for arch 'x64' ** 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 ... 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 ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking examples ... ** running examples for arch 'i386' ... [1s] OK ** running examples for arch 'x64' ... [1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... ** running tests for arch 'i386' ... [1s] OK Running 'testthat.R' [1s] ** running tests for arch 'x64' ... [1s] OK Running 'testthat.R' [1s] * checking PDF version of manual ... OK * DONE Status: 1 NOTE
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ayala Allon, PhD CandidateThe Visual Working Memory LabSchool of Psychological SciencesTel-Aviv University
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Israel R User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/israel-r-user-group/dPwcExMbo6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.