[R-SIG-Mac] R-app for naive users

Andrew Beckerman a.beckerman at sheffield.ac.uk
Fri Mar 26 10:32:34 CET 2010


Ruth -

We teach R cross platform to undergraduates and post-graduates.  The instructors use macs and the students are stuck with PC's.  One of the ways we standardise the behaviour of the platforms is to require that students use a script.  We don't allow cut and paste, and we don't allow typing in the console.  In doing so, the students get into a good habit of creating the retrievable, repeatable, archived, shareable across platform, and annotated history of what they have done - even getting examples from the help files is integrated into a script for learning.

Of course, default scripting via the Windows installation is not as nice as the mac, which, depending on your skills is not as nice for some as using emacs or other unixy editors.  Regardless, the script makes things more standard. On both PC's and mac's, the File->New Script / Save Script etc works well.  

As for help files, we teach ?, ?? and help.start() as the core methods for examining help.  No matter what platform you are on, these work.  The students must understand what a package is, where they are stored and how to examine help files in them (and particularly when you can and cannot do it).  Again, teaching cross platform, rather than platform dependent features, goes a long way to establishing good practice - we find that students are quite computer literate and eventually find the platform independent tricks as they go along.

As for typing q() in the console of R.app on a mac, it seems to work just fine - like the unix installs, it asks whether you want to save the workspace image, and then quits.  apple(command)-Q works well too - like a mac application, and is sensitive to open scripts and consoles.

And if you do copy and paste examples into the console, then on the mac, you can, as I think someone earlier pointed out, simply use the mouse to go to the location you want to edit.  Yes, it is different than the PC.  Yes, it will run the block again.  But we aim to minimise these issues by not actually using them.

Finally, as the most recent post pointed out, there are cross-platform GUI - if you are committed to making the students interface with a GUI exactly the way you do, then a cross platform one is probably useful from a teaching perspective.

Hope this helps.
Andrew

++++++++++++++++++++++++++++++++++++
Dr. Andrew Beckerman
Department of Animal and Plant Sciences
University of Sheffield
Sheffield S10 2TN
UK

a.beckerman at sheffield.ac.uk
http://www.beckslab.staff.shef.ac.uk



On 26 Mar 2010, at 08:15, ian fellows wrote:

> Ruth,
> 
> One option is to go with the platform independent JGR GUI. I've made some one-step installers, which are available at: http://www.deducer.org/pmwiki/index.php?n=Main.DownloadingAndInstallingDeducer
> 
> The installers also install R, JGR and the Deducer package which you may (or may not) be interested in from a teaching perspective.
> 
> 
> Cheers,
> Ian
> 
> 
> 
> 
> On Mar 25, 2010, at 6:30 PM, Ruth M. Ripley wrote:
> 
>> David,
>> 
>> Many thanks for your helpful comments.
>> 
>> I am still struggling to get consistent behavior from the Mac. For myself
>> I think I will stick to R in the terminal as that works more or less
>> platform independently.
>> 
>> For my students, I will just warn them not to expect the R.app to work at
>> all like the RGui which I demo. Since I do not really know which
>> differences are features and which are likely to alter, I don't think it
>> worth my while reseaching and teaching many details.
>> 
>> The cut and paste problem: I have a habit of wanting to alter and rerun
>> just one line of a pasted block. But that's probably just what has been
>> convenient for me up to now.
>> 
>> As for libraries, I don't even know what a framework tree is yet. I will
>> have to find out...
>> 
>> Regards,
>> 
>> Ruth
>> 
>> On Wed, 24 Mar 2010, David Winsemius wrote:
>> 
>>> 
>>> On Mar 7, 2010, at 5:29 PM, Ruth M. Ripley wrote:
>>> 
>>>> I have just begun to use a Mac after teaching R (with my students
>>>> officially Windows users) for a while. It seems that the gui works
>>>> differently from that on Windows. In particular, I quote from Simon on
>>>> r-sig-mac
>>>> 
>>>> "this [q()] was never intended to work in the GUI because it entirely
>>>> bypasses the app quitting mechanism. You should never use q/quit in
>>>> the GUI unless you
>>>> really mean to exit R right away and discard everything (history,
>>>> all open
>>>> files, ...)"
>>>> 
>>>> Please can you point me to some documentation that explains this and
>>>> any
>>>> other similar traps for the unwary fairly knowledgeable R user. My
>>>> audience are very naive Mac users, e.g. they cannot possibly find
>>>> hidden
>>>> files as they do not know what a terminal is.
>>> 
>>> I happen to think the use of Terminal.app is a basic skill needed by
>>> all users. I have move it to the Dock. (I have been a Mac user on and
>>> off for decades.)
>>> 
>>> The other problem (which is not unlike some similar problems faced by
>>> Windows users) is the "hidden" status of .Rprofile under the default
>>> settings of Finder.app. I have gone with globally unhiding the dot-
>>> files in Finder.app, although that may not be wise for total newbies.
>>> 
>>> There is a Mac section of the Installation Manual and an R-Mac FAQ:
>>> 
>>> http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html
>>> 
>>> (It looks somewhat out of data, unfortunately. And it could use some
>>> revisions since the 4.5.3 entry is intended to be the Edit menu
>>> section. The menu items have slightly  different names, and on my
>>> machine there is no Bioconductor menu item (although there is one in a
>>> pulldown box inside a dialog). I did not see a Window menu item
>>> description, and that is the menu I use most often.)
>>> 
>>> 
>>>> I would like to be able to
>>>> help them but am struggling myself. e.g. They may know what the
>>>> switch on
>>>> the toolbar means, but I do not.
>>> 
>>> Mousing over GUI tool bar buttons brings up a brief description on my
>>> machine.
>>> 
>>>> I certainly would not guess that a button
>>>> with a tooltip Quit R would not do the same as q().
>>>> 
>>>> I also maintain an R package in which I work very hard to make
>>>> everything
>>>> platform independent. Is the Mac a special case? It is hard to quit R
>>>> without an option to save on either Linux or Windows.
>>> 
>>> There are some who will undoubtedly tell you to stop using the GUI,
>>> but I am a committed Mac-R-GUI user.
>>> 
>>>> 
>>>> Other differences I have noted are 1) I cannot search in the help
>>>> pages
>>>> and
>>> 
>>> That is a minor annoyance. I will either search out the same page with
>>> RSiteSearch() and search with my web-browser, or select, copy, paste
>>> to a Textedit.app window
>>> 
>>>> 2) when I copy and paste from an example in a help page I have to do
>>>> it line by line or I cannot adjust it line by line.
>>> 
>>> a) I don't understand. I often copy-paste multiple lines from help
>>> pages, and edit  before committing the changes with a <return>. You
>>> can edit on multiple lines on the console.  Sometimes I need to add an
>>> extra command and then using ";" is needed to act as a command
>>> separator. I have on occasion had problems with help page examples not
>>> pasting correctly that were solved by using example(),
>>> 
>>> b) Copy, open R editing window, paste.
>>> 
>>>> Workarounds for either
>>>> would be very much appreciated.
>>> 
>>> Graphics devices are different. Use capabilities() to see the
>>> available devices. The default graphic device is quartz() (not Quartz)
>>> and saving files from the GUI defaults (with no options) to pdf(). I
>>> generally want tiff versions and I use Preview.app to open the pdf
>>> files and save as tiff. (Yes, I know that I could make tiffs from the
>>> R environment directly.)
>>> 
>>> One gotcha is that the Quartz menu item does not shift focus to the
>>> graphics window. I cannot tell you how many times I tried that before
>>> finally learning that I need to use the choice off the Window menu.
>>> And I now never use that menu since I have learned to use all the
>>> corresponding keystrokes
>>> 
>>> I have not yet figured out how to fix my broken R connection with my
>>> Symbol font.
>>> 
>>> Figuring out how to keep all my packages in the R.Framework tree was a
>>> challenge, since I had managed to add the User/Library tree with the
>>> Installer.   If you have done that you can consolidate by dragging the
>>> User/Library copies to the correct position in the R.Framework tree
>>> and using .libPaths() to remove the extra location.
>>> 
>>> Sometimes linking out to pdf files from help pages will hang R. I try
>>> to remember not to do that. The "Help topics matching ___" window
>>> opened by "??" will sometimes get itself tied up in knots and fail to
>>> open any selected help pages. Saving and restarting R is the only
>>> action I have been able to get to succeed in that situation.
>>>> 
>>>> Thanks,
>>>> 
>>>> Ruth
>>>> --
>>>> Ruth M. Ripley,                         Email:ruth at stats.ox.ac.uk
>>>> Dept. of Statistics,                    http://www.stats.ox.ac.uk/~ruth/
>>>> University of Oxford,                   Tel:   01865 282851
>>>> 1 South Parks Road, Oxford OX1 3TG, UK  Fax:   01865 272595
>>>> 
>>>> _______________________________________________
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac at stat.math.ethz.ch
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>>> David Winsemius, MD
>>> West Hartford, CT
>>> 
>>> 
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list