First you need to load the RMacoqui package:

library(RMacoqui)

Now load and take a look at the example datasets that come with the package:

data(amphib)
head(amphib)
##   aly_cis aly_dic aly_obs buf_buf buf_cal dis_gal dis_jea dis_pic hyl_arb
## 1       0       0       1       1       1       1       0       0       1
## 2       0       0       1       1       1       1       0       0       1
## 3       0       0       1       1       1       1       0       0       1
## 4       0       0       1       1       1       1       0       0       0
## 5       0       0       1       1       0       1       0       0       1
## 6       0       0       1       1       0       1       0       0       1
##   hyl_mer pel_cul pel_ibe pel_pun pel_per ran_dal ran_ibe ran_pyr ran_tem
## 1       0       0       0       0       1       0       1       0       1
## 2       0       0       0       0       1       0       1       0       1
## 3       0       0       0       0       1       0       1       0       1
## 4       0       0       0       0       1       0       1       0       1
## 5       0       0       0       0       1       0       0       0       0
## 6       0       0       0       0       1       0       1       0       1
data(simil)
head(simil)
##   aly_cis aly_dic aly_obs buf_buf buf_cal dis_gal dis_jea dis_pic hyl_arb
## 1   1.000   0.113   0.330   0.361   0.430   0.767   0.265   0.000   0.636
## 2   0.113   1.000   0.000   0.081   0.121   0.103   0.491   0.000   0.056
## 3   0.330   0.000   1.000   0.670   0.662   0.508   0.356   0.141   0.676
## 4   0.361   0.081   0.670   1.000   0.949   0.528   0.309   0.031   0.621
## 5   0.430   0.121   0.662   0.949   1.000   0.530   0.376   0.055   0.622
## 6   0.767   0.103   0.508   0.528   0.530   1.000   0.185   0.000   0.805
##   hyl_mer pel_cul pel_ibe pel_pun pel_per ran_dal ran_ibe ran_pyr ran_tem
## 1   0.676   0.581   0.633   0.300   0.361   0.000   0.459   0.000   0.000
## 2   0.275   0.129   0.485   0.231   0.081   0.000   0.000   0.000   0.000
## 3   0.259   0.612   0.120   0.643   0.692   0.165   0.555   0.113   0.497
## 4   0.430   0.784   0.298   0.447   0.993   0.039   0.294   0.022   0.227
## 5   0.500   0.833   0.365   0.536   0.949   0.067   0.312   0.034   0.215
## 6   0.558   0.594   0.532   0.268   0.528   0.000   0.663   0.000   0.365

If your input data set is a presences/absences matrix (like the amphib example dataset), just provide its name to the macoqui function:

macoquires.presabs <- macoqui(amphib)

If your data set is a similarity matrix (like the simil example data), you’ll need to provide also the number of analysed localities (nloc), set isprox to 1 (to specify that the input is a proximity matrix) and provide the significance thresholds for those values (vmax and vmin; type help(macoqui) for more information):

macoquires.prox <- macoqui(simil, nloc=273, isprox=1, vmax=0.553, vmin=0.445)

To get a friendly ‘macoqui’ output:

ver.matRmacoqui(macoquires.presabs)
ver.matRmacoqui(macoquires.prox)

To get the parameters for chorotype mapping (only available if ‘data’ was a presences/absences matrix) and friendly output:

locs <- locCorot(macoquires.presabs)
ver.matRmacoqui(locs)

For a fuzzy-logic analysis of clusters selected by the researcher, and friendly output:

groups <- c(12,1,12,2,13,1,13,2,15,1,10,1,10,2,17,2)
fuzzyres <- fuzzy.Clusters(macoquires.presabs, groups)
ver.matRmacoqui(fuzzyres)

To get the parameters for cluster mapping, and friendly output:

fuzzylocs <- locCorotGrupos(fuzzyres, groups)
ver.matRmacoqui(fuzzylocs)