From b01fe478736a9ba44e79b5c0fa30786c39a08710 Mon Sep 17 00:00:00 2001 From: agdamsbo Date: Thu, 11 Oct 2018 09:07:01 +0200 Subject: [PATCH] trying to fix error messages --- .DS_Store | Bin 0 -> 6148 bytes DESCRIPTION | 24 ++++++++++++------------ README.md | 39 --------------------------------------- packing.R | 2 -- torubleshooting.R | 3 +++ update local version.R | 1 + 6 files changed, 16 insertions(+), 53 deletions(-) create mode 100644 .DS_Store delete mode 100644 README.md create mode 100644 torubleshooting.R diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0= 3.4.4) +Type: Package +Title: FUNCTIONS FOR HEALTH RESEARCH +Version: 0.1.0.9001 +Author@R: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut"))) +Maintainer: Andreas Gammelgaard Damsbo +Description: I am a Danish medical doctor involved in neuropsychiatric research. + Here I have collected functions I use for my data analysis. You are very + welcome to get inspired or to use my work. Imports: broom, - dplyr, - epiR, - ggplot2, - MASS + dplyr, + epiR, + ggplot2, + MASS License: GPL (>= 2) Encoding: UTF-8 LazyData: true diff --git a/README.md b/README.md deleted file mode 100644 index bf6a6d8..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Intro - -I try my best to share my basic workarounds in R to more effectively do statistical research. Feel free to be inspired or comment. - -AS all functions have been collected in the package daDoctoR, please refer to the documentation there. -Install the package with the following command: devtools::install_github('agdamsbo/daDoctoR') - - -## Further research - -In need of a suitable function to perform the chi-squared test of Hardy-Weinberg-equillibrium in my study poppulation, I ended up writing my own. It also contains a few summarise functions. This is actually the function I am most proud of, as it represents an actual universal test for both bi- and triallelic sustems in non-sexcromosome genes. - -### Genotype distribution testing -- hwe_allele.R -- requires input in the form of two vectors with alleles listed -- hwe_geno.R -- requires input as numbers of each genotype (mm, mn, nn for biallelic systems and mm, mn, nn, mo, no, oo for triallelic) -- hwe.sum.R -- summarising tests for genotypes grouped by af factor. Performs HWE test for each group and returns neatly formatted distribution for easy copy-pasting to print. No comparisons of groups. Use the oddsratio or chisq.test. - -### Formatting large data frames -- col_fact.R -- formatting columns as factor for names containing text elements of a vector provided. Labels or levels can be provided. -- col_num.R -- formatting columns as numeric for names containing text elements of a vector provided. - -### Bivariate logistic regression analyses -- rep_glm.R -- for a stepwise gating regression approach this provides several bivariate logistic regression analyses for columns of a dataframe specified by af vector of the format c(). Use the dput() to obtain names of dataframe in correct format. -- rep_lm -- same as rep_glm, but for linear models -- rep_reg_cie.R -- Analysis of change in estimate approach with specified cut set at 10 % as standard. - -### Publishin -- strobe_print.R -- regression analysis table complying with STROBE. - -## Research year - -Commands for extracting data from cpr-numbers: -- age_calc_function.R -- cpr_check_function.R -- cpr_sex_function.R -- date_convert_function.R -- dob_extract_cpr_function.R - -All of these commands are written to work with the Danish Central Person Registry (CPR) numbers of the format ddmmyy-xxxx. diff --git a/packing.R b/packing.R index 6c25edc..fc83e56 100644 --- a/packing.R +++ b/packing.R @@ -1,8 +1,6 @@ library(roxygen2) library(devtools) -# Packing for publication - source("/Users/andreas/Documents/GitHub/daDoctoR/updatePackageVersion.R") setwd("/Users/andreas/Documents/GitHub/daDoctoR") diff --git a/torubleshooting.R b/torubleshooting.R new file mode 100644 index 0000000..1fde154 --- /dev/null +++ b/torubleshooting.R @@ -0,0 +1,3 @@ +## Looking for errors in code + +for (f in list.files("/Users/andreas/Documents/GitHub/daDoctoR/R", full.names=TRUE)) parse(f) diff --git a/update local version.R b/update local version.R index 1e5de22..f46a4ef 100644 --- a/update local version.R +++ b/update local version.R @@ -10,3 +10,4 @@ setwd("/") devtools::install_github('agdamsbo/daDoctoR') library(daDoctoR) +