fishR-Core-Team / FSA

FSA (Fisheries Stock Assessment) package provides R functions to conduct typical introductory fisheries analyses.
https://fishr-core-team.github.io/FSA/
GNU General Public License v2.0
65 stars 20 forks source link

Error in loadNamespace(name) : there is no package called ‘dunn.test’ #29

Closed Epigouveia closed 7 years ago

Epigouveia commented 7 years ago

Hello FSA makers,

I just installed FSA to run a dunnTest on my data after a Kruskal analysis. When I run the function dunnTest I get a message saying Error in loadNamespace(name) : there is no package called 'dunn.test'

Can you help or guide me on how I can solve this?

Here is what i have installed:

install.packages("FSA")
if (!require('devtools')) install.packages('devtools'); require('devtools')
devtools::install_github('droglenc/FSA')

Here I try to run the test: DunnT_d10 <- dunnTest(mtdt_d10$richness ~ mtdt_d10$Treatment, method = "bh"

Where mtdt_d10 is my df with richness as a column. the column Treatment is the type of grouping I want. Below my data

> mtdt_d10
             Treatment   CDW Chlorophyll   EPS Day richness  shannon   Invsimp  evenness
Day10F1      Untreated 2.700      34.714 0.571  10       31 3.160187 18.441811 0.9202675
Day10F2      Untreated 3.300      37.773 0.591  10       31 3.157187 18.468610 0.9193939
Day10F3      Untreated 3.133      40.540 0.597  10       24 2.852886 13.433176 0.8976834
Day10F4          Metro 1.333       4.670 0.166  10       34 3.253389 20.226557 0.9225910
Day10F5          Metro 1.333       4.670 0.171  10       35 3.245158 19.383861 0.9127539
Day10F6          Metro 1.367       4.934 0.179  10       34 3.226011 19.162289 0.9148274
Day10F7            Pen 3.300      52.546 0.482  10       26 2.919732 14.283367 0.8961466
Day10F8            Pen 3.533      49.280 0.464  10       25 2.893219 13.953305 0.8988290
Day10F9            Pen 3.367      54.492 0.488  10       20 2.585349 10.411644 0.8630107
Day10F10           Rif 1.333      14.394 0.197  10       25 2.950655 15.477977 0.9166726
Day10F11           Rif 1.400      15.214 0.207  10       21 2.813376 13.619792 0.9240778
Day10F12           Rif 1.333      14.672 0.220  10       25 2.951721 15.177262 0.9170038
Day10F13           Gen 0.400       0.820 0.074  10       27 2.981389 14.483322 0.9045925
Day10F14           Gen 0.600       0.820 0.073  10       26 2.995672 15.338943 0.9194546
Day10F16        Chlora 0.533       0.820 0.073  10       29 3.132111 18.800758 0.9301561
Day10F17        Chlora 0.733       1.098 0.093  10       30 3.119546 17.148702 0.9171904
Day10F20           Lin 1.367       0.820 0.069  10       29 3.130148 18.116496 0.9295731
Day10F22     Metro+Pen 1.433       8.242 0.229  10       26 2.900594 13.909013 0.8902725
Day10F23     Metro+Pen 1.633       6.881 0.213  10       23 2.730518 11.564800 0.8708413
Day10F24     Metro+Pen 1.433       4.934 0.204  10       23 2.748981 11.742467 0.8767297
Day10F25       Pen+Rif 1.400      13.353 0.241  10       17 2.454804  8.557118 0.8664380
Day10F26       Pen+Rif 1.300      14.466 0.232  10       16 2.454250  9.535190 0.8851836
Day10F27       Pen+Rif 1.367      12.797 0.233  10       17 2.586652 11.267516 0.9129746
Day10F28     Metro+Rif 1.033       6.545 0.177  10       21 2.767428 12.717616 0.9089859
Day10F29     Metro+Rif 0.967       6.823 0.152  10       25 2.909141 14.820081 0.9037754
Day10F30     Metro+Rif 0.933       6.003 0.160  10       20 2.730795 12.673225 0.9115619
Day10F31 Metro+Rif+Pen 0.900       6.003 0.177  10       17 2.347868  7.744762 0.8286942
Day10F32 Metro+Rif+Pen 1.067       5.447 0.152  10       18 2.609276 10.947822 0.9027475
Day10F33 Metro+Rif+Pen 1.033       5.054 0.160  10       16 2.452130  9.094436 0.8844188

Thank you Epigouveia

droglenc commented 7 years ago

Epigouveia,

For some reason, it appears that the dunn.test package has not installed on your system. You should be able to install it with ...

install.packages("dunn.test")

Let me know if that solves your issue. Thanks.

Epigouveia commented 7 years ago

Hi droglenc,

I did also installed the package dunn.test and was able to run the function dunn.test. So yes it did work So now I have two different packages for the Dunn Test. Is the FSA and dunn.test linked?

Best

droglenc commented 7 years ago

Yes dunnTest from FSA is a wrapper for dunn.test from the dunn.test package. The FSA version has a slighty different interface and set of defaults. This is described in the dunnTest documentation (see the Details section).