• 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 Replace NA values in a dataframe with Zeros?

rstats101 · January 11, 2022 ·

How to replace Missing Values with Zeros in R

In this tutorial, we will learn how to replace all NA values in dataframe with a specific value like zero in R. Create a dataframe with NA values Let us get started with creating a dataframe with missing values,i.e. NAs in columns. We first create a vector with NAs using … [Read more...] about How to Replace NA values in a dataframe with Zeros?

Filed Under: replace NA Tagged With: replace NA with Zero in R, replaces NAs in R

head() in R to view the first elements

rstats101 · January 11, 2022 ·

head() function in R is one of the most useful functions that lets you quickly get a peek at the data you have in a R object. Using head() function in R, you can view the first elements in a vector, matrix, dataframe and other R objects. In this tutorial, we will use head() … [Read more...] about head() in R to view the first elements

Filed Under: head(), R Function Tagged With: head() function in R

How to find installed R version from RStudio

rstats101 · January 7, 2022 ·

How to find the version of R using version command

In this tutorial, you will learn three different ways to identify the version of R installed in your computer. Find R version from console after opening RStudio One of the ways to find the R version that you are using is to look at the console when you open R either using … [Read more...] about How to find installed R version from RStudio

Filed Under: R version, R.version, sessionInfo() Tagged With: Find R version, Find R version with R.version, Find R version with sessionInfo

gsub() in R to replace all matching patterns

rstats101 · December 22, 2021 ·

In this tutorial, we will learn about gsub() function in R to replace all matching patterns in a string. gsub, stands for "global substitution" is similar to another function R, sub(), but for substituting all matching patterns, not just the first one. Here is a typical use of … [Read more...] about gsub() in R to replace all matching patterns

Filed Under: gsub Tagged With: remove backslash with gsub in R, remove empty space with gsub in R

dplyr near(): compare if numbers and vectors are nearly the same

rstats101 · December 15, 2021 ·

In this tutorial, we will learn near() function part of R package dplyr to check the equality of two numbers or vectors. Often we would like to compare if two numbers or two vectors are equal. A naive approach of using == to compare if two numbers are equal can be problematic due … [Read more...] about dplyr near(): compare if numbers and vectors are nearly the same

Filed Under: dplyr, near() R Tagged With: check if nearly equal in R

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 19
  • Page 20
  • Page 21
  • Page 22
  • Page 23
  • 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