You should not be asking for strwidth() without setting up a coordinate system.

[1] 6.425911e-297 1.927773e-296

is not 'works ok'. That's not to say that there is not a quartz bug here as well.

On Thu, 1 May 2008, Luca Scrucca wrote:

Dear R-Mac-users,

I got a crash using strwidth() on a quartz device. For example:

par(family = "mono")
strwidth(c("a", "aaa"))

*** caught bus error ***
address 0x10, cause 'non-existent physical address'

Traceback:
1: strwidth(text)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:

Please consider that not setting family to "mono" will result in no crash when strwidth() is called. Also, using the x11 device works ok.
For example:

x11()
par(family = "mono")
strwidth(c("a", "aaa"))
[1] 6.425911e-297 1.927773e-296

I installed the R binary kindly provided at CRAN, as well as binary packages. The OSX is Leopard 10.5.2.
These are my R session infos
sessionInfo()
R version 2.7.0 (2008-04-22)
i386-apple-darwin8.10.1

locale:
en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] graphics  utils     datasets  grDevices stats     methods   base

other attached packages:
[1] RColorBrewer_1.0-2 rgl_0.77

Thanks,

Luca


--------------------------------------------------
Luca Scrucca
Dipartimento di Economia, Finanza e Statistica
Sezione di Statistica
Università  degli Studi di Perugia
Via A. Pascoli, 20
06123 PERUGIA  (ITALY)
Tel. +39-075-5855233
Fax: +39-075-5855950
E-mail:   [EMAIL PROTECTED]
Web page: http://www.stat.unipg.it/luca
--------------------------------------------------


--
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to