jslefche / piecewiseSEM

Piecewise Structural Equation Modeling in R
152 stars 48 forks source link

plot.psem() not exported from namespace #301

Open shosh-riv opened 4 months ago

shosh-riv commented 4 months ago

I just installed the piecewiseSEM package, and was trying to plot a psem. However, the function piecewiseSEM::plot() or piecewiseSEM::plot.psem() does not seem to exist. I get the following error:

piecewiseSEM::plot.psem() Error: 'plot.psem' is not an exported object from 'namespace:piecewiseSEM'

The help file for plot.psem() is present, but the function itself is not. See picture: image

I am truly at a loss on how this happens or what to do about it. I reinstalled piecewiseSEM and restarted R and RStudio to no effect. A friend of mine also installed the package just now and had the same thing happen (help file present, but the function itself not found). I'm using Windows 11 and my friend is using macOS 14.4.1. Is this an issue with the installation from CRAN?

Here is my sessionInfo(): `R version 4.3.2 (2023-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York tzcode source: internal

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] lavaan_0.6-17 DiagrammeR_1.0.11 piecewiseSEM_2.3.0

loaded via a namespace (and not attached): [1] gtable_0.3.4 xfun_0.41 ggplot2_3.5.0 htmlwidgets_1.6.4 [5] visNetwork_2.1.2 insight_0.19.10 GGally_2.2.1 lattice_0.21-9
[9] quadprog_1.5-8 vctrs_0.6.5 tools_4.3.2 generics_0.1.3
[13] stats4_4.3.2 sandwich_3.1-0 tibble_3.2.1 fansi_1.0.6
[17] pkgconfig_2.0.3 Matrix_1.6-1.1 data.table_1.15.0 MuMIn_1.47.5
[21] RColorBrewer_1.1-3 lifecycle_1.0.4 farver_2.1.1 compiler_4.3.2
[25] stringr_1.5.1 progress_1.2.3 mnormt_2.1.1 munsell_0.5.0
[29] codetools_0.2-19 carData_3.0-5 htmltools_0.5.7 yaml_2.3.8
[33] crayon_1.5.2 pillar_1.9.0 car_3.1-2 nloptr_2.0.3
[37] tidyr_1.3.1 MASS_7.3-60 boot_1.3-28.1 abind_1.4-5
[41] multcomp_1.4-25 nlme_3.1-164 ggstats_0.6.0 tidyselect_1.2.0
[45] digest_0.6.34 performance_0.11.0 mvtnorm_1.2-4 stringi_1.8.3
[49] dplyr_1.1.4 purrr_1.0.2 labeling_0.4.3 splines_4.3.2
[53] fastmap_1.1.1 grid_4.3.2 colorspace_2.1-0 cli_3.6.2
[57] magrittr_2.0.3 survival_3.5-7 utf8_1.2.4 pbivnorm_0.6.0
[61] TH.data_1.1-2 withr_3.0.0 prettyunits_1.2.0 scales_1.3.0
[65] estimability_1.5 rmarkdown_2.25 emmeans_1.10.1 lme4_1.1-35.3
[69] hms_1.1.3 zoo_1.8-12 coda_0.19-4.1 evaluate_0.23
[73] knitr_1.45 mgcv_1.9-0 rlang_1.1.3 Rcpp_1.0.12
[77] xtable_1.8-4 glue_1.7.0 pkgload_1.3.4 rstudioapi_0.15.0 [81] minqa_1.2.6 jsonlite_1.8.8 R6_2.5.1 plyr_1.8.9 `

Shan-square commented 3 months ago

I had the same issue, and resolved it by downloading an older version of R (4.2.0)..

ShuqingL commented 2 months ago

Just use plot() directly. The usage method introduced in help (plot. gsem) is plot().