• 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 / R / R Tips / 5 Big Ideas Behind Tidy Evaluation

5 Big Ideas Behind Tidy Evaluation

February 27, 2018 by cmdlinetips

Ever wondered, how easy it is to write dataframe manipulation code without repeating yourself while using dplyr ? For example, if you are filtering a dataframe, you simply write

filter(df, x == 1, y == 2)

instead of writing like this

df[df$x==1, df$y == 1]

where you need to refer the dataframe multiple times and use “$” to access variables in the dataframe.

The reason why dplyr makes it easy for use is dplyr functions evaluate statements in a very different way than your standard R code is evaluated. This evaluation is called non-standard evaluation (NSE) or specifically tidy-eval.

Tidy evaluation comes with a price and tidyverse has the functionality to get around those issues and that is why it is important to understand tidy-eval.

If you feel blown away, the first time you saw tidy-eval, you are not alone. Here is Hadley Wickham going over the 5 big ideas behind the tidy eval in 5 minutes.

If you want more of tidy evaluation, check here

  • https://adv-r.hadley.nz/meta.html
  • http://rlang.tidyverse.org/articles/tidy-evaluation.html
  • Non-standard evaluation, how tidy eval builds on base R

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X

Related posts:

Default Thumbnailggplot2 Version 3.0.0 Brings Tidy Evaluation to ggplot Default ThumbnailWhy can’t ggplot2 use %>% instead of “+”? pivot_longer(): tidyrtidyr’s pivot_longer(): Reshape Wide Data to Long/Tidy Data Default Thumbnail6 Most Useful dplyr Commands to Manipulate a Data Frame in R

Filed Under: R Tips, tidy evaluation, tidyverse Tagged With: R Tips, tidy evaluation, tidy-eval

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