Hello, again I'm on my weblog-script... having problems...
This code: =========================== weblog <- read_weblog("web.log") weblog_by_date <- split(weblog, weblog$date) #for ( i in names(weblog_by_day) ) { print(i); print(weblog_by_day$i) } 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 ) } =========================== produces this result (only a part is shown!): ======================================= 124.0.210.117 145.253.3.244 160.91.44.155 174.36.196.98 193.47.80.48 NA NA NA NA NA 200.212.63.51 200.87.53.234 208.80.194.30 208.80.194.35 208.80.194.46 NA 294 NA 5774 NA 208.80.194.49 209.17.171.58 210.207.57.39 211.171.202.85 211.43.212.94 ======================================= There are no "NA"-values, because the function read_weblog() replaces all NA by 0. So there should be no way to produce NA's! How can this happen? Ciao, Oliver ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.