• 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

rstats101

dplyr’s anti_join() to find rows based on presence or absence in a dataframe

rstats101 · July 5, 2024 ·

In this tutorial, we will learn how to use dplyr's anti_join() function to filter rows from one dataframe based on the presence or absence of matches in another dataframe. dplyr's anti_join() function is extremely useful for cases when we want to find what row is present or … [Read more...] about dplyr’s anti_join() to find rows based on presence or absence in a dataframe

Filed Under: dplyr anti_join(), rstats101 Tagged With: dplyr anti_join() to find unmatched rows

How to select rows with multiple partial matching strings

rstats101 · July 3, 2024 ·

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

Filed Under: rstats101, str_detect(), stringr Tagged With: filter rows based on multiple partial matching strings

How to compute annualized return of a stock with tidyverse

rstats101 · July 2, 2024 ·

Yearly returns

In this tutorial, we will learn how to compute annualized return of stock using tidyverse from scratch. Annualized return of an investment is the average returns of the investment that is held over many years. In comparison to simple mean of yearly returns, annualized return is … [Read more...] about How to compute annualized return of a stock with tidyverse

Filed Under: prod(), rstats101 Tagged With: Compute Annualized Return

How to get product of all elements in a column

rstats101 · July 1, 2024 ·

In this tutorial we will learn how to compute product of all elements of a column in a dataframe using tidyverse. We will use prod() function in base to multiple all elements of a columns. Let us first load tidyverse. We will create a simple dataframe using tidyverse' … [Read more...] about How to get product of all elements in a column

Filed Under: prod(), R Function, rstats101 Tagged With: product of all elements

slice_min: Get Rows with minimum values of a column

rstats101 · November 3, 2023 ·

dplyr's slice_min(): Rows with lowest values for a column

In this tutorial, we will learn how to get rows with lowest values of a column from a data frame in R. We will use dplyr's slice_min() function to select rows with lowest values for a column in a data frame. We will also use slice_min() function in dplyr to find the bottom n … [Read more...] about slice_min: Get Rows with minimum values of a column

Filed Under: dplyr slice_min(), rstats101 Tagged With: bottom n rows with min values

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