Cross-Correlations with significance levels

I'm trying to generate a table of cross-correlations with the significance levels however with the code below I get an error message.

 install.packages("Hmisc")
library(Hmisc)
rcorr(Summary, type = "pearson")
# error message
Error in storage.mode(x) <- "double" : 
  (list) object cannot be coerced to type 'double'

This is the dataset

 No_Directors No_Foreign Per_Foreign Per_OverseasTurnover2019 TurnoverGBP2019 SD_Turnover LongTermDebtGBP2019 MktCapmilGBP2019 TotalAssetsGBP2019 AssetGrowth Price_Volatility Dividend_payoutPer2019
          <dbl>      <dbl>       <dbl>                    <dbl>           <dbl>       <dbl>               <dbl>            <dbl>              <dbl>       <dbl>            <dbl>                  <dbl>
 1           14          3       21.4                    0          63911000000 4103540447.          8969000000           21820.        49047000000    0.0933              0.351                  27.0 
 2           10          3       30                      0          29007000000 2554770890.           933000000            4930.        22582000000    0.0264              0.413                 102.  
 3           11          2       18.2                    0          17735000000  664867882.          1110000000            5562.         9186000000    0.0145              0.284                 118.  
 4            9          4       44.4                    0.623      15824000000 1387612950.           361000000           18549.        13532000000    0.0320              0.278                  40.8 
 5           13          4       30.8                   NA                   NA 1116419276.                  NA              NA                  NA   -1                  NA                      NA   
 6           10          8       80                     NA                   NA 1896849142.                  NA              NA                  NA   -1                  NA                      NA   
 7            9          0        0                      0           4763100000  458606807.           200000000            5823.         7124900000    0.0371              0.374                  61.1 
 8           10          2       20                      0.122       4167400000   74970041.           905200000            6718.         2686300000    0.0941              0.442                  36.5 
 9           10          3       30                     NA                   NA  320508450.                  NA              NA                  NA   -1                  NA                      NA   
10            8          1       12.5                   NA                   NA  361352801.                  NA              NA                  NA   -1                  NA                      NA   
11            7          0        0                      0           3213243000  573889953.                  NA            3658.         3887081000    0.0971              0.293                  33.2 
12            3          0        0                      0           3028000000  786969001.           255700000              NA          2257600000    0.000665           NA                     104.  
13            7          0        0                     NA                   NA  257469498.                  NA              NA                  NA   -1                  NA                      NA   
14           17          1        5.88                   0           2957400000  402887723.           300000000            4846.         4937900000    0.0338              0.311                   8.45
15           11          4       36.4                   NA                   NA  292083150.                  NA              NA                  NA   -1                  NA                      NA   
16           14          4       28.6                    0           2685000000  704082855.                  NA             618.        90999000000    1.09                1.00                   19.8 
17           11          7       63.6                    0           2498000000  309705182.          1500000000            6502.         4849000000    0.0435              0.286                  76.4 
18           10          3       30                     NA                   NA  295762747.                  NA              NA                  NA   -1                  NA                      NA   
19            9          2       22.2                    0.0447      2221400000   54118638.                  NA             545.          983900000    0.110               0.664                  46.6 
20            9          0        0                      0           1878900000  828069911.           411200000             754.         1295100000   -0.316               0.474                 204.  

The argument to rcorr must be

a numeric matrix with at least 5 rows and at least 2 columns (if y is absent)

not class data frame

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.