Hi, I am currently using R v3.4.4 and I just discovered this: > prod(NA, NaN) ; prod(NaN, NA) [1] NA [1] NaN
?prod says: If ‘na.rm’ is ‘FALSE’ an ‘NA’ value in any of the arguments will cause a value of ‘NA’ to be returned, otherwise ‘NA’ values are ignored. So according to the manual-page for prod() NA should be returned in both cases? However for sum() is opposite is true: > sum(NA, NaN) ; sum(NaN, NA) [1] NA [1] NA ?sum says: If ‘na.rm’ is ‘FALSE’ an ‘NA’ or ‘NaN’ value in any of the arguments will cause a value of ‘NA’ or ‘NaN’ to be returned, otherwise ‘NA’ and ‘NaN’ values are ignored. Maybe the manual for prod() should say the same as sum() that both NA and NaN can be returned? Regards Martin ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.