From c6d293cf089326ae4af6f6426760497b9b105d76 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Mon, 9 Nov 2020 08:24:19 +0100 Subject: [PATCH] Added pitfall --- PITFALLS.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PITFALLS.md b/PITFALLS.md index 40db8b4..fda326f 100644 --- a/PITFALLS.md +++ b/PITFALLS.md @@ -24,6 +24,12 @@ Function | Matlab output | R output # Wanna help debugging? -If you find an error, one of the first things to try is to compare the R code with its MATLAB equivalent, which you can find [here](matlab). Some common causes are: +If you find an error, one of the first things to try is to compare the R code with its MATLAB equivalent, which you can find [here](matlab). Some common causes are as follows: -1. Using `()` to subset an object in R. R uses `[]` for that, whereas Matlab uses `()` for both function calling and object subsetting. Therefore, often objects will be mistakenly interpreted as functions by R due to improper translation. \ No newline at end of file +## Using `()` to subset an object in R. + +R uses `[]` for that, whereas Matlab uses `()` for both function calling and object subsetting. Therefore, often objects will be mistakenly interpreted as functions by R due to improper translation. + +## Improper removal of a duplicate function + +Homonymous functions were found on several files with code that, upon first inspection, are deemed identical. That might not always be the case (especially for large files, where visual inspection may be especially imperfect), so errors might have emerged from calling homonymous functions that are supposed to be slightly different.