Skip to content

print number of observations as integers #171

Open
@IndrajeetPatil

Description

@IndrajeetPatil

See n_Obs element here. Instead of 32.00, these should be 32.

library(correlation)

as.list(correlation(mtcars))
#>  r 
#> ---
#> Parameter |  carb |  gear |    am |    vs |  qsec |    wt |  drat |    hp |  disp |   cyl
#> -----------------------------------------------------------------------------------------
#> mpg       | -0.55 |  0.48 |  0.60 |  0.66 |  0.42 | -0.87 |  0.68 | -0.78 | -0.85 | -0.85
#> cyl       |  0.53 | -0.49 | -0.52 | -0.81 | -0.59 |  0.78 | -0.70 |  0.83 |  0.90 |      
#> disp      |  0.39 | -0.56 | -0.59 | -0.71 | -0.43 |  0.89 | -0.71 |  0.79 |       |      
#> hp        |  0.75 | -0.13 | -0.24 | -0.72 | -0.71 |  0.66 | -0.45 |       |       |      
#> drat      | -0.09 |  0.70 |  0.71 |  0.44 |  0.09 | -0.71 |       |       |       |      
#> wt        |  0.43 | -0.58 | -0.69 | -0.55 | -0.17 |       |       |       |       |      
#> qsec      | -0.66 | -0.21 | -0.23 |  0.74 |       |       |       |       |       |      
#> vs        | -0.57 |  0.21 |  0.17 |       |       |       |       |       |       |      
#> am        |  0.06 |  0.79 |       |       |       |       |       |       |       |      
#> gear      |  0.27 |       |       |       |       |       |       |       |       |      
#> 
#>  n_Obs 
#> -------
#> Parameter |  carb |  gear |    am |    vs |  qsec |    wt |  drat |    hp |  disp |   cyl
#> -----------------------------------------------------------------------------------------
#> mpg       | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00
#> cyl       | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 |      
#> disp      | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 |       |      
#> hp        | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 |       |       |      
#> drat      | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 |       |       |       |      
#> wt        | 32.00 | 32.00 | 32.00 | 32.00 | 32.00 |       |       |       |       |      
#> qsec      | 32.00 | 32.00 | 32.00 | 32.00 |       |       |       |       |       |      
#> vs        | 32.00 | 32.00 | 32.00 |       |       |       |       |       |       |      
#> am        | 32.00 | 32.00 |       |       |       |       |       |       |       |      
#> gear      | 32.00 |       |       |       |       |       |       |       |       |      
#> 
#>  p 
#> ---
#> Parameter |     carb |     gear |       am |       vs |     qsec |       wt |     drat |       hp |     disp |      cyl
#> -----------------------------------------------------------------------------------------------------------------------
#> mpg       |     0.02 |     0.10 | 8.27e-03 | 1.09e-03 |     0.22 | 6.86e-09 | 5.86e-04 | 8.05e-06 | 4.78e-08 | 3.18e-08
#> cyl       |     0.04 |     0.08 |     0.04 | 9.03e-07 |     0.01 | 5.60e-06 | 2.97e-04 | 1.74e-07 | 9.92e-11 |         
#> disp      |     0.30 |     0.02 |     0.01 | 2.04e-04 |     0.20 | 6.60e-10 | 2.04e-04 | 3.36e-06 |          |         
#> hp        | 3.44e-05 |     1.00 |     1.00 | 1.24e-04 | 2.13e-04 | 1.29e-03 |     0.17 |          |          |         
#> drat      |     1.00 | 2.97e-04 | 1.94e-04 |     0.19 |     1.00 | 1.94e-04 |          |          |          |         
#> wt        |     0.20 |     0.01 | 3.83e-04 |     0.02 |     1.00 |          |          |          |          |         
#> qsec      | 1.36e-03 |     1.00 |     1.00 | 4.43e-05 |          |          |          |          |          |         
#> vs        |     0.02 |     1.00 |     1.00 |          |          |          |          |          |          |         
#> am        |     1.00 | 2.80e-06 |          |          |          |          |          |          |          |         
#> gear      |     1.00 |          |          |          |          |          |          |          |          |

Created on 2021-04-24 by the reprex package (v2.0.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement 💥Implemented features can be improved or revised

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions