Featured Posts

This post is part of a series of "learning everything with R: An R book list". You can clink on this link to see other relevant posts.

RStudio probably is the most popular interface to use R. But it definitely does not just serve as a code editor (thanks to the RStudio team!). Its ability has been extended so much beyond what we can think of. In this post, we would like to tell you how we can extend RStudio to do much more than just R programming and code editing. Best of it, there have been books coming out to provide you with step-by-step procedures. Let's see what they are!

Writing publications with RStudio

RStudio has implemented markdown (so-called R markdown when used in RStudio) in their interface to weave together narrative text and code. This makes RStudio capable of producing elegantly formatted static and dynamic output formats including HTML, PDF, MS Word, Beamer, HTML5 slides, Tufte-style handouts, books, dashboards, shiny applications, scientific articles, web sites, and more. Yihui Xie, the main R markdown relevant package developer, has written several books as follows about how to use R markdown to write your own publication with RStudio.


Book Cover Extracted summary
Book Title:
Dynamic Documents with R and knitr

Author: Yihui Xie
This book makes writing statistical reports easier by integrating
computing directly with reporting. Reports range from homework,
projects, exams, books, blogs, and web pages to virtually any
documents related to statistical graphics, computing, and data analysis.
Book Title: bookdown:
Authoring Books and Technical Documents with R Markdown

Author: Yihui Xie
This book introduces bookdown to make your workflow of writing
books technically easy, visually pleasant to view, fun to interact
with the book, convenient to navigate through the book, and
straightforward for readers to contribute or leave feedback to
the book author(s).


Doing version control: Connecting to Github with RStudio

Github has been a very popular tool for doing version control when writing your own R packages. Rather than using the desktop version of Github, RStudio actually can do this within its interface without installing other software. You can find how in the following books. You should also notice that the following books do not focus on teaching you how to do version control with RStudio but they contain at least a chapter to teach you that. A cheat sheet from RStudio also gives you a quick overview on version control with Git or SVN.


Book Cover Extracted summary
Book Title: R packages
Author: Hadley Wickham
This book shows you how to bundle reusable R functions, sample
data, and documentation together by applying author Hadley
Wickham’s package development philosophy. See Chapter 13
for reading version control with RStudio.
Book Title: Mastering RStudio
Develop, Communicate, and Collaborate with R
Author: Julian Hillebrand, Maximilian H. Nierhoff
This book teaches you how to collaborate with others including
exploring how to use Git and GitHub and how to build your own
packages to ensure top quality results. See Chapter 8 for
reading version control with RStudio.
Book Title: Reproducible Research with R and R Studio, Second Edition
Author: Christopher Gandrud
This book brings together the skills and tools needed for doing
and presenting computational research. Using straightforward
examples, the book takes you through an entire reproducible research
workflow. See Chapter 5 for reading version control with RStudio.


Making web applications with RStudio

Finally, RStudio offers a very unique tool that greatly helps increase users in R: Shiny, which turns your statistics analysis into interactive web applications. Statistics is not just math or coding but vivid visualization through a simple click-and-point on your device. The following books might help build a good foundation for using Shiny.


Book Cover Extracted summary
Book Title: Web Application Development with R using Shiny (2nd)
Author: Chris Beeley
This book will guide you through basic data management and
analysis with R through your first Shiny application, and
then show you how to integrate Shiny applications with your
own web pages.
Book Title: Learning Shiny
Author: Hernán G. Resnizky
This book walks you through the integration of Shiny with R
in general and view the different visualization possibilities
out there. Finally, you will put your skills to the test and
create your first web application!


Notice that the information above is directly collected from the publisher or author's website and we just summarize it for you. Further details about these books can be assessed by clicking the book title links to the book publisher.

This book list will continuously be updated. If you read this post via R Blogger, remember to go to original post for updates.

Happy learning R and hope you enjoy the book list above! You are welcome to leave comments about what we missed about the book list or the ability that RStudio can extend.

Page last updated on 18 Dec. 2016.


This post is part of a series of "learning everything with R: An R book list". You can clink on this link to see other relevant posts.

Despite R's popularity, it is still very daunting to learn R as R has no click-and-point feature like SPSS and learning R usually takes lots of time. No worries! As self-R learner like us, we constantly receive the requests about how to learn R. Besides hiring someone to teach you or paying tuition fees for online courses, our suggestion is that you can also pick up some books that fit your current R programming level. Therefore, in this post, we would like to share some good books that teach you how to learn programming in R based on three levels: elementary, intermediate, and advanced levels. Each level focuses on one task so you will know whether these books fit your needs. While the following books do not necessarily focus on the task we define, you should focus the task when you reading these books so you are not lost in contexts.

Elementary level: Books introducing R

At this level, I am expecting that you have very limited experience in using R or have forgotten how to use it. You should focus on familiarizing yourself with R instead of learning programming at this stage. From our teaching R experience, a great start is to learn R with something that you are familiar with. If you are not a statistics student or graduate, you probably learn statistics from using software like Excel, SPSS, STATA, SAS, Matlab...etc. The following books will help convert your knowledge to learning R.


R books for other statistical software users
Book Cover Extracted summary
Book Title: R for Excel Users:
An Introduction to R for Excel Analysts

Author: John Taveras
This book is for beginners, and the goal is to get you started.
R is known to have a steep learning curve, but I really think
it has three separate curves: (1) data management, (2)
statistics and (3) visualization.
Book Title: R for Microsoft® Excel Users:
Making the Transition for Statistical Analysis

Author: Conrad Carlberg
This book reviews how to perform key tasks in Excel, and then
guides you through reaching the same outcome in R—including
which packages to install and how to access them.
Book Title: R Through Excel:
A Spreadsheet Interface for Statistics, Data Analysis, and Graphics

Author: Heiberger, Richard M., Neuwirth, Erich
This book builds on RExcel, a free add-in for Excel that can
be downloaded from the R distribution network. RExcel seamlessly
integrates the entire set of R's statistical and graphical methods
into Excel
Book Title: SAS and R:
Data Management, Statistical Analysis, and Graphics

Author: Ken Kleinman and Nicholas J. Horton
This book explains how to easily perform an analytical task in
both SAS and R, without having to navigate through the extensive,
idiosyncratic, and sometimes unwieldy software documentation.
The book also covers many common tasks.
Book Title: R for SAS and SPSS Users
Author: Muenchen, Robert A
This book introduces R using SAS and SPSS terms with which you are
already familiar. It demonstrates which of the add-on packages are
most like SAS and SPSS and compares them to R's built-in functions.
Book Title: R for Stata Users
Author: Muenchen, Robert A., Hilbe, Joseph M.
This book introduces R using Stata terminology with which you are
already familiar. It steps through more than 30 programs written
in both languages, comparing and contrasting the two packages'
different approaches.
Book Title: R and MATLAB
Author: David E. Hiebeler
This book is designed for users who already know R or MATLAB and
now need to learn the other platform. The book makes the transition
from one platform to the other as quick and painless as possible.
Book Title: Python for R Users
Author: Ajay Ohri
This book is the first of its kind to provide a reference that enables
students and practitioners to easily learn to code in Python if they are
familiar with R and vice versa, even if they are beginners in the second
language. It also provides a detailed introduction and overview of each
language to the reader who might be unfamiliar with the other.


Another way to leverage your knowledge is by using your field knowledge like finance, economics, education...et al. You can find those books in my another post here.

Intermediate level: Books instructing you how to write functions



Books instructing you how to write functions
Book Cover Extracted summary
Book Title: Hands-On Programming with R:
Write Your Own Functions and Simulations

Author: Garrett Grolemund
This book teach you to learn how to load data, assemble
and disassemble data objects, navigate R’s environment
system, write your own functions, and use all of R’s
programming tools.
Book Title: The R Software:
Fundamentals of Programming and Statistical Analysis

Author: Pierre Lafaye de Micheaux, Rémy Drouilhet, Benoit Liquet
This book is presented so as to be both comprehensive
and easy for the reader to use. Besides its application
as a self-learning text, this book can support lectures
on R at any level from beginner to advanced
Book Title: Art of R Programming
Author: Norman Matloff
This book takes you on a guided tour of software
development with R, from basic types and data structures to
advanced topics. No statistical knowledge is required,
and your programming skills can range from hobbyist to pro.
Book Title: Software for Data Analysis
Programming with R

Author: Chambers, John
This book guides the reader through programming with R,
beginning with simple interactive use and progressing by
gradual stages, starting with simple functions.
Book Title: Introduction to Scientific Programming and
Simulation Using R

Author: Owen Jones et al.
This book introduces scientific programming and stochastic
modelling in a clear, practical, and thorough way. Readers
learn programming by experimenting with the provided R code
and data.


Advanced level: Books teaching you how to write packages and extend R

If you have read all the books above or written some R functions, why not starting to write your own packages? Making packages is a great way to share your code and most importantly you will learn how to document your code. If you would like to see a quick tutorial post on how to learn writing R packages, we also recommend Karl Broman's R package primer . The following book list starts with Hadley Wickham's R packages which provides detailed step-by-step procedures to build your very first own package. Once you finish reading Hadley's R packages, you can read Hadley's R packages and Richard's Testing R Code to test and improve your package.

If you want to extend R, other two books will equip you with great programmer tools and knowledge. The book,Advanced R Data Programming and the Cloud , will teach you how to connect R to databases such as SQLite, PostgeSQL, and MongoDB. John's Extending R will demonstrate how to incorporate a new structure for interfaces applicable to a variety of languages such as Python, Julia, and C++.


Books teaching you how to write packages
Book Cover Extracted summary
Book Title: R packages
Author: Hadley Wickham
This book shows you how to bundle reusable R functions, sample
data, and documentation together by applying author Hadley
Wickham’s package development philosophy.
Book Title: Advanced R
Author: Hadley Wickham
This book presents useful tools and techniques for attacking many
types of R programming problems, helping you avoid mistakes and
dead ends. With more than ten years of experience programming in R,
the author illustrates the elegance, beauty, and flexibility in R.
Book Title: Testing R Code
Author: Richard Cotton
Run-time testing with assertive
Development-time testing with testthat
Writing easily maintainable and testable code
Integrating testing into your packages
Book Title: Advanced R
Data Programming and the Cloud
Author: Matt Wiley and Joshua F. Wiley
This book will show you how to manipulate data in modern R
structures and includes connecting R to data bases such as
SQLite, PostgeSQL, and MongoDB. The book closes with a
hands-on section to get R running in the cloud.
Book Title: Extending R
Author: John M. Chambers
This book covers key concepts and techniques in R to support
analysis and research projects. It presents the core ideas of R,
provides programming guidance for projects of all scales, and
introduces new, valuable techniques that extend R.


Notice that the information above is directly collected from the publisher website and we just summarize it for you. Further details about these books can be assessed by clicking the book title links to the book publisher.

This book list will continuously be updated. If you read this post via R Blogger, remember to go to original post for updates.

Happy learning R and hope you enjoy the book list above!

Page last updated on 18 Dec. 2016.



本文摘述我們與現任國家教育研究院 院長許添明教授、國立東華大學教授吳新傑於台灣一級期刊刊登的結果,主要在討論台灣教育經費適足性的問題,藉由適足性理論去探討是否台灣偏遠地區學校比非偏遠學校需要更多經費。

主要研究發現有以下五點
1. 台灣國際成績表現(PISA)亮眼但城鄉差距拉大:大城市的分數最高且標準差相對較小,而偏遠地方分數較低且標準誤相對較大
2. 平均來說,偏遠地區學生國文、數學基測成績至少低於非偏遠學生10分以上
3. 偏遠地區所需的適足經費,無論是以學生學習成就達基礎級、平均數、精熟級來推估,都一致地高於非偏遠地區所需經費
4. 偏遠地區的教師流動率是非偏遠地區的一倍(6.50% vs. 3.36%)
5. 教師流動率每增加1個百分點,每生支出就會提高0.55%,說明學校因教師流動頻繁將帶來額外支出

研究資料係於 2010 年下半年採用問卷調查取得,針對偏遠與非偏遠國中進行抽測,係採兩階段分層隨機抽樣。依據教育部統計處當時最新的資料,並排除上述四類國中後,公立國中為 706 所,其中偏遠學校扣除掉當時尚未開始招生的南平國中後,總數為 203所,偏遠學校全部施測,非偏遠學校則抽對等數量,即 203 所來施測。

以下專注於用適足性理論去估算偏遠與非偏遠學校適足經費的差異,此乃使用成本函數法估算回歸式,再代入三種適足分數(基礎級、平均數與精熟級),其他變項則帶入各地區之平均值。結果可摘要如下表所示,可知適足經費會隨著適足成績的提升(從基礎級到精熟級)而升高,且不論適足分數是以基礎級、平均數還是以精熟級計算偏遠地區地所需適足經費皆會高於非偏遠地區,也高於臺灣的適足經費,以適足分數等於平均數為例,偏遠地區所需的每生適足經費為 129,687元,不僅高於非偏遠地區( 83,480 元)、也高於臺灣適足經費( 102,784 元),但仍低於偏遠地區的平均值( 134,920 元);且高達 65% 的偏遠學校未達偏遠地區適足經費水準,不僅高於臺灣整體( 60% ),更高於非偏遠地區的( 44% )未達適足經費水準,顯示在現有的經費下,僅有達 35% 的偏遠地區學校可幫助學生達到臺灣的平均基測數學成績。



由結果可知,偏遠地區所需的適足經費,無論是以學生學習成就達基礎級、平均數、精熟級來推估,都一致地高於非偏遠地區所需經費。以平均數作為適足分數為例,偏遠地區所需的每生適足經費高於非偏遠地區約 4.5 萬元( 129,687 元 vs. 83,480 元),且目前偏遠地區達到適足經費的比率又比非偏遠地區低了近兩成( 35% vs. 56% ),即使考慮學校效率,偏遠地區學生為達基測平均數需要更多經費的結果仍未改變,這很可能是導致臺灣 PISA 數學表現城鄉落差的主因。顯示偏遠地區學校亟需政府挹注更多的經費。

全文可於此期刊網站免費下載觀看,該期刊文章引註格式為
張良丞、許添明、吳新傑 (2016)。國民中學適足教育經費:台灣偏遠與非偏遠地區學校的比較。教育科學研究期刊, 61(3), 43-67。 doi: 10.6209/JORIES.2016.61(3).02




This post is part of a series of "learning everything with R: An R book list". You can clink on this link to see other relevant posts.

As R is more and more popular in the industry as well as in the academics for analyzing financial data. For people unfamiliar with R, this post suggests some books for learning financial data analysis using R. From our teaching and learning R experience, the fast way to learn R is to start with the topics you have been familiar with. Thus, the book list below suits people with some background in finance but are not R user. These books below will provide useful guidance for your R learning journey. Try to read and compare these books to find what really fits you.

Fundamental theories: Time series modeling with R


Book Cover Extracted summary
Book Title: Time Series Analysis and Its Applications
With R Examples

Author: Shumway, Robert H., Stoffer, David S.
This book presents a balanced and comprehensive
treatment of both time and frequency domain methods
with accompanying theory. Theory and methodology
are separated to allow presentations on different levels.
Book Title: Applied Time Series Analysis with R
Author: Wayne A. Woodward, Henry L. Gray, Alan C. Elliott
This book includes examples across a variety of fields,
develops theory, and provides an R-based software
package to aid in addressing time series problems
in a broad spectrum of fields.
Book Title: Analyzing Financial Data and
Implementing Financial Models Using R

Author: Clifford Ang
This book teaches students how to use R to analyze
financial data and implement financial models from
start (e.g., obtaining data) to finish (e.g.,
generating output expected for a particular analysis)
using real-world data
Book Title: Practical Time Series Forecasting with R:
A Hands-On Guide

Author: Galit Shmueli and Kenneth C. Lichtendahl
This book providea an applied approach to time-series
forecasting which is an essential component of predictive
analytics. This book also introduces popular forecasting
methods and approaches used in a variety of business applications.
Book Title: Modeling Financial Time Series with S-PLUS®
Author: Eric Zivot and Jiahui Wang
This book represents an integration of theory, methods
, and examples using the S-PLUS statistical modeling
language and the S+FinMetrics module to facilitate the
practice of financial econometrics. This is the first
book to show the power of S-PLUS for the analysis of
time series data.
Book Title: Time Series Analysis With Applications in R
Author: Jonathan D.Cryer and Kung-Sik Chan
This book presents an accessible approach to understanding
time series models and their applications. The new edition
devotes two chapters to the frequency domain
and three to time series regression models, models for
heteroscedasticity, and threshold models.
Book Title: Statistics and Data Analysis for Financial Engineering
Author: David Ruppert and David S. Matteson
This book contains an ideal blend of innovative
research and practical applications, tackles
relevant investor problems, and provides a
multi-disciplined approach, solving problems
from both fundamental and non-traditional methods
Book Title: Financial Analytics with R
Author: David Ruppert and David S. Matteson
This book give examples using financial markets and
economic data to illustrate important concepts.
R Labs with real-data exercises give students practice
in data analysis.
Book Title: R in Finance and Economics
Author: Abhay Kumar Singh and David E Allen
This book provides an introduction to the statistical software
R and its application with an empirical approach in finance
and economics. It is specifically targeted towards undergraduate
and graduate students. It provides beginner-level introduction
to R using RStudio and reproducible research examples.
Book Title: An Introduction to Analysis of Financial Data with R
Author: Ruey S. Tsay
This book explores basic concepts of visualization of financial
data. Through a fundamental balance between theory and
applications, the book supplies readers with an accessible approach
to financial econometric models and their applications to
real-world empirical research.
Book Title: Statistical Analysis of Financial Data in R
Author: René Carmona
Although there are many books on mathematical finance, few deal
with the statistical aspects of modern data analysis as applied
to financial problems. This textbook fills this gap by addressing
some of the most challenging issues facing financial engineers. It
shows how modern statistical techniques can be used in
the solutions of concrete financial problems.
Book Title: Multivariate Time Series Analysis
Author: Ruey S. Tsay
This book is the much anticipated sequel coming from one of
the most influential and prominent experts on the topic of time
series. Through a fundamental balance of theory and methodology,
the book supplies readers with a comprehensible approach to
financial econometric models and their applications to real-world
empirical research.
Book Title: Computational Finance
Author: Argimiro Arratia
This book teaches you how to use the statistical tools
and methods available in the free software R, for
processing and analyzing real financial data
Book Title: Forecasting: principles and practice
Author: Rob J Hyndman and George Athana­sopou­los
This textbook provides a comprehensive introduction to
forecasting methods and presents enough information about
each method for readers to use them sensibly.


Practice: Trading, option pricing, and portforlio optimization with R


Book Cover Extracted summary
Book Title: Automated Trading with R
Quantitative Research and Platform Development

Author: Christopher Conlan
This book has full source code and step-by-step
explanation for plug-and-play trading platform.
Platform can be used in brokerage-level simulation
or production before reading every chapter
Book Title: Option Pricing and Estimation of Financial Models with R
Author: Stefano M. Iacus
This book presents inference and simulation of stochastic process
in the field of model calibration for financial times series
modelled by continuous time processes and numerical option pricing.
It also introduces the bases of probability theory and goes on to
explain how to model financial times series with continuous models.
Book Title: Quantitative Trading with R
Author: Georgakopoulos, H.
This book offers a winning strategy for devising
expertly-crafted and workable trading models using
the R open source programming language, providing
readers with a step-by-step approach to understanding
complex quantitative finance problems and building
functional computer code.
Book Title: Mastering R for Quantitative Finance
Author: Edina Berlinger et al.
This book is organized as a step-by-step practical guide to
using R. Starting with time series analysis, you will also
learn how to forecast the volume for VWAP Trading.
Among other topics, the book covers FX derivatives,
interest rate derivatives, and optimal hedging.
Book Title: Numerical Methods and Optimization in Finance
Author: Manfred Gilli et al.
This book describes computational finance tools.
It covers fundamental numerical analysis and
computational techniques, such as option pricing,
and gives special attention to simulation
and optimization.
Book Title: Tools for Computational Finance
Author: Seydel, Rüdiger
This book covers on an introductory level the very
important issue of computational aspects of
derivative pricing.
Book Title: Financial Risk Forecasting
Author: Jon Danielsson
This book is a complete introduction to practical
quantitative risk management, with a focus on market
risk. It brings together the three key disciplines
of finance, statistics and modeling (programming)
Book Title: Financial Risk Modelling and Portfolio
Optimization with R, 2nd Edition

Author: Bernhard Pfaff
This book is a great collection of many R finance
package introductions. It will be especially useful
for the experienced financial data analysts. It also
provides a plethora of R code examples



Notice that the information above is directly collected from the publisher website and we just summarize it for you. Further details about these books can be assessed by clicking the links to the book publisher. If you would like to get a quick review of financial data analysis using R, see our recent presentation here.

Finally, since more and more books are published these years to address using R in financial data analysis, the book list above might not be comprehensive. You are very welcome to leave the comments below to tell us what we missed. We will try to add them to the list ASAP!

Page last updated on 25 Nov. 2016.