[Rd] Bug in the example of function optim() (PR#8312)

wolfgang.lederer@stat.uni-muenchen.de wolfgang.lederer at stat.uni-muenchen.de
Tue Nov 15 17:33:31 CET 2005


Dear R-Team,

there seems to be a minor bug in the example for optim(). In the 
travelling salseman part of the example section the lines

text(x, y, names(eurodist), cex=0.8)  (7th line from bottom)

text(x, y, names(eurodist), cex=0.8)  (last line)

do not produce any oputput, because names(eurodist) has value "NULL". To 
get the intended output one has just to substitute names() by labels(). 
So the correct line will be:

text(x, y, labels(eurodist), cex=0.8)  .

Thanks for all your effort and the software you created.

Greetings

Wolfgang Lederer

--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status =
 major = 2
 minor = 2.0
 year = 2005
 month = 10
 day = 06
 svn rev = 35749
 language = R

Windows XP Professional (build 2600) Service Pack 2.0

Locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252

Search Path:
 .GlobalEnv, package:methods, package:stats, package:graphics, 
package:grDevices, package:utils, package:datasets, Autoloads, package:base

-- 
**************************************************
Wolfgang Lederer
Institut für Statistik
Ludwig-Maximilians-Universität München
Martius Str. 4
D-80539 München
Tel: +49 89 2180 4847
Fax: +49 89 2180 5308



More information about the R-devel mailing list