Join Mark Niemann-Ross for an in-depth discussion in this video Using colons to define a range of numbers, part of Code Clinic: R.
- On line 22 through 28, we're going to check…to see if there's actual data for this range.…Let's take a look at line 24.…You'll notice that it's using as.character and c and year.…The best way to do this…is to break it down into small parts.…Let's start with the c command-- c(year(the.start.date.…And what year(the.start.date does,…it's a lubridate command…to pull the year from the start date.…
So in this case, if our start date…was fed to us as 20110503,…then year(the.start.date will return 2011.…Starting at line 22 and going to line 28,…we want to check to make sure there's actually data…for the range of dates we've requested.…Since this is our first run at R,…let's break down line 24 into smaller parts…and step through what it's actually doing.…To do that, I'll open up the console a bit…so we can see what's happening here.…
And the first thing I want to do is start on the inside.…I'm gonna start with year(the.start.date.…Now this implies that I have some value in start date,…so let's go ahead and do that.…the.start.date, and I'm going to assign it 20110503.…
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.
R Statistics Essential Trainingwith Barton Poulson5h 59m Intermediate
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?
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.