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 Sum Selected Columns of an R Data FrameThis article shows how to calculate the sum of selected columns of an R data frame and store the values in a new column. How to Perform Time Series Analysis and Forecasts in RThis article introduces the functions in base R that facilitate time series analysis and forecasts. The reader must be familiar with the statistical and mathematical aspects of time series analysis and quickly outline R's basic functions to get started. How to Create Empty Data Frame in RThis tutorial demonstrates how to create an empty data frame in R. 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 Create Empty Matrix in RThis tutorial demonstrates the way to create an empty matrix in R. How to Plot Normal Probability in RThis tutorial demonstrates how to plot normal probability in R. How to Check Variable Data Types in RThis tutorial demonstrates the methods on how to check variable type in R. How to Restart R in RStudioThis article explains the need to restart R and then mentions different methods to restart R using RStudio. 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. The replicate() Function in RThis tutorial introduces the uses of the replicate() function in R. How to Count Number of Observations in RThis tutorial demonstrates how to count the total number of observations in a dataset in R. 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 Remove Rows With NA in One Column in RThis tutorial demonstrates how to remove rows with NA in one column from a dataframe in R. How to Select Columns by Index in RThis tutorial demonstrates how to select columns by index in R. How to Implement the Train() Function in RThis tutorial demonstrates how to implement and use the train function in R. How to Find Row Number in RThis tutorial demonstrates how to find a row number for a value 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.