Articles by A.M. Barbosa

Degree-minute-second to decimal coordinates

February 2, 2022 | A.M. Barbosa

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 … Continue reading → [Read more...]

Package modEvA 3.0 is now on CRAN!

December 21, 2021 | A.M. Barbosa

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 … Continue reading →
[Read more...]

Mapping the confusion matrix

November 10, 2021 | A.M. Barbosa

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: Usage … Continue reading →
[Read more...]

Downloading and cleaning GBIF data with R

March 22, 2021 | A.M. Barbosa

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 … Continue reading → [Read more...]

Plot predicted values for presences vs. absences

January 20, 2021 | A.M. Barbosa

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 … Continue reading →
[Read more...]

Functions for time tracking and management

June 26, 2020 | A.M. Barbosa

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 … Continue reading →
[Read more...]

Plot outliers and their values

March 13, 2020 | A.M. Barbosa

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 … Continue reading →
[Read more...]

fuzzySim updated to 3.0 on CRAN!

February 11, 2020 | A.M. Barbosa

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 … Continue reading →
[Read more...]

This blog is now on R-bloggers!

February 9, 2020 | A.M. Barbosa

I should have done this long ago, but it’s never too late: modTools has finally been added to R-bloggers — a content aggregator contributed by bloggers who write about R, empowering bloggers to empower other R users. I hope the … Continue reading → [Read more...]

Grid point occurrence records onto a raster

February 3, 2020 | A.M. Barbosa

The ‘gridRecords‘ function, which has just been added to the ‘fuzzySim‘ package (from version 2.6 on), takes a raster stack and a set of spatial coordinates of a species’ presence (and optionally absence) records, and returns a data frame with … Continue reading →
[Read more...]

modEvA 2.0 now on CRAN!

January 21, 2020 | A.M. Barbosa

The new version of modEvA (2.0) is now on CRAN! It can produce some new plots, such as the precision-recall curve and the histograms/densities of predicted values for presence and absence observations. It calculates some additional evaluation measures, such as … Continue reading → [Read more...]

Area under the precision-recall curve

January 17, 2020 | A.M. Barbosa

The AUC function, in the modEvA package, initially computed only the area under the receiver operating characteristic (ROC) curve. Now, since modEvA version 1.7 (currently available on R-Forge), it also offers the option to compute the precision-recall curve, which may … Continue reading →
[Read more...]

Variable selection with multGLM

January 9, 2020 | A.M. Barbosa

The ‘multGLM‘ function in the ‘fuzzySim‘ R package automatically calculates generalized linear models for one or more species, with a range of options for variable selection. However, you may want to build your final models with other methods (e.g. multimodel-inference … Continue reading → [Read more...]

Plot shared favourability for two competing species

March 8, 2019 | A.M. Barbosa

The sharedFav function below implements the graphical analyses of Acevedo et al. (2010, 2012) on biogeographical interactions. It takes two vectors of favourability values at different localities for, respectively, a stronger and a weaker competing species (or two equally strong … Continue reading →
[Read more...]

Package fuzzySim now on CRAN!

December 19, 2018 | A.M. Barbosa

The fuzzySim package, which is regularly maintained on R-Forge, is finally also available on the CRAN official repository, in its latest version 2.0! Many thanks especially to Alba Estrada for invaluable help with bug search. [Read more...]

Improvements to fuzzySim functions

November 21, 2018 | A.M. Barbosa

A few improvements were recently made to several functions in the fuzzySim package. Mainly, function modelTrim is now more independent (it used to require “attach” sometimes); multTSA allows either “AIC” or “significance” as a backward stepwise selection criterion, and provides … Continue reading → [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)