## Warning: package 'leaflet' was built under R version 4.2.2
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6      ✔ purrr   0.3.5 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## Warning: package 'rgeos' was built under R version 4.2.2
## Loading required package: sp
## rgeos version: 0.5-9, (SVN revision 684)
##  GEOS runtime version: 3.9.3-CAPI-1.14.3 
##  Please note that rgeos will be retired by the end of 2023,
## plan transition to sf functions using GEOS at your earliest convenience.
##  GEOS using OverlayNG
##  Linking to sp version: 1.5-0 
##  Polygon checking: TRUE 
## 
## Linking to GEOS 3.9.1, GDAL 3.4.3, PROJ 7.2.1; sf_use_s2() is TRUE

Ejemplo de matriz

##   Cod..Anillo      ID Cod..Color Cod..Colección       day Ciclo.lunar
## 1             Re22M01                           21/9/2022   Menguante
## 2             Re22M02                           21/9/2022   Menguante
## 3             Re22M03                           21/9/2022   Menguante
## 4             Re22M04                           21/9/2022   Menguante
## 5             Re22M05                           21/9/2022   Menguante
## 6             Re22M06                           21/9/2022   Menguante
##   Condiciones.ambientales4     locality Estación Red     Latitud     Longitud
## 1                Despejado restauracion        1   7 3.344715553 -76.55241358
## 2                Despejado restauracion        1   6 3.344885001  -76.5521361
## 3                Despejado restauracion        1   7 3.344715553 -76.55241358
## 4                Despejado restauracion        1   7 3.344715553 -76.55241358
## 5                Despejado restauracion        1   6 3.344885001  -76.5521361
## 6                Despejado restauracion        1   6 3.344885001  -76.5521361
##         Hora        Familia           specie                Especie      Gremio
## 1 7:21:00 PM Phyllostomidae        S. lilium        Sturnira lilium   Frugivoro
## 2 8:13:00 PM Phyllostomidae      G. soricina   Glossophaga soricina Nectarivoro
## 3 8:00:00 PM Phyllostomidae C. perspicillata Carollia perspicillata   Frugivoro
## 4 8:00:00 PM Phyllostomidae      G. soricina   Glossophaga soricina Nectarivoro
## 5 8:13:00 PM Phyllostomidae      G. soricina   Glossophaga soricina Nectarivoro
## 6 8:13:00 PM Phyllostomidae      G. soricina   Glossophaga soricina Nectarivoro
##   Sexo Edad  ER   AB   Tb  HN   AC   LC Cola   LO Env LCUERPO  LP  Peso
## 1    H    J LAC 39.5 15.1 7.1 11.9 22.3    - 13.7 306    54.2  10 18.32
## 2    M    A  SI 35.5 16.1 6.9  8.9 24.6    7   14 268    54.6 9.4  9.92
## 3    H    A GES 42.7   21 7.9 10.3 22.4  7.3 17.5 344    52.5 9.9 19.09
## 4    M    A  NO 35.3 16.9 5.2  8.3 21.7  4.8   13 270    49.8 7.7  8.47
## 5    M    A  SI    -    -   -    -    -    -    -   -       -   -     -
## 6    M    A  SI 34.6 13.6 5.5    9   21    8   14 264    47.9 8.6  8.56
##    Fórmula.dental
## 1                
## 2                
## 3                
## 4                
## 5                
## 6 2/2 1/1 2/2 2/3
##                                                                                                                                                                                Notas
## 1                                                                                                                                                                                   
## 2                                                                                                                                                                                   
## 3                                                                                                                                                                                   
## 4                                                                                                                                                                                   
## 5                                                                                                                                                                                   
## 6 Borde del M1 interno aserrado, pelaje dorsal tetrabandeado: base clara. Bandas poco evidentes. Chaparreras naranjas, pelaje ventral tribandeado, tibia y patra con pelos dispersos
## `summarise()` has grouped output by 'locality', 'Station', 'Net.', 'Longitude'.
## You can override using the `.groups` argument.
## Warning in eval(substitute(list(...)), `_data`, parent.frame()): NAs introduced
## by coercion

## Warning in eval(substitute(list(...)), `_data`, parent.frame()): NAs introduced
## by coercion
##   locality Station Net. Longitude Latitude sp
## 1   bosque       1    1 -76.55227 3.343468  9
## 2   bosque       1    2 -76.55263 3.343626 13
## 3   bosque       1    3 -76.55282 3.343476  1
## 4   bosque       1    4 -76.55299 3.343813 30
## 5   bosque       1    5 -76.55331 3.343970  8
## 6   bosque       1    6 -76.55345 3.343670 13
## OGR data source with driver: ESRI Shapefile 
## Source: "D:\biato\Dagma-Icesi\R_dagma\Murcielagos\html_murcis\para_carbono_corazon.shp", layer: "para_carbono_corazon"
## with 3 features
## It has 6 fields
## 'data.frame':    49 obs. of  6 variables:
##  $ locality : chr  "bosque" "bosque" "bosque" "bosque" ...
##  $ Station  : int  1 1 1 1 1 1 1 1 2 2 ...
##  $ Net.     : chr  "1" "2" "3" "4" ...
##  $ Longitude: num  -76.6 -76.6 -76.6 -76.6 -76.6 ...
##  $ Latitude : num  3.34 3.34 3.34 3.34 3.34 ...
##  $ sp       : num  9 13 1 30 8 13 5 15 37 10 ...
##    locality            Station          Net.             Longitude     
##  Length:49          Min.   :1.000   Length:49          Min.   :-76.56  
##  Class :character   1st Qu.:1.000   Class :character   1st Qu.:-76.56  
##  Mode  :character   Median :1.000   Mode  :character   Median :-76.55  
##                     Mean   :1.469                      Mean   :-76.55  
##                     3rd Qu.:2.000                      3rd Qu.:-76.55  
##                     Max.   :2.000                      Max.   :-76.55  
##                                                        NA's   :1       
##     Latitude           sp        
##  Min.   :3.343   Min.   : 1.000  
##  1st Qu.:3.345   1st Qu.: 4.000  
##  Median :3.345   Median : 8.000  
##  Mean   :3.345   Mean   : 8.694  
##  3rd Qu.:3.346   3rd Qu.:11.000  
##  Max.   :3.347   Max.   :37.000  
##  NA's   :1
m <- leaflet(Mu2) %>% addPolygons(data=states, 
                                  weight = 2, color = "white") %>% 
  addTiles()  %>% addProviderTiles("Esri.WorldImagery") %>% 
  setView( lat=3.3448, lng=-76.554 , zoom=15.49) %>%
  addCircleMarkers(~Longitude, ~Latitude,
                   fillColor = ~mypalette(sp), 
                   fillOpacity = 5, color="white", radius=5, stroke=FALSE,
                   label = mytext,
                   labelOptions = labelOptions( style = list("font-weight" = "normal",
                                                             padding = "3px 8px"),
                                                textsize = "13px",
                                                direction = "auto")
  ) %>%
  addLegend( pal=mypalette, values=~sp, opacity=0.9, title = "Capturas
             Murciélagos",
             position = "bottomright" ) 
## Warning in validateCoords(lng, lat, funcName): Data contains 1 rows with either
## missing or invalid lat/lon values and will be ignored
## Warning in mypalette(sp): Some values were outside the color scale and will be
## treated as NA

Including Plots

You can also embed plots, for example: