R is a statistical programming language that is ideal for analyzing linguistic data. This chapter provides the first stepping stones in writing an R script, including how to work with functions and arguments, as well as with different vector classes. The chapter also introduces the reader to assigning variables in R, and to ways of indexing/subsetting existing R objects. In addition, readers will be introduced to basic logical operations, matrices, data frames, file management, installing and citing R packages, and plotting. After a first look at a cross-linguistic dataset of how linguistic diversity is affected by ecological risk, the chapter concludes with recommendations for how to proceed learning more about R.