Join Mark Niemann-Ross for an in-depth discussion in this video Changes at Lake Pend Oreille, part of Code Clinic: R (2015).
- There was an unexpected change while I was working…on this problem.…The administrator of the Lake Pend Oreille website…changed the format of the data.…My original solution contained all the code necessary…to read the original formatted data,…but when the format changed, I had to refactor my code.…I decided to abstract out the data access…into a separate object, something I should have done…to start with.…I'll show you both solutions.…
This is called refactoring and it's important…that when you do this, the code doesn't change behavior.…The cleanest way to abstract database access…is to create an object with Create, Read, Update,…and Delete functions referred to as CRUD.…R has three types of objects referred to as…S3, S4, and Reference Classes.…I won't go into depth on writing classes,…but I will mention that I created an S3 class.…
In a later video, I'll show you that class in detail.…I also wrote some unit tests…that should produce correct answers.…I also wrote some tests that should fail.…For more details on unit testing,…
Mark introduces challenges and then provides an overview of his solutions in R. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Skill Level Intermediate
Q: R Studio tells me that it can't find files I expect to be available. Where can I find them?
A: Use the setwd() command to set the working directory to match the folder you're working in.
Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for lynda.com members outside of the U.S.
1. Problem One: Statistical Analysis
2. Problem Two: Image Analysis
3. Problem Three: Eight Queens
4. Accessing Peripherals
5. Recursion and Directories
Walking the directory sort code10m 56s
6. Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.