Skip to content
CodingProf.com
  • Home
  • R Programming
    • How To’s
    • Finance in R
    • Regression in R
    • Shiny Application
  • About

How To’s

How to Create a Vector with Random Numbers in R [Examples]

December 26, 2021August 12, 2021 by Coding Prof

In this article, we show how you create a vector with random numbers. That is, with random integers, random numbers between 0 and 1, etc.

Categories How To's Tags Random Vector

How to Replace Missing Values with the Median in R

January 22, 2022August 11, 2021 by Coding Prof

In this article, we demonstrate how you can replace missing values in a data frame with the median. We use R base code and the tidyverse package.

Categories How To's Tags Replace Missing Values

How to Replace NA’s with the Mode (Most Frequent Value) in R

January 22, 2022August 11, 2021 by Coding Prof

In this article, we discuss how to replace missing values in R with the mode (i.e., most frequent value). To do so, we first create a function to calculate the mode.

Categories How To's Tags Mode, Replace Missing Values

How to Remove All Columns with a Common Prefix/Suffix in R [Examples]

July 31, 2022August 10, 2021 by Coding Prof

In this article, we provide R code to remove columns with a common prefix/suffix from a data frame.

Categories How To's Tags Prefix, Remove Columns, Suffix

3 Easy Ways to Remove Empty Columns in R [Examples]

July 31, 2022August 9, 2021 by Coding Prof

IN this article, we discuss 3 method to identify and remove empty columns from an R data frame. All 3 methods are dynamic and don’t require to explicitly specify the column name.

Categories How To's Tags Remove Empty Columns

3 Simple Ways to Count the Number of Words in a Character String in R [Examples]

June 5, 2022August 9, 2021 by Coding Prof

In this article, we discuss 3 methods to count the number of words in a string. We also show which method is the quickest.

Categories How To's Tags Count Words String

3 Easy Ways to Reverse a String in R [Examples]

August 10, 2021August 8, 2021 by Coding Prof

In this article, we discuss 3 easy ways to reverse a the characters in a string. We also show how to reverse the words in a string.

Categories How To's Tags reverse string

3 Ways to Replace Missing Values with the Median per Group in R

August 14, 2021July 18, 2021 by Coding Prof

In this article, we explain how to replace missing values with the median per group.

Categories How To's Tags Median, Replace Missing Values
Post navigation
Newer posts
← Previous Page1 … Page4 Page5

Recent Posts

  • 3 Ways to Check if Data Frames are Equal in R [Examples]
  • 3 Ways to Read the Last N Characters from a String in R [Examples]
  • 3 Ways to Remove the Last N Characters from a String in R [Examples]
  • How to Extract Words from a String in R [Examples]
  • 3 Ways to Deal with NaN’s in R [Examples]
  • Privacy Policy
© 2023 CodingProf.com • Built with GeneratePress