Getting “NA” when I run a standard deviation

后端 未结 4 1467
鱼传尺愫
鱼传尺愫 2021-01-02 02:33

Quick question. I read my csv file into the variable data. It has a column label var, which has numerical values.

When I run the command

4条回答
  •  再見小時候
    2021-01-02 03:14

    There may be Inf or -Inf as values in the data.

    Try

    is.finite(data)
    

    or

    min(data, na.rm = TRUE)
    max(data, na.rm = TRUE)
    

    to check if that is indeed the case.

提交回复
热议问题