gavinsimpson / ggvegan

ggplot-based plots for vegan
https://gavinsimpson.github.io/ggvegan/
GNU General Public License v2.0
113 stars 30 forks source link

Functions not loading #35

Closed darizap closed 1 year ago

darizap commented 1 year ago

Hi, I have a problem that I haven't been able to solve. Loading ggvegan only loads the function valid_layers. When I try to use, for example fortify.cca, I get the message "could not find function "fortify.cca". I have installed (and reinstalled) the package using:

install.packages("remotes") remotes::install_github("gavinsimpson/ggvegan")

and

options(repos = c( gavinsimpson = 'https://gavinsimpson.r-universe.dev', CRAN = 'https://cloud.r-project.org')) install.packages('ggvegan')

I have updated all dependencies, one by one. Oddly enough, in the documentation (help) of the package I can find information for all the functions of the ggvegan package, but I cannot execute them. I reinstalled R, Rstudio and Rtools but nothing works. Any idea of how to fix this? Below you will find my R and Rstudio version.

R platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.2
year 2022
month 10
day 31
svn rev 83211
language R
version.string R version 4.2.2 (2022-10-31 ucrt) nickname Innocent and Trusting

Rstudio RStudio 2023.03.0+386 "Cherry Blossom" Release (3c53477afb13ab959aeb5b34df1f10c237b256c3, 2023-03-09) for Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.03.0+386 Chrome/108.0.5359.179 Electron/22.0.3 Safari/537.36

jarioksa commented 1 year ago

There is no reproducible example. However, did you use fortify.cca(<cca-object>) (which should fail)?

This looks like a duplicate of issues #25 and #32. Briefly:

  1. ggvegan does not export functions, but it provides S3 methods of fortify and autoplot functions for vegan objects (both of these functions are exported from ggplot2).
  2. These method are used as plain names of the exported function. If mod is a cca result, fortify(mod) works, but fortify.cca(mod) should fail with the exact error message you reported.