Description Usage Arguments Details Value Examples
View source: R/Create_SNP_XGBoost_Object_function.R
Input a dataframe, generate an object for the SNP missing value imputation with xgboost.
1 | Create_SNP_XGBoost_Object(df, size = 10)
|
df |
A dataframe of the SNPs which we need to impute missing values |
size |
A windows size which we control for our imputation. Default value is 50. |
This function takes in a matrix (p columns of SNPs, n rows of samples) with NAs and returns an object for our imputation function.
a list of list of 2 contents:
1. NA_cols: column index with missing values
2. Multiple_SNP_Object: corresponding SNP_Objects for these SNPs
1 2 3 4 5 6 7 | data("Test_df")
## This is a short matrix containing 100 SNPs with 20 samples.
xgboost_snp_obj <- Create_SNP_XGBoost_Object(Test_df)
# xgboost_snp_obj <- Create_SNP_XGBoost_Object(Test_df, size = 200)
# should return error message
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.