Skip to contents

A function to replace NA in the data frame based on Jasmit Shah (10.1186/s12859-019-3250-2).

Usage

impute_bayesmetab(missdf, M = 100)

Arguments

missdf

a data frame with missing values to be imputed containing features in columns and samples in rows.

M

number of iterations.

Value

A data.frame with imputed values by BayesMetab

Examples

data(sim_miss)
impute_bayesmetab(sim_miss)
#>              X1          X2           X3            X4          X5           X6
#> 1   0.155050833  0.88115677 -0.386468709  0.1194841210 0.600405471 -1.273624037
#> 2   0.968378809  0.60748407  0.633779031  0.6181194666 0.008132938  0.752073002
#> 3   0.468263086  0.57452956  0.247608929 -0.5657341533 0.370125689 -0.004123981
#> 4   0.776819652  0.80313329  0.551339334  0.1459775318 0.724248714  0.847776059
#> 5   0.407885741  0.79911692  0.234761084  0.1897135850 0.418270750  0.708734973
#> 6   0.538797149  0.80186265  0.258614688  0.5754945197 0.238248518 -0.026157655
#> 7   0.830082966  0.75207300  0.952888095  0.0001881735 0.887881226  0.488335246
#> 8   0.187103555  0.57546133  0.856874571  0.3283282877 0.577775384  0.347228474
#> 9   0.779969688  0.94421829 -0.263212798  0.0782780354 0.739950257  0.203048012
#> 10  0.193943927  0.21898736  0.554524177  0.6041721753 0.160679622  0.739950257
#> 11  0.434231178  0.47799791  0.876943810  0.3267990556 0.529571799  0.893697520
#> 12  0.002274518  0.04466879  0.801862649  0.7904525734 0.574529562  0.574529562
#> 13  0.834692139  0.16848571  0.546737340  0.8300829662 0.960086967  0.084448704
#> 14 -0.201644334  0.36828087  0.232753204  0.8100510929 0.398616886  0.148258333
#> 15  0.956967818  0.56331137  0.602267784  0.2027530000 0.408468068  0.370281282
#> 16  0.948497073 -0.38023980  0.712539106  0.5060450307 0.613321482  0.861177622
#> 17  0.600729976  0.73432757  0.648903601  0.5206679751 0.706590850  0.836681799
#> 18  0.261807405  0.70365677  0.187562416  0.0842680801 0.799116918  0.740547051
#> 19  0.643034251  0.73682406  0.238392889  0.2687653562 0.161331222  0.985765802
#> 20  0.526233507 -0.16692996 -0.002156285  0.8147157354 0.885932416  0.032081822