• 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

How to create a directory if it does not exist in R

rstats101 · July 12, 2022 ·

In this tutorial we will learn how to create a directory if it does not exist already using R. We will be using two base R functions, one of checking if a directory exists and the other for creating a directory. If a directory exists already we would not be creating it and if … [Read more...] about How to create a directory if it does not exist in R

Filed Under: dir.create(), dir.exists() Tagged With: create a directory if it does not exist in R

dplyr filter(): How to select rows with partially matching string

rstats101 · July 11, 2022 ·

In this tutorial, we will learn how to select or filter rows of a dataframe with partially matching string. dplyr's filter() function selects/filters rows based on values of one or more columns when it completely matches. However, to filter or select rows with partially matching … [Read more...] about dplyr filter(): How to select rows with partially matching string

Filed Under: dplyr Tagged With: dplyr filter and str_detect(), dplyr filter() and grepl(), filter rows based on partial match

How to filter rows in a dataframe: dplyr’s filter()

rstats101 · July 9, 2022 ·

With dplyr's filter() function, one can filter rows or subset rows from a dataframe. In this post, we will learn how to select subset of rows based on values one or more columns in a dataframe using dplyr's filter() function. First we load tidyverse the suit of R … [Read more...] about How to filter rows in a dataframe: dplyr’s filter()

Filed Under: dplyr, dplyr filter() Tagged With: dplyr filter to select rows

dplyr ends_with(): select columns that end with a suffix

rstats101 · July 6, 2022 ·

In this tutorial, we will learn how to select columns that ends with a string with multiple examples using dplyr and base R. With dplyr, we can use ends_with(), one of the select helper functions, to select columns that ends with a prefix/string. Similarly, in base R we have … [Read more...] about dplyr ends_with(): select columns that end with a suffix

Filed Under: dplyr ends_with(), endsWith() Tagged With: base R endsWith(), dplyr ends_with(), select columns ending with suffix

How to collapse multiple rows based on a column

rstats101 · June 29, 2022 ·

In this tutorial, we will learn how to collapse multiple rows from a column to a single row based on another column/group. Let us get started by loading tidyverse and checking the tidyr package version. To illustrate collapsing multiple rows into single one, let us … [Read more...] about How to collapse multiple rows based on a column

Filed Under: dplyr group_by(), paste0 in R Tagged With: collapse multiple rows into single row

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 14
  • Page 15
  • Page 16
  • Page 17
  • Page 18
  • Interim pages omitted …
  • Page 24
  • 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