Join Mark Niemann-Ross for an in-depth discussion in this video Understanding countUnique.R, part of Code Clinic: R.
- We're still working on removing rows with conflicts…which is line 17 in the eightQueensBruteForce.R file.…We've already talked about the apply function…which is something built into R,…and we've talked about subsetting of matrices,…the True and False.…Now we're ready to look at countUnique…which is a function that I wrote.…countUnique will perform subsetting for us.…It's fairly intensive because it has a lot of rows…that it needs to approach.…
I've experimented quite a bit with countUnique…and I've timed each function to see how long it takes.…You can see several versions of countUnique…defined in that file.…Let's take a quick look at what system.time actually does.…I have a file here called demo_system.time.R.…I'm going to show the Console…and what we can do is just simply select that file…and then hit Run.…
Now what it will tell us is the user, system,…and elapsed time.…The elapsed time is in seconds and you can see how…it times a function.…So in the Console down below you'll see…system.time(testit(1)).…And you can see that in the source code as line 13.…
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?
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.