DSPA: Chapter 1 Foundations of R This chapter introduces the foundations of R programming for
visualization, statistical computing and scientific inference.
Specifically, in this chapter we will (1) discuss the rationale for
selecting R as a computational platform for all DSPA demonstrations; (2)
present the basics of installing shell-based R and RStudio
user-interface, (3) show some simple R commands and scripts (e.g.,
translate long-to-wide data format, data simulation, data stratification
and subsetting), (4) introduce variable…Read moreDSPA: Chapter 1 Foundations of R

This chapter introduces the foundations of R programming for
visualization, statistical computing and scientific inference.
Specifically, in this chapter we will (1) discuss the rationale for
selecting R as a computational platform for all DSPA demonstrations; (2)
present the basics of installing shell-based R and RStudio
user-interface, (3) show some simple R commands and scripts (e.g.,
translate long-to-wide data format, data simulation, data stratification
and subsetting), (4) introduce variable types and their manipulation;
(5) demonstrate simple mathematical functions, statistics, and matrix
operators; (6) explore simple data visualization; and (7) introduce
optimization and model fitting. The chapter appendix includes references
to R introductory and advanced resources, as well as a primer on
debugging. Less…