by Suf | May 28, 2022 | Programming, R, Tips
This tutorial will go through how to remove outliers from a boxplot using ggplot2 in R with the help of code examples. Table of contentsExampleRemove Outlier Using outlier.shape=NASummary Example In the following example, we are going to use the iris dataset to create...
by Suf | May 28, 2022 | Programming, R, Tips
The easiest way to place two plots side by side using ggplot2 is to install gridExtra and then use the grid.arrange() function. For example, install.packages(“gridExtra”) grid.arrange(plot1, plot2, ncol=2) This tutorial will go through how to place two...
by Suf | May 27, 2022 | Programming, Rust, Tips
We can calculate the absolute value of a number using the abs() method. We have to specify the numeric type before we call the abs method, for example, if we want a 32-bit signed integer we need to put i32 after the number. This tutorial will go through how to...
by Suf | May 26, 2022 | Programming, Python, Tips
The timestamp method was added in Python 3.3. If you try to call the timestamp method with Python version 3.2 or earlier, you will raise the AttributeError: ‘datetime.datetime’ object has no attribute ‘timestamp’. You can solve this error by...
by Suf | May 25, 2022 | Programming, Python, Tips
This error occurs when you try to reverse a string by calling reverse() directly on the string object. The reverse() method belongs to the List data type, not String. You can solve this error by using the subscript operator, for example, reversed_str = a_str[::-1]...