• 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 Tips

R Tips

10 Tips to customize ggplot2 title text

September 29, 2023 by cmdlinetips

Change title text margin

In this post, we will see 10 tips to annotate a plot with a title and to customize title text of a plot made with ggplot2. We will start with how to add title to a plot made with ggplot2 using two functions ggtitle() and labs(). And then we will learn how to use ggplot2’s […]

Filed Under: R Tips, tidyverse 101 Tagged With: customize ggplot title

PCA on S&P 500 Stock Return Data

January 8, 2023 by cmdlinetips

PCA Plot S&P 500 Data : Highlight Select Sectors

This post is a fun exercise applying PCA (most in tidyverse framework) to stock data from S&P 500 index companies. With PCA on stock data from S&P 500, we can possibly do many interesting things, but we will focus on really simple things and try to see if PCA captures the general company trends from […]

Filed Under: PCA in tidyverse, R, R Tips, tidyverse Tagged With: PCA S&P 500 Stock Data

Linear Regression with Matrix Decomposition Methods

January 2, 2023 by cmdlinetips

Add regression line using coefficients in lm() results

Still remember the first time I learned we can perform linear regression using matrix decomposition techniques like QR decomposition. Totally mind blown. Clearly had no clue that was possible. This is a fun post on performing linear regression using QR decomposition, Cholesky decomposition and Singular Value Decomposition (SVD) using #rstats. No theory behind it, just […]

Filed Under: R, R Tips Tagged With: Linear regression by Cholesky decomposition, linear regression by QR decomposition, linear regression by SVD

PCA in tidyverse framework

December 19, 2022 by cmdlinetips

PCA plot: PC1 vs PC2 - PCA with tidyverse

Performing PCA in tidyverse framework is probably one of my go to approaches for any high-dimensional data. In R, we can easily perform Principal Component analysis (PCA) using prcomp() and a few other options. A common challenge I face is to quickly look at the PCA results using a few different plots. With continual development […]

Filed Under: R Tips, tidyverse 101 Tagged With: PCA in R, PCA with tidyverse

How to make a Calender in R with ggplot2

December 11, 2022 by cmdlinetips

How to make a calendar with ggplot2 in R

In this post, we will see how to make a calendar from scratch using R in ggplot2. I have been wanting to do this for a while. There is no better time to do this as we are at the end of the year 2022. The goal is to make a simple calender for the […]

Filed Under: R, R Tips, tidyverse 101 Tagged With: calendar with ggplot2

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