137770 threads
609 threads
1 email from 1 person
Dear R-users >prob <- c(0.5,0.4,0.3,0.1,0.0) >cal <- prob * log(prob,base=2) >cal[1] -0.5000000 -0.5287712 -0.5210897 -0.3321928 NaN Is there any way to change NaN to zero ? Thank you Taka
>prob <- c(0.5,0.4,0.3,0.1,0.0) >cal <- prob * log(prob,base=2) >cal