• 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

R

8 tips to use element_blank() in ggplot2 theme

June 13, 2021 by cmdlinetips

remove ggplot2 elements with element_blank

In this tutorial, we will see examples of using element_blank() to control the look of non-data aspects of a plot made with ggplot2. This is fourth in the series of understanding how to change four different elements of ggplot2’s theme systems. element_text() element_line() element_rect() element_blank() We saw how to use element_text() to change the looks […]

Filed Under: R, R Tips, tidyverse 101 Tagged With: ggplot2 element_blank, R, R Tips

7 Tips to customize rectangle elements in ggplot2 element_rect()

June 7, 2021 by cmdlinetips

Anatomy of Rectangle Elements in ggplot2

Continuing the blog post series on how to control theme elements in ggplot2, in this post we will look at how to customize rectangular elements in ggplot2 using element_rect() function. ggplot2’s theme function helps us fully control the “non-data” elements of a plot made with ggplot2. ggplot2’s theme system comes with multiple element_ functions, element_text() […]

Filed Under: R, R Tips, tidyverse 101 Tagged With: ggplot customize element_rect(), ggplot2, R

Row-wise operations in R: compute row means in tidyverse

June 4, 2021 by cmdlinetips

rowwise operations

This tutorial shows how to perform row-wise operations in R using tidyverse. We will use three key functions, rowwise(), c_across() and rowMeans() to perform to perform row-wise operations on a dataframe. rowwise() and c_across() functions are from dplyr. rowwise() function is available in dplyr 1.0.0+ to perform row-wise operations, like computing row means or other […]

Filed Under: R, R Tips, tidyverse 101 Tagged With: R, R Tips, rowwise operation in tidyverse

How To Compute Column Means in R with tidyverse

June 3, 2021 by cmdlinetips

How to Compute Column Means in R?

In this bite sized post, we will see how to compute column means in R using tidyverse. We will compute column means for a couple of scenarios. First we will see how to compute column means of a dataframe with no missing values. And then we will compute column means with missing values. We will […]

Filed Under: column mean dplyr, dplyr across, R, R Tips, tidyverse 101 Tagged With: R, R Tips

How to Write Functions to Make Plots with ggplot2 in R

May 31, 2021 by cmdlinetips

Scatter Plot with a lot code repetition

Okay here is a confession. Often I preach writing functions to simplify life at work. Although I try to follow the “writing functions” mantra decently, there is a grey area where I don’t use functions that much. Any guesses? Often make tonnes of exploratory plots with ggplot2 with tons of repetition of code with slight […]

Filed Under: functions for ggplot2, glue package, R, R Tips, tidyverse 101 Tagged With: ggplot2, R

  • Page 1
  • Page 2
  • Page 3
  • Interim pages omitted …
  • Page 7
  • 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