• 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 add currency symbols to columns of a table with gt()

rstats101 · July 31, 2024 ·

Currency symbol in a table with gt()

In this tutorial, we will learn how to add currency symbols, like US dollars, Euro, UK pound, Indian Rupee to columns of a table using the R package gt. Let us load gt package to make beautiful tables and tidyverse. First we will create a simple dataframe/tibble with … [Read more...] about How to add currency symbols to columns of a table with gt()

Filed Under: gt table Tagged With: add currency symbol to table, add US dollar symbol to table

runif()- generate uniform random numbers

rstats101 · July 22, 2024 ·

One way to generate uniformly distributed numbers in R is use the runif() function. runif is short for “random uniform”. R has other random number generating functions. For example rnorm generates random normal numbers. runif() takes three arguments, thrst is n - number of … [Read more...] about runif()- generate uniform random numbers

Filed Under: rstats101 Tagged With: runif function in r

How to Find difference between two dates as days, weeks, months and years

rstats101 · July 19, 2024 ·

In this tutorial we will learn how to find the difference between two date objects in R in terms of days, months, and years. We will learn how to use time_length() function available in tidyverse as part of lubridate package to get the difference as dyas, weeks, months, and … [Read more...] about How to Find difference between two dates as days, weeks, months and years

Filed Under: rstats101, time_length() function Tagged With: time difference as years

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

tidyr’s separate_delim_wider(): Split a string into columns

rstats101 · July 3, 2024 ·

In this tutorial, we will learn how to split a string in a column into multiple columns using a delimiter. We will use tidyr's separate_delim_wider() function, that separates a string in a column into multiple columns using delimiter. After spliting the dataframe is wider with … [Read more...] about tidyr’s separate_delim_wider(): Split a string into columns

Filed Under: tidyr, tidyr separate_delim_wider() Tagged With: separate a column into multiple columns

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