Skip to content
Prev 165270 / 398506 Next

NA, where no NA should (could!) be!

Sarah Goslee <sarah.goslee <at> gmail.com> writes:
====================
for ( datum in names(weblog_by_date) )
{ 
  print(datum)
  selected <- weblog_by_date[[datum]]

  res_size_by_host <- tapply( selected$size, selected$host, sum) 
  mycat <- function(a,b) cat(paste(a, "==>", b, "\n"))
  mapply( mycat, selected$size, selected$host )
  print( res_size_by_host )

  print( "is there any NA?!")
  print( any( is.na(selected$size)) )

}
====================



At the end of the printouts, it gives me:

=======================
 94.101.145.110     94.23.3.220 
             NA              NA 
[1] "is there any NA?!"
[1] FALSE
=======================


Strange, eh?!

Ciao,
   Oliver