Set two digits for correlogram, but some values were rounded up to one

I tried to create a correlogram with all values having two decimal places, but some of them still only have one.

I used both codes but didn't help


1 answer

  • answered 2018-11-08 08:31 s_t

    The first attempt seems ok, despite you are not using the right function, corr seems not exists:

    M <- mtcars
    # one digit
    corrplot(round(cor(M),1), method = "number")
    M <- mtcars
    # two digits
    corrplot(round(cor(M),s), method = "number")

    Despite it seems you can't go over 3 digits.