• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar

Python and R Tips

Learn Data Science with Python and R

  • Home
  • Python
  • Pandas
    • Pandas 101
  • tidyverse
    • tidyverse 101
  • R
  • Linux
  • Conferences
  • Python Books
  • About
    • Privacy Policy
You are here: Home / Archives for R / tidyverse 101

tidyverse 101

tidyr’s pivot_longer(): Reshape Wide Data to Long/Tidy Data

November 22, 2020 by cmdlinetips

pivot_longer(): tidyr

One of the most common activities while doing data analysis is to reshape data from one form to another. For human eyes and data collection, often it is easier to work with data in wider form. However, for analyzing data it is more convenient to have the data in tidy/long form in most circumstances. tidyr, […]

Filed Under: R, tidyverse 101 Tagged With: pivot_longer wide to long, R, tidyverse 101

How To Reshape Tidy Data to Wide Data with pivot_wider() from tidyr

November 18, 2020 by cmdlinetips

Reshaping the data from one for form to another is one of the most common data munging activities. tidyr, R package part of tidyverse, provides core functions to manipulate datasets in wide or long form. In this post, we will see examples of one of tidyr’s core function pivot_wider() to convert data in long tidy […]

Filed Under: R, tidyr pivot_wider(), tidyverse 101 Tagged With: pivot_wider in R

How To Remove Rows with Missing values using dplyr

October 31, 2020 by cmdlinetips

How To Remove Rows With Missing Values with dplyr's drop_na()?

Missing data is a common problem while doing data analysis. Sometimes you might to remove the missing data. One approach is to remove rows containing missing values. In this post we will see examples of removing rows containing missing values using dplyr in R. We will use dplyr’s function drop_na() to remove rows that contains […]

Filed Under: R, tidyverse 101 Tagged With: R

How To Move A Column to the Front with dplyr

October 30, 2020 by cmdlinetips

In this post we will learn how to change column order or move a column in R with dplyr. More specifically, we will learn how to move a single column of interest to first in the dataframe, before and after a specific column in the dataframe. We will use relocate() function available in dplyr version […]

Filed Under: dplyr relocate(), tidyverse 101 Tagged With: Move a column to front, R

4 ways to select columns from a dataframe with dplyr’s select()

October 12, 2020 by cmdlinetips

4 ways to select columns with dplyr select()

dplyr’s select() function is one of the core functionalities of dplyr that enables select one or more columns from a dataframe. With dplyr’s version 1.0.0, select() function has gained new functionalities that makes it easy to select columns in multiple ways. One of the most common ways to select columns is to use their names. […]

Filed Under: dplyr select(), tidyverse 101 Tagged With: dplyr select, select by position, select is.numeric, select starts_with

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Go to Next Page »

Primary Sidebar

Subscribe to Python and R Tips and Learn Data Science

Learn Pandas in Python and Tidyverse in R

Tags

Altair Basic NumPy Book Review Data Science Data Science Books Data Science Resources Data Science Roundup Data Visualization Dimensionality Reduction Dropbox Dropbox Free Space Dropbox Tips Emacs Emacs Tips ggplot2 Linux Commands Linux Tips Mac Os X Tips Maximum Likelihood Estimation in R MLE in R NumPy Pandas Pandas 101 Pandas Dataframe Pandas Data Frame pandas groupby() Pandas select columns Pandas select_dtypes Python Python 3 Python Boxplot Python Tips R rstats R Tips Seaborn Seaborn Boxplot Seaborn Catplot Shell Scripting Sparse Matrix in Python tidy evaluation tidyverse tidyverse 101 Vim Vim Tips

RSS RSS

  • How to convert row names to a column in Pandas
  • How to resize an image with PyTorch
  • Fashion-MNIST data from PyTorch
  • Pandas case_when() with multiple examples
  • An Introduction to Statistical Learning: with Applications in Python Is Here
  • 10 Tips to customize ggplot2 title text
  • 8 Plot types with Matplotlib in Python
  • PCA on S&P 500 Stock Return Data
  • Linear Regression with Matrix Decomposition Methods
  • Numpy’s random choice() function

Copyright © 2025 · Lifestyle Pro on Genesis Framework · WordPress · Log in

Go to mobile version