Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unused arguments #3

Open
chris-gaskell opened this issue Jan 8, 2021 · 2 comments
Open

Error: unused arguments #3

chris-gaskell opened this issue Jan 8, 2021 · 2 comments

Comments

@chris-gaskell
Copy link

Thank you for providing this excellent resource. It is EXACTLY what I have been looking for. I was hoping you could help me with the following. I am not sure if it is a bug with the package or (more likely) I am doing something wrong.

I am having a problem with running the example code. I have installed the package via devtools and run your example code (below) however it returns the error '
Error in JTRCI(data = df, pre = "pre", post = "post", group = "group", :
unused arguments (data = df, pre = "pre", post = "post", group = "group", indextype = "RCI")

Code used:
df <- cbind.data.frame("ppid" = seq(1:64),
"pre" = rnorm(64, 65, 8),
"post" = c(rnorm(32, 40, 8), rnorm(32, 45, 8)),
"group" = rep(c("treatment", "control"), each = 32))

JTRCI(data = df, 
      ppid = "ppid", 
      pre = "pre", 
      post = "post",  
      reliability = .8, 
      indextype = "JT", 
      JTcrit = "auto")

Truly appreciate any help you can provide

@milanwiedemann
Copy link

I just tried your example code and it seems to work fine for me, see repex below.
If you're still having problems running the code, could you send more information about your R session (e.g., version number of R, version number of packages)?

library(JTRCI)

df <- cbind.data.frame("ppid" = seq(1:64),
                       "pre" = rnorm(64, 65, 8),
                       "post" = c(rnorm(32, 40, 8), rnorm(32, 45, 8)),
                       "group" = rep(c("treatment", "control"), each = 32))


JTRCI(data = df, 
      ppid = "ppid", 
      pre = "pre", 
      post = "post",  
      reliability = .8, 
      indextype = "JT", 
      JTcrit = "auto")
#> Assumed that lower scores are better (and reduction == improvement),
#>  if that is incorrect: set higherIsBetter = T
#> NB: using the sample baseline distribution to characterize the dysfunctional population. 
#>     to change: provide norms for dysfunctional population using 'dysfM =' and 'dysfSD ='
#> Jacobson-Truax criterion A: 46.9
#>  this value represents two sd from the baseline  sample mean
#> 1 participants scored below the Jacobson-Truax cut-off score at the pre-measurement 
#>  interpret their Jacobson-Truax classification with caution
#> Loading required package: data.table
#>    Jacobson-Truax classification  N
#> 1:                  deteriorated  0
#> 2:                     unchanged 17
#> 3:                      improved 12
#> 4:        non reliably recovered  4
#> 5:                     recovered 31

Created on 2021-01-21 by the reprex package (v0.3.0)

Session info
devtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.0.2 (2020-06-22)
#>  os       macOS  10.16                
#>  system   x86_64, darwin17.0          
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_GB.UTF-8                 
#>  ctype    en_GB.UTF-8                 
#>  tz       Europe/Tallinn              
#>  date     2021-01-21                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date       lib source                           
#>  assertthat    0.2.1      2019-03-21 [1] CRAN (R 4.0.0)                   
#>  callr         3.5.1      2020-10-13 [1] CRAN (R 4.0.2)                   
#>  cli           2.2.0      2020-11-20 [1] CRAN (R 4.0.2)                   
#>  colorspace    2.0-0      2020-11-11 [1] CRAN (R 4.0.2)                   
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 4.0.0)                   
#>  curl          4.3        2019-12-02 [1] CRAN (R 4.0.0)                   
#>  data.table  * 1.13.4     2020-12-08 [1] CRAN (R 4.0.2)                   
#>  desc          1.2.0      2018-05-01 [1] CRAN (R 4.0.0)                   
#>  devtools      2.3.2      2020-09-18 [1] CRAN (R 4.0.2)                   
#>  digest        0.6.27     2020-10-24 [1] CRAN (R 4.0.2)                   
#>  dplyr         1.0.2      2020-08-18 [1] CRAN (R 4.0.2)                   
#>  ellipsis      0.3.1      2020-05-15 [1] CRAN (R 4.0.0)                   
#>  evaluate      0.14       2019-05-28 [1] CRAN (R 4.0.0)                   
#>  fansi         0.4.1      2020-01-08 [1] CRAN (R 4.0.0)                   
#>  farver        2.0.3      2020-01-16 [1] CRAN (R 4.0.0)                   
#>  fs            1.5.0      2020-07-31 [1] CRAN (R 4.0.2)                   
#>  generics      0.1.0      2020-10-31 [1] CRAN (R 4.0.2)                   
#>  ggplot2     * 3.3.2      2020-06-19 [1] CRAN (R 4.0.0)                   
#>  glue          1.4.2      2020-08-27 [1] CRAN (R 4.0.2)                   
#>  gtable        0.3.0      2019-03-25 [1] CRAN (R 4.0.0)                   
#>  highr         0.8        2019-03-20 [1] CRAN (R 4.0.0)                   
#>  htmltools     0.5.0      2020-06-16 [1] CRAN (R 4.0.0)                   
#>  httr          1.4.2      2020-07-20 [1] CRAN (R 4.0.2)                   
#>  JTRCI       * 0.1.0      2020-06-29 [1] local                            
#>  knitr         1.30       2020-09-22 [1] CRAN (R 4.0.2)                   
#>  labeling      0.4.2      2020-10-20 [1] CRAN (R 4.0.2)                   
#>  lifecycle     0.2.0      2020-03-06 [1] CRAN (R 4.0.0)                   
#>  magrittr      2.0.1      2020-11-17 [1] CRAN (R 4.0.2)                   
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 4.0.0)                   
#>  mime          0.9        2020-02-04 [1] CRAN (R 4.0.0)                   
#>  munsell       0.5.0      2018-06-12 [1] CRAN (R 4.0.0)                   
#>  pillar        1.4.7      2020-11-20 [1] CRAN (R 4.0.2)                   
#>  pkgbuild      1.2.0      2020-12-15 [1] CRAN (R 4.0.2)                   
#>  pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 4.0.0)                   
#>  pkgload       1.1.0      2020-05-29 [1] CRAN (R 4.0.0)                   
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.0.0)                   
#>  processx      3.4.5      2020-11-30 [1] CRAN (R 4.0.2)                   
#>  ps            1.5.0      2020-12-05 [1] CRAN (R 4.0.2)                   
#>  purrr         0.3.4      2020-04-17 [1] CRAN (R 4.0.0)                   
#>  R6            2.5.0      2020-10-28 [1] CRAN (R 4.0.2)                   
#>  remotes       2.2.0      2020-07-21 [1] CRAN (R 4.0.2)                   
#>  rlang         0.4.9      2020-11-26 [1] CRAN (R 4.0.2)                   
#>  rmarkdown     2.6        2020-12-14 [1] CRAN (R 4.0.2)                   
#>  rprojroot     2.0.2      2020-11-15 [1] CRAN (R 4.0.2)                   
#>  scales        1.1.1      2020-05-11 [1] CRAN (R 4.0.0)                   
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 4.0.0)                   
#>  stringi       1.5.3      2020-09-09 [1] CRAN (R 4.0.2)                   
#>  stringr       1.4.0      2019-02-10 [1] CRAN (R 4.0.0)                   
#>  testthat      3.0.1      2020-12-17 [1] CRAN (R 4.0.2)                   
#>  tibble        3.0.4.9000 2020-11-19 [1] Github (tidyverse/tibble@9eeef4d)
#>  tidyselect    1.1.0      2020-05-11 [1] CRAN (R 4.0.0)                   
#>  usethis       2.0.0      2020-12-10 [1] CRAN (R 4.0.2)                   
#>  vctrs         0.3.6      2020-12-17 [1] CRAN (R 4.0.2)                   
#>  withr         2.3.0      2020-09-22 [1] CRAN (R 4.0.2)                   
#>  xfun          0.19       2020-10-30 [1] CRAN (R 4.0.2)                   
#>  xml2          1.3.2      2020-04-23 [1] CRAN (R 4.0.0)                   
#>  yaml          2.2.1      2020-02-01 [1] CRAN (R 4.0.0)                   
#> 
#> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library

@chris-gaskell
Copy link
Author

chris-gaskell commented Jan 21, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants