[R-SIG-Mac] Scripting R

Simon Urbanek simon.urbanek at r-project.org
Thu Jan 29 17:33:48 CET 2009

On Jan 29, 2009, at 11:03 , Christian Prinoth wrote:

> Hi,
> is there something similar to rcom on OSX? I understand that R for  
> OSX has some limited applescript support, but I was wondering if  
> there is an easy way to share data with other applications. My  
> ultimate goal would be to use R together with a spreadsheet as I can  
> currently do on windows with R, rcom and Excel.

Well, the subject has apparently noting to do with your question. All  
I can say is you can use AppleScript to run commands in R from other  
applications and you can use the default AS libraries to otherwise  
control R -- so you, you can script R. In addition, R can easily share  
data with any application that supports data sharing. I have no idea  
about Excel on Mac OS X since I don't use it, so someone would have to  
find out if it supports data exchange and how.


PS: What does your e-mail have to do with the discussion below?!?

>> -----Original Message-----
>> From: r-sig-mac-bounces at stat.math.ethz.ch
>> [mailto:r-sig-mac-bounces at stat.math.ethz.ch] On Behalf Of
>> Simon Urbanek
>> Sent: 29 January, 2009 16:29
>> To: Yan Wong
>> Cc: r-sig-mac at stat.math.ethz.ch
>> Subject: Re: [R-SIG-Mac] Possible mac-specific bug in svg
>> (cairo) graphics
>> Yan,
>> On Jan 28, 2009, at 6:33 , Yan Wong wrote:
>>> On 27 Jan 2009, at 16:16, Simon Urbanek wrote:
>>>> I think you got the corresponding response to your post before -
>>> Apologies: I didn't see that reponse.
>>>> cairographics cannot locate an italic version of the font -
>>>> switching to a font which has the desired traits will produce the
>>>> desired output, e.g.:
>>>> svg("test.svg", width=4,4,8)
>>>> par(family="Arial")
>>>> plot.new()
>>>> text(0.5,0.5,labels=expression(italic("This should be in
>> italics")))
>>>> dev.off()
>>> Thanks. I tried this with family="Arial", family="Times",
>>> family="serif", family="sans", family="Verdana", and
>> family="mono",
>>> and they all come out as bold.
>>> I guess if this doesn't happen on other systems, then is must be a
>>> problem with my R or system setup. Unfortunately I don't have
>>> another system  to try this out on.
>> Ah, sorry, my bad - I forgot that you're on 10.4 and I was testing
>> with 10.5. I do remember that 10.4 is missing italics from several
>> default fonts (e.g. Helvetica). You can enable fontconfig
>> debug using
>> FC_DEBUG=1 -- that will at least tell you what fontconfig found.
>> To make things worse, FreeType on Mac is quite buggy and screws up
>> numbering of fonts within a container which results in incorrect
>> styles - it is something we try to work around, but if FT recognizes
>> the wrong style we can't do anything about it. From what I can see
>> this is what happens -- the main difference between 10.4 and 10.5 is
>> that Arial and friends are supplied as (rf-style) font suitcases in
>> 10.4 which is what FT has trouble dealing with. In 10.5 they come as
>> individual fonts which FT can deal with just fine.
>> I know that this is catching straws, but of one the few fonts that
>> come as TTF in 10.4 is "Euphemia UCAS", so this will produce italic
>> output even on 10.4:
>> svg("test.svg", width=4,4,8)
>> par(family="Euphemia UCAS")
>> plot.new()
>> text(0.5,0.5,labels=expression(italic("This should be in italics")))
>> dev.off()
>> Although this is a nuisance, working around bugs in 3rd party
>> libraries on older systems is not high on my priority list, os I
>> cannot promise anything, but maybe I'll get to it...
>>> The italic versions of Arial, Time, and Verdana are all available,
>>> according to Font Book.
>> All styles are in a single file and FT picks the wrong one,
>> unfortunately.
>>> Have you any suggestions as to how I could try and find out
>> what is
>>> going on here? Can I activate some sort of debugging or
>> verbose mode
>>> in Cairographics?
>> FC_DEBUG=1 may help, but FT/cairographics don't have any
>> debugging env
>> vars AFAIR.
>> Cheers,
>> Simon
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> DISCLAIMER:\ L'utilizzo non autorizzato del presente mes...{{dropped: 
> 16}}
> _______________________________________________
> 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