Get started with an accelerated introduction to the R ecosystem, programming language, and tools including R script and RStudio. Utilizing many examples and projects, this book teaches you how to get data into R and how to work with that data using R. Once grounded in the fundamentals, the rest of Practical R 4 dives into specific projects and examples starting with running and analyzing a survey using R and LimeSurvey. Next, you'll carry out advanced statistical analysis using R and MouselabWeb. Then, you'll see how R can work for you without statistics, including how R can be used to automate data formatting, manipulation, reporting, and custom functions.
The final part of this book discusses using R on a server; you'll build a script with R that can run an RStudio Server and monitor a report source for changes to alert the user when something has changed. This project includes both regular email alerting and push notification. And, finally, you'll use R to create a customized daily rundown report of a person's most important information such as a weather report, daily calendar, to-do's and more. This demonstrates how to automate such a process so that every morning, the user navigates to the same web page and gets the updated report.
You will: - Set up and run an R script, including installation on a new machine and downloading and configuring R
- Turn any machine into a powerful data analytics platform accessible from anywhere with RStudio Server
- Write basic R scripts and modify existing scripts to suit your own needs
- Create basic HTML reports in R, inserting information as needed
- Build a basic R package and distribute it
Autorentext
Jon Westfall is an award-winning professor, published author, and practicing cognitive scientist. He teaches a variety of courses in psychology, from introduction to psychology to upper-level seminars. His current research focuses on the variables that influence economic and consumer finance decisions, and the retention of college students. With applications to both psychology and marketing, his work finds an intersection between basic and applied science. His current appointment is as an assistant professor of psychology, coordinator of the first year seminar program, and coordinator of the Okra Scholars program at Delta State University. Previously he was a visiting assistant professor at Centenary College of Louisiana, and the associate director for research and technology at the Center for Decision Sciences, a center within Columbia Business School at Columbia University in New York City. He now maintains a role with Columbia as a research affiliate and technology consultant.
In addition to his research, Dr. Westfall also has career ties in information technology, where he has worked as a consultant since 1997, founding his own firm, Bug Jr. Systems. As a consultant he has developed custom software solutions (including native Windows 32 applications, Windows .NET applications, Windows Phone 7 and Android mobile applications, as well as ASP, ASP.NET, and PHP web applications). He has also served as a senior network and systems architect and administrator (on both Windows and Unix networks, and hybrids) and has also been recognized as a Microsoft Most Valuable Professional (MVP) 2008 2012. He has authored several books, and presented at academic as well as technology conferences and gatherings.
Inhalt
Chapter 1: Getting Up and Running with R
Chapter 2: Getting Data into R
Chapter 3: Project 1: Launching, Analyzing, and Reporting a Survey using R and LimeSurvey
Chapter 4: Project 2: Advanced Statistical Analysis using R and Mouselab Web
Chapter 5: R in Everyday Life
Chapter 6: Project 3: The R Form Mailer
Chapter 7: Project 4: The R Powered Presentation
Chapter 8: R Anywhere
Chapter 9: Project 5: The Change Alert!
Chapter 10: Project 6: The R Personal Assistant
DETAILED VIEW BELOW
Chapter 1: Getting Up and Running with R
Chapter Goal:
•Explain what R is, and what R isn't
•Explain the R landscape it's open source nature and the various ways people use it.
•Explain how R is installed, what types of systems it runs on, and how the user interacts with it.
•Explain the basic R script, running basic commands in R (e.g., a Hello World) and basic computations.
Chapter 2: Feed the Beast: Getting Data into R
•Explain the different types of data that R can work with, and how that data is stored.
•Explain the basics of connecting R to flat files, database files, database servers, and published data on the internet.
•Give examples for downloading data directly from Google Sheets, websites, and more directly from R.
•Give examples of basic data scraping with R.
•Explain writing of data objects to native RData format as well as other formats for interchangeable use.
Chapter 3: Recipe 1: Launching, Analyzing, and Reporting a Survey using R and LimeSurvey
•Explain a real-world scenario: A survey project applicable to market research.
•Discuss an open-source tool, LimeSurvey, that can be used to create a survey, collect responses, and download those responses into R.
•Bring the data into R and run basic summary statistics on the data.
•Take those analyses farther into inferential statistics (Linear Regression).
Chapter 4: Recipe 2: Advanced Statistical Analysis using R and Mouselab Web
•A deeper data scenario than Chapter 3 discussing how Mouselab Web (an open source tool) can be used to track how people view products and services and make decisions.
•Introduces advanced statistical design using Linear Mixed-methods regressions.
•Also introduces the idea of R packages, and the perils of using packages (e.g., concerns over future-proofing). This chapter is a very deep concept that will be presented accessibly, so that readers learn the takeaways regarding how R works and how to futureproof your R projects, but also get a bit of a unique project applicable to psychology and market research.
Chapter 5: R in Everyday Life
•Perhaps you're not a statistician, you just want R to be useful to you in your job. This chapter discusses how R can be used to automate
oData formatting
oData manipulation
oData reporting
•This chapter also talks about how users can write custom functions in R to speed up their workflows.
•Finally this chapter talks about how to export results from R into common desktop software such as Microsoft Office.
Chapter 6: Recipe 3: The R Form Mailer
•Mail Merge is a great tool in Microsoft Office, but it's entirely graphically driven point and click, drag and drop. What if you could script it?•This recipe discusses scripting a Mail Merge type activity sending custom emails with report information directly from R through an email server.
•Along the way we learn a bit more about data manipulation by taking long format data (sales figures) and calculating salesmen commissions, then providing a report to each salesperson in their email.
Chapter 7: Recipe 4: The R Powered Presentation
•Discusses a real-world scenario where a presentation must be given that includes real-time data collection.
•Participants during the presentation can take a quick survey (Using Google Forms), which will t…