苍水 发表于 2013-3-24 02:21 
话说,这又是什么情况呢
> any(is.nan(n))
[1] FALSE
that's abit weird, the only thing i could think of is that n is a null vector or list.
example:
>data=vector(length=0)
>data
logical(0)
>any(is.nan(data))
[1] FALSE
>mean(data)
[1] NaN
tested in R