Join Mark Niemann-Ross for an in-depth discussion in this video Testing mouse access, part of Code Clinic: R (2015).
- If you know how to use…the X11 windowing environment,…it's actually pretty easy to get access to the mouse.…The library for R is called tcltk.…Let's take a look at some source code…that uses X11 to give us mouse access.…I'm looking at the showmouse.R file,…which you'll find in the exercise files.…I'm looking at line 7,…and the first thing it says is…let's require tcltk.…So I'm gonna go ahead and run that line…just by clicking on it,…and that loads in a library that will give us access…to the X11 windowing environment.…
Below that is two, three, four, five…lines of code that are actually fairly easy…to connect the mouse to the window.…Let's go ahead and select all of them…and see what actually happens…when I run this.…So I select it and I hit run,…and you'll see that immediately,…in the upper left hand corner,…I have a new window.…That's X11.…And if I move the mouse over to that window…and then click on it with the left mouse,…then move the mouse so you can see…the console is giving me a range of values,…that's XY values of the mouse.…
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?
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.