Skip to content

Data Science Tutorials

For Data Science Learners

  • Hypothesis Testing in R
    Hypothesis Testing in R R
  • Making games in R- Nara and eventloop Game Changers
    Making games in R- Nara and eventloop Game Changers Machine Learning
  • Multiple regression model in R R
  • Duplicate and concatenate in R R
  • How to plot categorical data in R
    Plot categorical data in R R
  • How to create summary table in R
    How to create summary table in R R
  • Difference between R and Python
    Difference between R and Python R
  • How to Calculate Ratios in R
    How to Calculate Ratios in R R

Tag: dplyr

How to Scale Only Numeric Columns in R

Posted on August 4August 4 By Admin No Comments on How to Scale Only Numeric Columns in R
How to Scale Only Numeric Columns in R

How to Scale Only Numeric Columns in R, To scale only the numeric columns in a data frame in R, use the dplyr package’s following syntax. Best Books to learn Tensorflow – Data Science Tutorials library(dplyr) df %>% mutate(across(where(is.numeric), scale)) How to actually use this function is demonstrated in the example that follows. Use dplyr…

Read More “How to Scale Only Numeric Columns in R” »

R

Add new calculated variables to a data frame and drop all existing variables

Posted on July 18July 17 By Admin No Comments on Add new calculated variables to a data frame and drop all existing variables
Add new calculated variables to a data frame and drop all existing variables

Add new calculated variables to a data frame and drop all existing variables, I hope you enjoyed reading about the dplyr package magics in earlier posts, here is the last update while using dplyr package. With R’s transmute() function, you can drop all of the existing variables and add new calculated variables to a data…

Read More “Add new calculated variables to a data frame and drop all existing variables” »

R

How to apply a transformation to multiple columns in R?

Posted on July 17July 16 By Admin No Comments on How to apply a transformation to multiple columns in R?
How to apply a transformation to multiple columns in R?

How to apply a transformation to multiple columns in R?, To apply a transformation to many columns, use R’s across() function from the dplyr package. How to apply a transformation to multiple columns in R? There are innumerable applications for this function, however, the following examples highlight some typical ones: First Approach: Apply Function to…

Read More “How to apply a transformation to multiple columns in R?” »

R

How to change the column positions in R?

Posted on July 15July 15 By Admin No Comments on How to change the column positions in R?
How to change the column positions in R?

How to change the column positions in R, you can rearrange the columns in a data frame by using the relocate() function from the dplyr package. The following techniques can be used to alter the column positions. Method 1: Move One Column to Front move ‘x’ column to the front df %>% relocate(x) Method 2:…

Read More “How to change the column positions in R?” »

R

Subset rows based on their integer locations-slice in R

Posted on July 14July 14 By Admin No Comments on Subset rows based on their integer locations-slice in R
Subset rows based on their integer locations-slice in R

Subset rows based on their integer locations, R has the slice() function, which allows you to subset rows according to their integer places. Statistical test assumptions and requirements – Data Science Tutorials The following techniques can be used to subset specific rows in a data frame: Approach 1: Subset One Particular Row get row 3…

Read More “Subset rows based on their integer locations-slice in R” »

R

How to do Conditional Mutate in R?

Posted on July 13 By Admin No Comments on How to do Conditional Mutate in R?
How to do Conditional Mutate in R?

How to do Conditional Mutate in R, It’s common to wish to add a new variable based on a condition to an existing data frame. The mutate() and case when() functions from the dplyr package make this task fortunately simple. Cumulative Sum calculation in R – Data Science Tutorials With the following data frame, this…

Read More “How to do Conditional Mutate in R?” »

R

How to Use Mutate function in R

Posted on July 11July 8 By Admin No Comments on How to Use Mutate function in R
How to Use Mutate function in R

How to Use Mutate function in R, This article demonstrates how to add additional variables to a data frame using R’s mutate() function. Artificial Intelligence Examples-Quick View – Data Science Tutorials How to Use Mutate function in R The dplyr library has the following functions that can be used to add additional variables to a…

Read More “How to Use Mutate function in R” »

R

Convert Multiple Columns to Numeric in R

Posted on July 10July 8 By Admin No Comments on Convert Multiple Columns to Numeric in R
Convert Multiple Columns to Numeric in R

Convert Multiple Columns to Numeric in R, Using the dplyr package, you can change many columns to numeric using the following techniques. The examples that follow demonstrate each technique in action. Calculate the p-Value from Z-Score in R – Data Science Tutorials Example 1: Convert Specific Columns to Numeric Let’s say we have the R…

Read More “Convert Multiple Columns to Numeric in R” »

R

How to Rank by Group in R?

Posted on July 9July 8 By Admin No Comments on How to Rank by Group in R?
How to Rank by Group in R?

How to Rank by Group in R?, The basic syntax for ranking variables by the group in dplyr is as follows. The examples that follow with the given data frame demonstrate how to utilize this syntax in practice. 5 Free Books to Learn Statistics For Data Science – Data Science Tutorials Let’s create a data…

Read More “How to Rank by Group in R?” »

R

How to Calculate Lag by Group in R?

Posted on July 9July 8 By Admin No Comments on How to Calculate Lag by Group in R?
How to Calculate Lag by Group in R?

How to Calculate Lag by Group in R?, The dplyr package in R can be used to calculate lagged values by group using the following syntax. Subsetting with multiple conditions in R – Data Science Tutorials df %>%   group_by(var1) %>%   mutate(lag1_value = lag(var2, n=1, order_by=var1)) The data frame containing the lagged values gains…

Read More “How to Calculate Lag by Group in R?” »

R

Posts pagination

1 2 … 4 Next
  • Understanding Machine Learning and Data Science
  • Best Git Books
  • Top 5 Books to Learn Data Engineering
  • Mastering R Programming for Data Science: Tips and Tricks
  • R-Change Number of Bins in Histogram
  • About Us
  • Contact
  • Disclaimer
  • Privacy Policy

https://www.r-bloggers.com

  • YouTube
  • Twitter
  • Facebook
  • Course
  • Excel
  • Machine Learning
  • Opensesame
  • R
  • Statistics

Check your inbox or spam folder to confirm your subscription.

  • How to Create a Frequency Table by Group in R
    How to Create a Frequency Table by Group in R? R
  • Check whether any values of a logical vector are TRUE
    Check whether any values of a logical vector are TRUE R
  • How to do Pairwise Comparisons in R?
    How to do Pairwise Comparisons in R? R
  • test for normal distribution in r
    Test for Normal Distribution in R-Quick Guide R
  • How to Visualize PCA Results in R
    How to Visualize PCA Results in R R
  • How to Create Summary Tables in R
    How to Create Summary Tables in R R
  • How to add columns to a data frame in R
    How to add columns to a data frame in R R
  • How to Use Gather Function in R
    How to Use Gather Function in R?-tidyr Part2 R

Privacy Policy

Copyright © 2025 Data Science Tutorials.

Powered by PressBook News WordPress theme