• 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

R Function

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

How to select columns that starts with a prefix/string in R

rstats101 · June 23, 2022 ·

In this tutorial, we will learn how to select columns that starts with a prefix or string using dplyr's strats_with() function and base R startsWith() function. The tidyverse R package dplyr has a number of helper functions to select columns of interest under different … [Read more...] about How to select columns that starts with a prefix/string in R

Filed Under: base R startsWith(), dplyr starts_with() Tagged With: base R startsWith(): select columns that starts with string, dplyr starts_with(): select columns that starts with string

Linear Regression in R with lm() function – A Practical Tutorial

rstats101 · June 14, 2022 ·

Scatterplot with linear fit line

In this tutorial, we will learn how to perform a simple linear regression in R using lm() function. Simple Linear regression is one of the popular and common statistical methods that is used to understand the relationship between two numerical or quantitative variables, like … [Read more...] about Linear Regression in R with lm() function – A Practical Tutorial

Filed Under: lm() in R Tagged With: linear regression in R

How To find levels of a factor in R

rstats101 · May 31, 2022 ·

Factors are a type of variable that R uses to store categorical information in R. For example, we can save sexes as factor variable with two values male and female. In this post we will learn about using factor variables in R and learn how to find out about levels of a factor … [Read more...] about How To find levels of a factor in R

Filed Under: class() in R, str() in R Tagged With: factor levels in R, find levels of factor variable

How to Split a Dataframe into a list of Dataframes by groups in R

rstats101 · April 21, 2022 ·

In this tutorial, we will learn how to split a dataframe into a list of dataframes by groups in R. We will first learn how to use the base R function, split(), to divide a dataframe into multiple dataframes into a list. Then, we will learn how to use dplyr's group_split() … [Read more...] about How to Split a Dataframe into a list of Dataframes by groups in R

Filed Under: dplyr group_split(), split() Tagged With: split a dataframe into list dataframes by group

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • 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