[R-SIG-Mac] Re: graphs, X11 and others

Simon Urbanek simon.urbanek at math.uni-augsburg.de
Thu Dec 9 19:42:54 CET 2004


On Dec 9, 2004, at 11:10 AM, Tiago R Magalhaes wrote:

> Thanks again for all your help. I am writing a summary to send tothe 
> mailing list about my problems and how to solve them. 1) Briefly 
> Iinstalled X11 and it works now. 2)I downloaded GhostScript from 
> fink,have it on my computer, but bitmap() still can't find it.
Make sure it's on the PATH. If you had used i-Installer then it would 
be on the PATH already...

If you used fink to install gs, then this is more easily said than 
done, because it heavily depends on where you use it from. But I assume 
that you want to use it from R, so the most reliable thing to do is to 
create a symlink in /usr/local/bin, because R automatically adds that 
directory to the PATH.

First, you have to find out where gs lives - I guess it should be 
somewhere in /sw as that's what fink uses by default. Let's say you 
find it in /sw/bin/gs then what you need to do is to type in Terminal:

sudo ln -s /sw/bin/gs /usr/local/bin/gs

if it complains that /usr/local/bin doesn't exist, then type
sudo mkdir -p /usr/local/bin
and repeat the above - that should give you gs in R
> The main problem was somewhere else. Apart from installationproblems, 
> the main issue was that I didn't know what jpeg() or pdf()were doing. 
> I thought the functions were saving the plots AFTER theplots are done.
All this is documented in R help pages ...and the examples, too :P
BTW, AFAIR: the ## End(not run) comments are generated automatically to 
denote examples that are not run when doing make check - so it's not 
something the writers of the documentation put there to annoy you ;).

> Value:
> A plot device isopened: nothing is returned to the R interpreter.
>
> (add something like: jpeg() opens a device where plots can beplaced. 
> dev.off() exist the plot saving the plot in the"file").
Since the device calls are mostly used in scripts, it would lead to 
quite nasty results if they were that noisy. R is a fairly complex 
software - if you want to use all its features, you have to learn a lot 
about it. If you don't want to learn, just relay on the tools that make 
things more simpler, but then you have to live with using only a 
fraction of the available functionality.

> Editor undobasically deletes everything. (scary)
> Sometimes theeditor doesn't select, sometimes using delete deletes a 
> lot of thingsnot only the last key.
Can you, please, describe reproducible examples? The description you 
gave is somewhat useless, because not specific. I know only about the 
undo issue which is being worked on. If you use a PowerBook, make sure 
your problems are not caused by you hitting the touchpad involuntarily 
- that's the most common editing issue, but that's independent of the 
software ...

> 1) To stop the runif there's an error. I've had cases where I had an 
> error in one line,and the script continue to run and the result was 
> misleading. I wouldstrongly prefer to have the script stop it there is 
> anerror
What do you mean by "there's an error"?!?! runif is just a function and 
if there is an error (I wonder how one can force runif to get en error 
:P), it will indeed stop ... you can influence the behavior of R on an 
error yourself, again, please read the docs or get a book on R ...

> 2) Ad lines to theeditor
I guess, you mean line numbers here (because there *are* lines in the 
editor ;)) - this is planned ...

> 3) shortcutallowing the line where the cursor is to be passed to the 
> console(without having to select it) and move to the next line
Well, that's a bit ambiguous, because quite often you have multi-line 
statements, but yes, that could be done easily. Currently you get the 
same effect by using <Option><Shift><Up>, <Cmd><Enter> sequence (if in 
doubt, hitting <Option><Down> before ;)).

> 4) shortcut tohelp when highlighting a word
Good idea - we should adopt the way Apple handles this in Xcode ... 
shortcut for the help and take the selected word as a starting point

> Many things on thebrowser - briefly I would like it to more similar to 
> dbExplorer inSplus :-)
Well, the browser will be completely re-written soon, because the 
current one is far from perfect, but our resources are very limited, so 
it will take a while unless another Cocoa volunteer with good knowledge 
of R internals will pop up ;).

> Someone told methat Jaguar does all this. I downloaded, installed and 
> it seemed to doit. I'll give it another try.
Yes, that's right - one of the cool features in JGR is the object 
browser.

Cheers,
Simon



More information about the R-SIG-Mac mailing list