Analyzing Financial and Economic Data with R (Third Edition)



This book introduces the reader to the use of R and RStudio as a platform for analyzing financial and economic data. The book covers all necessary knowledge for using R, from its installation in your computer to the organization and development of scripts. For every chapter, the book presents practical and replicable examples of R code, providing context and facilitating the learning process.

This is what you’ll learn from this book:

01 - Using R and RStudio

02 - Importing financial and economic data from local files and the internet

03 - Programing with R

04 - Cleaning, structuring and analyzing data with R

05 - Data visualization with R

06 - Reporting your results

07 - Writing better and faster R code

Where to buy it

You can purchase the book from Amazon as an ebook or paperback. An online version of the book, with the first seven chapters is available here.


To cite package ‘afedR3’ in publications use:

Perlin MS (2023). afedR3: Data and Functions for third edition of Book “Analyzing Financial and Economical Data with R”. R package version 0.1,

A BibTeX entry for LaTeX users is

@Manual{, title = {afedR3: Data and Functions for third edition of Book “Analyzing Financial and Economical Data with R”}, author = {Marcelo S. Perlin}, year = {2023}, note = {R package version 0.1}, url = {}, }

Supplement Material

01-Online edition

02-Tutorial on compiling book exercises

03-Book package afedR3 in Github

Installing R and RStudio: |

CRAN pages:

R Views for Finance | R Consortium | Official R Manual | CRAN Policies


Official RMarkdown Tutorial

Creating Packages:

Hadleys Guide for creating packages

R code style:

Google R style guide | Tidyverse style guide

Marcelo S. Perlin
Marcelo S. Perlin
Associate Professor

My research interests include data analysis, finance and cientometrics.

comments powered by Disqus