• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Rstats 101

Learn R Programming Tips & Tricks for Statistics and Data Science

  • Home
  • About
    • Privacy Policy
  • Show Search
Hide Search

dplyr

dplyr between(): find if numerical values are within a range.

rstats101 · August 17, 2022 ·

In this tutorial we will learn how to use dplyr's between() function to find if one or more numerical values are in a range using multiple examples. We will first start with a single numeric value and find out if it is within a range. And then in the next example, we will use a … [Read more...] about dplyr between(): find if numerical values are within a range.

Filed Under: dplyr between() Tagged With: dplyr's between() to find if numerical values are in a range

How to Randomly Replace Values of Numerical Columns in a dataframe to NAs

rstats101 · August 16, 2022 ·

In this tutorial, we will learn how to randomly replace values of numerical columns in a dataframe to NAs or missing values. We will use dplyr's across() function to select only the numerical columns from a dataframe and probabilistically select certain percent of elements to … [Read more...] about How to Randomly Replace Values of Numerical Columns in a dataframe to NAs

Filed Under: dplyr across(), NAs in R Tagged With: randomly replace values to NAs

dplyr contains(): select columns that contains a string

rstats101 · August 5, 2022 ·

In this tutorial, we will learn how to select columns, whose names contains a string using dplyr's contains() function. dplyr's contains() function belongs to a family helper functions to select columns like starts_with() and ends_with(). First we will see a simple example of … [Read more...] about dplyr contains(): select columns that contains a string

Filed Under: dplyr, dplyr contains() Tagged With: select columns with dplyr contains

dplyr transmute(): add new columns and delete existing columns

rstats101 · July 29, 2022 ·

In this tutorial, we will learn how to create new columns and remove existing columns using dplyr's transmute() function. We will start with an example showing how to use transmute to create one new column and then show an example of creating more than one new column. First, … [Read more...] about dplyr transmute(): add new columns and delete existing columns

Filed Under: dplyr, dplyr transmute() Tagged With: create columns with dplyr's transmute()

dplyr’s mutate(): How to create new columns

rstats101 · July 21, 2022 ·

In this tutorial, we will learn how to create/add one or more columns to a dataframe using dplyr's mutate() function. We will first see an example of creating a single new column in a dataframe and then see an example of adding multiple columns using mutate() function. First … [Read more...] about dplyr’s mutate(): How to create new columns

Filed Under: dplyr mutate() Tagged With: Create new columns with dplyr mutate(), dplyr mutate

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Interim pages omitted …
  • Page 9
  • Go to Next Page »

Primary Sidebar

Recent Posts

  • How to create a nested dataframe with lists
  • How to compute proportion with tidyverse
  • How to Compute Z-Score of Multiple Columns
  • How to drop unused level of factor variable in R
  • How to compute Z-score

Categories

%in% arrange() as.data.frame as_tibble built-in data R colSums() R cor() in R data.frame dplyr dplyr across() dplyr group_by() dplyr rename() dplyr rowwise() dplyr row_number() dplyr select() dplyr slice_max() dplyr slice_sample() drop_na R duplicated() gsub head() impute with mean values is.element() linear regression matrix() function na.omit R NAs in R near() R openxlsx pivot_longer() prod() R.version replace NA replace NAs tidyverse R Function rstats rstats101 R version scale() sessionInfo() t.test() tidyr tidyselect tidyverse write.xlsx

Copyright © 2025 · Daily Dish Pro on Genesis Framework · WordPress · Log in

Go to mobile version