Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Jonathan Carroll

Rating No ratings yet

Beyond Spreadsheets with R shows you how to take raw data and transform it for use in computations, tables, graphs, and more. You'll build on simple programming techniques like loops and conditionals to create your own custom functions. You'll come away with a toolkit of strategies for analyzing and visualizing data of all sorts using R and RStudio. About the Technology Spreadsheets are powerful tools for many tasks, but if you need to interpret, interrogate, and present data, they can feel like the wrong tools for the task. That's when R programming is the way to go. The R programming language provides a comfortable environment to properly handle all types of data. And within the open source RStudio development suite, you have at your fingertips easy-to-use ways to simplify complex manipulations and create reproducible processes for analysis and reporting. About the Book With Beyond Spreadsheets with R you'll learn how to go from raw data to meaningful insights using R and RStudio. Each carefully crafted chapter covers a unique way to wrangle data, from understanding individual values to interacting with complex collections of data, including data you scrape from the web. You'll build on simple programming techniques like loops and conditionals to create your own custom functions. You'll come away with a toolkit of strategies for analyzing and visualizing data of all sorts. What's inside • How to start programming with R and RStudio • Understanding and implementing important R structures and operators • Installing and working with R packages • Tidying, refining, and plotting your data About the Reader If you're comfortable writing formulas in Excel, you're ready for this book. About the Author Dr Jonathan Carroll is a data science consultant providing R programming services. He holds a PhD in theoretical physics.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A patient, spreadsheet-anchored introduction to R and RStudio that turns Excel habits into reproducible, scriptable data analysis. Read it if you can write formulas in Excel but want to stop clicking your way through data. 【Book Arc】 - **Opening (~0%–10%)**: Frames the world as data sources and positions R/RStudio as the alternative to spreadsheet workflows; sets up the book's conventions (errors, tips, spreadsheet comparisons) and the case for scripts over manual steps. - **Early (~10%–30%)**: Gets you running: installing R and RStudio, working in the Console vs. scripts, using projects to keep contexts separate, and understanding core value types—integers, numerics, characters, factors, and assignment with `<-`. - **Middle (~30%–50%)**: Builds programming fluency: coercion rules, missing values (`NA` vs. `"NA"`), comparisons, and writing your own functions—arguments, defaults, scope, and recursion—while learning to read help files critically. - **Late (~50%–80%)**: Moves from single values to collections and data structures, then to tidying, refining, and plotting data; excerpts do not cover the exact chapter sequence here. - **Ending (~80%–100%)**: Culminates in applied wrangling—including data scraped from the web—and a reusable toolkit for analysis and reporting; excerpts do not detail the final chapters. 【Key Takeaways】 - **Scripts beat clicks for reproducibility** (Early): A script is a log of exactly what you told the computer to do, so you—and others—can re-run the same analysis and reach the same conclusions. - **RStudio projects isolate your work** (Early): Each project keeps its own files, pane layout, and R session, so a finance analysis won't collide with a mapping visualization. Start every distinct context in a new project. - **R is command-based, not menu-based** (Early): You work with expressions that operate on data and store results, a mental shift from Excel's button menus and automatic recalculation. - **Variables don't auto-update like spreadsheet cells** (Early): Assigning `a1 + a2` to a new variable captures a value at that moment; changing `a1` later does not ripple through. This trips up spreadsheet users. - **Types and coercion follow a specificity order** (Middle): R coerces toward the more general structure (e.g., integer + numeric yields numeric), and `as.integer()` rounds toward zero—a behavior to verify, not assume. - **`NA` is not the string `"NA"`** (Middle): Missing values propagate differently; use `is.na()` for testing, and note quirks like `paste()` converting missing values to the literal text "NA". - **Functions are named shortcuts** (Middle): Defining `areaCircle(radius)` abstracts a calculation so you don't rewrite the formula; results print but aren't stored unless you assign them. - **Read the help file for every function at least once** (Middle): Argument names and defaults differ surprisingly—`sum(1,2,3,4)` works, but `mean(1,2,3,4)` returns 1 because `mean()` expects a vector in `x`. 【Reading Tips】 - Deep-read the early chapters on types, assignment, and coercion; these are the foundation for every later error message you'll debug. - Skim the philosophical opening about "the world as data" and move quickly to the hands-on Console and script sections. - Treat the spreadsheet comparisons as your translation layer—when R behaves unlike Excel, slow down and note the difference. - Type every code block yourself, including the ones that produce errors; the book deliberately shows error output so you learn to recognize it. - When a function surprises you, check its help page before assuming a bug—argument order and defaults are the usual culprits. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book in detail; later chapters on data structures, tidying, plotting, and web scraping are referenced but not deeply represented, so specifics there are inferred from the book's stated scope.
Excerpt 1
rvices. He holds a PhD in theoretical physics. FORMATTING New terms and definitions are shown in italics when they are first mentioned. Code samples and data...
View in text
Excerpt 2
u can close R or RStudio and reopen it. But if you’re using RStudio, a faster option is to press CtrlShiftF10, which will instruct RStudio to restart the ses...
View in text
Excerpt 3
that it will round toward zero. What about some other types? What about requesting the integer version of a character string involving a negative sign and so...
View in text
Excerpt 4
 the language. One is the fact that if you supply enough of just discussed; variables and functions could very well be defined outside of the function you’re...
View in text
Excerpt 5
ne fish" = "red", "two fish" = "blue") #> one fish two fish #>    "red"   "blue" If you fail to name some elements (by not providing an argument name), then ...
View in text
Excerpt 6
o with the following: vec[2] < 99 vec #> [1] 21 99 25 27 29 Note that evaluating the assignment operator still produces no output in the Console, 3 so rememb...
View in text
Excerpt 7
r when certain package functions expect data in this format. A group of widely used packages adopts and expects this tidy principle when using the majority o...
View in text
Excerpt 8
he mtcars data set to a .csv file with the following: write.csv(mtcars, file = "mtcars.csv") By default, this writes the row.names to the file also. In the c...
View in text
Tags
AI categories
Programming LanguageDataEducation
ISBN: 1617294594
Publish Year: 2018
Language: English
Pages: 470
File Format: PDF
File Size: 12.1 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…