From p.dalgaard at biostat.ku.dk  Wed Mar  5 18:41:56 2003
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard BSA)
Date: Wed Mar  5 18:43:09 2003
Subject: [Rd] lty=as.numeric(NA)
Message-ID: <x2adg94snv.fsf@biostat.ku.dk>


I found that if a numeric vector is used to set the line type in
segments(), then any NA values get plotted with a particular pattern,
rather than omitted as usually happens with NAs. Similarly, 

  plot(rnorm(5),type="l",lty=as.numeric(NA))

does plot a line, curiously enough not with the same pattern as

  plot(1:7,2:8)
  segments(1:5,2:6,4:8,3:7,lty=c(NA,1:4))

lty=NA (i.e. logical NA) gives an error.

Surely this is more a bug than a feature?

        -p

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] lty=as.numeric(NA)
Peter Dalgaard BSA