Man pages for thomasbattram/usefunc
Personal repository for useful functions

adjust_mean_varianceAdjust a variable to have equal mean and variance across all...
check_rootnameCheck if files exist
commaFormat numbers
err_msgFunction for dealing with error messages when using tryCatch
extract_alspac_labelsextract_alspac_labels
extract_sum_statsExtract summary statistics from numeric vector
facet_var_genMake facets for forest plots
forest_plotGenerate a forest plot
get_cb_paletteGet colours for plotting that are better for colour blind...
getmodeExtract mode from a numeric vector
get_residualsGet residuals and keep original scale
get_zhou_recsget_zhou_recs
gg.manhattanManhattan plot function for gwas (stolen from pcgoddard)
impute_matrixImpute missing values in DNAm matrix
is.binaryCheck if a vector is binary
is.monomorphicCheck if a vector is monomorphic
make_genoCreate a genotype or many genotypes in HWE
make_grm_matrixConvert long GRM format to matrix format
make_phenCreate a phenotype using arbitrary number of known causal...
make_prettyFormat a set of numbers to have a certain number of sig figs
make_pretty_lm_tableFormat a set of numbers to have a certain number of sig figs
new_loadUse the base R load function but name the object(s) being...
num_to_textConvert numbers to text
pool_mean_sdPool mean and SD estimates from two groups or cohorts
rank_transformRank transform variable
read_bimRead bim file
read_delim_rownamesRead in files with rownames using read_delim() from the readr...
read_famRead fam file
read_gcta_xmatRead GCTA xmat file
read_grmRead binary GCTA GRM
read_hsqRead in GCTA .hsq file in long format
read_ldakRead in LDAK .reml file in long format
read_plink_linearRead output from plink -linear
read_plink_rawRead plink raw format as exported from PLINK2 using -recode A
remove_outliers_iterativeIteratively remove outliers
scatter.thinningRemove points from a scatter plot where density is really...
summarise_glmExtract summary stats from glm() when doing logistic...
summarise_lmExtract summary stats from lm()
tidy_colnamesTidy column names
tidy_numsTidy numbers
winsorizeWinsorize a vector
write_grmWrite read_grm style output back to binary GRM for use with...
thomasbattram/usefunc documentation built on April 24, 2023, 1:46 p.m.