Running examples in ‘monographaR-Ex.R’ failed
The error most likely occurred in:

> ### Name: mapTable
> ### Title: Generates a presence/absence matrix of species on grids or
> ###   countries
> ### Aliases: mapTable
> 
> ### ** Examples
> 
> 
> ## loading the example data
> 
> data(monographaR_examples)
> monographaR_examples$map_data -> data
> head(data)
         sp Longitude  Latitude
1 Species_1 -57.01630 -28.85189
2 Species_1 -49.86000 -28.80000
3 Species_1 -50.06580 -28.74830
4 Species_1 -49.29140 -28.35890
5 Species_1 -48.87000 -28.08000
6 Species_1 -55.14751 -27.87311
> 
> ## running the function with grid
> 
> map.table <- mapTable(data, type="grid", resolution=3, 
+ write.output=FALSE)
Assuming the columns are ordered as: species, longitude and latitude
>   
> map.table$table
            cells
sp           1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  Species_1  x     x         x x     x        x           x        x  x  x  x 
  Species_10 x     x           x                          x        x  x  x    
  Species_2  x x   x x   x x            x     x  x        x     x  x     x    
  Species_3  x x   x   x x        x                          x  x        x    
  Species_4  x x   x         x x                          x              x  x 
  Species_5  x     x x       x       x                          x  x     x    
  Species_6  x     x         x    x        x        x                    x  x 
  Species_7  x   x x x       x    x  x        x           x        x     x    
  Species_8  x     x           x  x  x                 x        x  x     x    
  Species_9  x     x                 x                    x  x     x     x  x 
            cells
sp           26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
  Species_1  x     x        x  x  x  x           x  x  x  x     x  x  x  x  x 
  Species_10 x     x  x     x  x  x  x  x     x  x  x  x  x  x  x  x  x  x  x 
  Species_2  x     x  x  x  x  x  x  x  x  x     x  x  x  x  x  x  x  x  x  x 
  Species_3  x  x  x  x     x  x  x  x  x        x  x  x  x     x  x  x  x    
  Species_4  x     x        x  x     x  x        x  x  x  x     x  x  x  x  x 
  Species_5  x     x        x  x  x  x        x  x  x  x  x     x  x  x  x  x 
  Species_6  x     x  x     x  x  x  x        x  x  x  x     x  x  x  x  x  x 
  Species_7  x     x  x     x  x     x        x  x  x  x  x     x  x  x  x    
  Species_8  x  x  x  x     x  x  x  x  x        x  x  x  x     x  x  x  x  x 
  Species_9  x     x  x     x  x  x  x  x        x  x  x  x  x  x  x  x  x  x 
            cells
sp           48 49 50 51 52 53 54 55 56
  Species_1  x  x  x  x  x  x  x  x  x 
  Species_10    x  x  x  x     x  x  x 
  Species_2  x  x  x  x  x        x  x 
  Species_3  x  x  x  x  x     x  x  x 
  Species_4     x  x  x  x     x  x  x 
  Species_5  x  x  x  x  x     x  x  x 
  Species_6  x  x  x  x  x     x  x  x 
  Species_7  x  x  x  x  x  x  x  x  x 
  Species_8  x  x  x  x  x     x  x  x 
  Species_9     x  x  x  x     x  x  x 
> t(map.table$table)
     sp
cells Species_1 Species_10 Species_2 Species_3 Species_4 Species_5 Species_6
   1  x         x          x         x         x         x         x        
   2                       x         x         x                            
   3                                                                        
   4  x         x          x         x         x         x         x        
   5                       x                             x                  
   6                                 x                                      
   7                       x         x                                      
   8                       x                                                
   9  x                                        x         x         x        
   10 x         x                              x                            
   11                                x                             x        
   12 x                                                  x                  
   13                      x                                                
   14                                                              x        
   15 x                    x                                                
   16                      x                                                
   17                                                              x        
   18                                                                       
   19 x         x          x                   x                            
   20                                x                                      
   21                      x         x                   x                  
   22 x         x          x                             x                  
   23 x         x                                                           
   24 x         x          x         x         x         x         x        
   25 x                                        x                   x        
   26 x         x          x         x         x         x         x        
   27                                x                                      
   28 x         x          x         x         x         x         x        
   29           x          x         x                             x        
   30                      x                                                
   31 x         x          x         x         x         x         x        
   32 x         x          x         x         x         x         x        
   33 x         x          x         x                   x         x        
   34 x         x          x         x         x         x         x        
   35           x          x         x         x                            
   36                      x                                                
   37           x                                        x         x        
   38 x         x          x         x         x         x         x        
   39 x         x          x         x         x         x         x        
   40 x         x          x         x         x         x         x        
   41 x         x          x         x         x         x                  
   42           x          x                                       x        
   43 x         x          x         x         x         x         x        
   44 x         x          x         x         x         x         x        
   45 x         x          x         x         x         x         x        
   46 x         x          x         x         x         x         x        
   47 x         x          x                   x         x         x        
   48 x                    x         x                   x         x        
   49 x         x          x         x         x         x         x        
   50 x         x          x         x         x         x         x        
   51 x         x          x         x         x         x         x        
   52 x         x          x         x         x         x         x        
   53 x                                                                     
   54 x         x                    x         x         x         x        
   55 x         x          x         x         x         x         x        
   56 x         x          x         x         x         x         x        
     sp
cells Species_7 Species_8 Species_9
   1  x         x         x        
   2                               
   3  x                            
   4  x         x         x        
   5  x                            
   6                               
   7                               
   8                               
   9  x                            
   10           x                  
   11 x         x                  
   12 x         x         x        
   13                              
   14                              
   15 x                            
   16                              
   17                              
   18           x                  
   19 x                   x        
   20                     x        
   21           x                  
   22 x         x         x        
   23                              
   24 x         x         x        
   25                     x        
   26 x         x         x        
   27           x                  
   28 x         x         x        
   29 x         x         x        
   30                              
   31 x         x         x        
   32 x         x         x        
   33           x         x        
   34 x         x         x        
   35           x         x        
   36                              
   37 x                            
   38 x         x         x        
   39 x         x         x        
   40 x         x         x        
   41 x         x         x        
   42                     x        
   43 x         x         x        
   44 x         x         x        
   45 x         x         x        
   46 x         x         x        
   47           x         x        
   48 x         x                  
   49 x         x         x        
   50 x         x         x        
   51 x         x         x        
   52 x         x         x        
   53 x                            
   54 x         x         x        
   55 x         x         x        
   56 x         x         x        
> 
> map.table$grid -> grid
> 
> data(wrld_simpl)
> plot(grid, border="white")
> plot(wrld_simpl, add=TRUE)
> plot(grid, add=TRUE)
> raster::text(grid, grid@data$layer, cex=1)
> 
> ## running the function with countries
> 
> map.table.country <- mapTable(data, type="country")
Assuming the columns are ordered as: species, longitude and latitude
Warning in proj4string(wrld_simpl) :
  CRS object has comment, which is lost in output
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :
  Discarded datum Unknown based on WGS84 ellipsoid in CRS definition
Error in .local(x, y, returnList, fn, ...) : 
  identicalCRS(x, y) is not TRUE
Calls: mapTable -> data.frame -> over -> over -> .local -> stopifnot
Execution halted