Practical solutions

R Howtos How-To Guides

Solve the problem. Keep building. Collection of R how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Concatenate Two Columns in RThis tutorial demonstrates how to concatenate two columns in R. Plot Background Color in RThis tutorial demonstrates how to change the background color of plot in R. Random Forest in RThis tutorial demonstrates the random forest approach in R. How to Extract Rows From a Data Frame in RThis tutorial demonstrates how to extract rows from a data frame in R. How to Plot Normal Probability in RThis tutorial demonstrates how to plot normal probability in R. How to Create a Ggplot2 Visualization With a Transparent BackgroundIn this article, we will see how to create a ggplot2 visualization with a transparent background and export it to a PNG file using the ggsave() function. We will also see how to set the axis and grid line colours to make these elements visible. Label BoxPlot in RThis tutorial demonstrates how to label a BoxPlot in R. How to Add a Calculated Column to a Matrix in RThis article shows how to combine two matrices, or a matrix and a vector. It also shows how to add a calculated column such as a row sum or mean to an existing matrix. How to Implement the Train() Function in RThis tutorial demonstrates how to implement and use the train function in R. How to Match Newline Characters in R RegexExplore how to match newline characters in R using regular expressions (regex). Learn the techniques to handle line breaks and newline variations effectively in your R programming endeavors. How to Read XLSX Files in RIn this article, you will learn about two of the most complete and easy to use libraries to read xlsx files in R: readxl and openxlsx. How to Count Number of Rows in RThis tutorial demonstrates how to count the number of rows of a DataFrame by group in R. How to Remove Last Character From String in RThis tutorial demonstrates how to remove last few characters from a string in R using different methods. How to Change Point Size in Graphs in RThis tutorial introduces how to change the size and shape of points in graphs in R. How to Replace NA With Zero in RIn this article, you will learn about two methods to replace NA values in a data frame with zero values. One of them uses the Base R subset reassigns, while the other is included in the dplyr package and runs up to 30% faster. How to Clear Memory in RIn this tutorial, you will learn how to clear memory taken by the R system without having to restart it or to restart the computer where it runs. How to Visualize Confusion Matrix Using Caret Package in RThis article introduces how to visualize confusion matrix using caret package in R How to Normalize the Values in Matrix RThis article demonstrates how to add a line to normalize the values in matrix R How to Find Maximum Absolute Values by Row in Data Frame in RThis article demonstrates how to find maximum absolute values by row in data frame in R How to Add Transparent Rectangle to Boxplot in RThis article introduces how to add tranparent rectangle to a boxplot in R How to Add a Line to a Plot With the Lines() Function in RThis article demonstrates how to add a line to a plot with the lines() function in R How to Use grepl to Find Matches for Any Character String in the R Character VectorThis article demonstrates how to use grepl find matches for any character string in the R character vector. How to Split Column Into Two Columns in RThis article demonstrates how to split a column into two columns using the separate function in R How to Draw Legend Items With Different Colors in RThis article introduces how to draw legend items with different colors in R