Skip to content

partial = "semi" returns invalid argument type error #355

@rbcavanaugh

Description

@rbcavanaugh

Hi - following the documentation in correlation to calculate semi-partial correlations, but getting this error. Thanks

Doc: partial: Can be TRUE or "semi" for partial and semi-partial correlations, respectively.

library(correlation)
#> Warning: package 'correlation' was built under R version 4.3.3
correlation(iris[,1:4], partial = "semi")
#> Error in !partial: invalid argument type
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16)
#>  os       macOS 15.4.1
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2025-08-13
#>  pandoc   3.2 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  bayestestR    0.16.1  2025-07-01 [1] CRAN (R 4.3.3)
#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.3.1)
#>  correlation * 0.8.8   2025-07-08 [1] CRAN (R 4.3.3)
#>  datawizard    1.2.0   2025-07-17 [1] CRAN (R 4.3.1)
#>  digest        0.6.35  2024-03-11 [1] CRAN (R 4.3.1)
#>  evaluate      1.0.3   2025-01-10 [1] CRAN (R 4.3.3)
#>  fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.3.0)
#>  fs            1.6.3   2023-07-20 [1] CRAN (R 4.3.0)
#>  glue          1.8.0   2024-09-30 [1] CRAN (R 4.3.3)
#>  htmltools     0.5.8.1 2024-04-04 [1] CRAN (R 4.3.1)
#>  insight       1.3.1   2025-06-30 [1] CRAN (R 4.3.3)
#>  knitr         1.50    2025-03-16 [1] CRAN (R 4.3.3)
#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.3.1)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.3.0)
#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.3.0)
#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.3.0)
#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.3.0)
#>  R.oo          1.25.0  2022-06-12 [1] CRAN (R 4.3.0)
#>  R.utils       2.12.2  2022-11-11 [1] CRAN (R 4.3.0)
#>  reprex        2.0.2   2022-08-17 [1] CRAN (R 4.3.0)
#>  rlang         1.1.6   2025-04-11 [1] CRAN (R 4.3.3)
#>  rmarkdown     2.29    2024-11-04 [1] CRAN (R 4.3.3)
#>  rstudioapi    0.16.0  2024-03-24 [1] CRAN (R 4.3.1)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
#>  styler        1.10.2  2023-08-29 [1] CRAN (R 4.3.0)
#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.3.1)
#>  withr         3.0.2   2024-10-28 [1] CRAN (R 4.3.3)
#>  xfun          0.52    2025-04-02 [1] CRAN (R 4.3.3)
#>  yaml          2.3.10  2024-07-26 [1] CRAN (R 4.3.3)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────

Created on 2025-08-13 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions