Skip to content

Data Science Tutorials

  • Home
  • R
  • Statistics
  • Course
  • Machine Learning
  • Guest Blog
  • Contact
  • About Us
  • Toggle search form
  • How to apply a transformation to multiple columns in R?
    How to apply a transformation to multiple columns in R? R
  • Box Cox transformation in R
    Box Cox transformation in R R
  • How to Create a Frequency Table by Group in R
    How to Create a Frequency Table by Group in R? R
  • How to Scale Only Numeric Columns in R
    How to Scale Only Numeric Columns in R R
  • Convert multiple columns into a single column
    Convert multiple columns into a single column-tidyr Part4 R
  • How to Recode Values in R
    How to Recode Values in R R
  • Check whether any values of a logical vector are TRUE
    Check whether any values of a logical vector are TRUE R
  • Survival Plot in R
    How to Perform a Log Rank Test in R R

Tag: dplyr

How to Scale Only Numeric Columns in R

Posted on August 4August 4 By Jim No Comments on How to Scale Only Numeric Columns in R
How to Scale Only Numeric Columns in R
Tweet
Share
Share
Pin

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 Jim 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
Tweet
Share
Share
Pin

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 Jim No Comments on How to apply a transformation to multiple columns in R?
How to apply a transformation to multiple columns in R?
Tweet
Share
Share
Pin

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 Jim No Comments on How to change the column positions in R?
How to change the column positions in R?
Tweet
Share
Share
Pin

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 Jim No Comments on Subset rows based on their integer locations-slice in R
Subset rows based on their integer locations-slice in R
Tweet
Share
Share
Pin

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 Jim No Comments on How to do Conditional Mutate in R?
How to do Conditional Mutate in R?
Tweet
Share
Share
Pin

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 Jim No Comments on How to Use Mutate function in R
How to Use Mutate function in R
Tweet
Share
Share
Pin

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 Jim No Comments on Convert Multiple Columns to Numeric in R
Convert Multiple Columns to Numeric in R
Tweet
Share
Share
Pin

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 Jim No Comments on How to Rank by Group in R?
How to Rank by Group in R?
Tweet
Share
Share
Pin

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 Jim No Comments on How to Calculate Lag by Group in R?
How to Calculate Lag by Group in R?
Tweet
Share
Share
Pin

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 navigation

1 2 … 4 Next
  • About Us
  • Contact
  • Disclaimer
  • Guest Blog
  • Privacy Policy
  • YouTube
  • Twitter
  • Facebook
  • Tips for Data Scientist Interview Openings
  • What is Epoch in Machine Learning?
  • Dynamic data visualizations in R
  • How Do Machine Learning Chatbots Work
  • Convex optimization role in machine learning

Check your inbox or spam folder to confirm your subscription.

  • Sampling from the population in R
  • Two of the Best Online Data Science Courses for 2023
  • Process of Machine Learning Optimisation?
  • ggplot2 scale in R (grammar for graphics)
  • ggplot aesthetics in R (Grammer of graphics)
  • Load Multiple Packages in R
    Load Multiple Packages in R R
  • Statistical test assumptions and requirements
    Statistical test assumptions and requirements Statistics
  • best books about data analytics
    Best Books About Data Analytics Course
  • sorting in r
    Sorting in r: sort, order & rank R Functions R
  • Gamma distribution in R
    Gamma distribution in R R
  • How to Avoid Overfitting
    How to Avoid Overfitting? Machine Learning
  • How to Standardize Data in R
    How to Standardize Data in R? R
  • How to Use the Multinomial Distribution in R
    How to Use the Multinomial Distribution in R? R

Copyright © 2023 Data Science Tutorials.

Powered by PressBook News WordPress theme