Join Mark Niemann-Ross for an in-depth discussion in this video A matrix of possibilities, part of Code Clinic: R (2015).
- So let's step through my solution…for the eight Queens problem.…Lines one, two, and three are…just simply set up for this situation.…Line two sets a working directory,…and you may want to change that…to reflect your own personal computer.…Line three makes sure that we are sourcing plots…to Queens.R, and in order to do that,…I just simply select that line and hit Run.…And it will go ahead and bring in the code…that belongs to that particular function.…Lines six, seven, and eight…uses a command called expand.grid…to create all of the possible options…for the eight Queens solution.…
Let's take a look at expand.grid real quick.…First of all, the thing that you'll always want to do…anytime you bump into a new command…is pull up the documentation,…so I type in, in the Console,…?e-x-p-a-n-d.g-r-i-d.…And to my right…I see that I have documentation for…expand.grid.…And we can open that up a bit and scroll around.…I'll leave it to you to take a look at that in detail.…But essentially what expand.grid does…is bring up all the possible options…
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.