Publications by A.M. Barbosa
fuzzySim updated to 3.0 on CRAN!
The newest version of R package fuzzySim (3.0) is now on CRAN! It includes new functions such as ‘favClass‘, ‘bioThreat‘ and ‘gridRecords‘; improvements to some functions, help files and examples; updated e-mail and citation information [ see citation(“fuzzySim”) ]; clarifications and typo corrections along the reference manual; a...
1697 sym R (2174 sym/5 pcs) 8 img
Plot outliers and their values
The ‘plot_outliers‘ function below draws a boxplot and a scatterplot of a numeric variable x and plots the values of the outliers (currently not offset, even if they overlap). For relatively small datasets, it can be a quick way to identify which outliers look reasonable and which are likely a result of transcription or measurement error, and...
940 sym R (573 sym/4 pcs) 6 img
Functions for time tracking and management
Especially since I had to start working as a freelancer, it became essential to keep an accurate record of how much time I spend on each task and project. I checked out some software tools available online (namely TimeCamp, which I’ve used for a while), but I decided to see if I could write my own R functions for tracking time use, especially w...
2104 sym R (1718 sym/2 pcs) 2 img 1 tbl
Plot predicted values for presences vs. absences
Diagnostic plots are always a nice, visually explicit way to assess our data and predictions, and I’ve just added a new one to the modEvA R package. The ‘predPlot‘ function plots predicted values separated into observed presences and absences, and coloured according to whether they’re above or below a given prediction threshold (the defau...
1639 sym R (2258 sym/2 pcs) 2 img
Downloading and cleaning GBIF data with R
Many students and workshop participants ask me for a (semi-)automated way to 1) download species occurrence data from GBIF into R, and 2) clean such data from common errors. The following script does that, while calling the user’s attention to the need for properly citing the data sources (not just GBIF, which is a repository for many sources),...
850 sym R (7873 sym/1 pcs)
Mapping the confusion matrix
The ‘confusionLabel‘ function below labels the predictions of a binary response model according to their confusion matrix categories, i.e., it classifies each prediction into a false positive, false negative, true positive or true negative, given a user-defined threshold value: confusionLabel <- function(model, # placeholder, not yet implemen...
956 sym R (686 sym/2 pcs) 2 img
Package modEvA 3.0 is now on CRAN!
This version of R package “model Evaluation and Analysis” includes some bug fixes (thanks to Huijie Qiao, Ying-Ju Tessa Chen, Oswald van Ginkel and Alba Estrada), some new functions (predPlot, confusionLabel, and mod2obspred, which is now used internally by several others), and it implements more classes (‘gam’, ‘gbm’, ‘randomForest...
2987 sym 6 img
Degree-minute-second to decimal coordinates
The ‘dms2dec’ function, posted here a while ago to convert longitude-latitude coordinates from degree-minute-second to decimal format, has recently been updated to accomodate more cases that I and my course participants run into. The function is pasted below and is also available on GitHub, from where it can be sourced directly from R with so...
902 sym R (1557 sym/2 pcs)