This commit is contained in:
agdamsbo 2019-11-13 11:24:20 +01:00
parent 93fea3a8a6
commit a079b631cd
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
Package: daDoctoR Package: daDoctoR
Type: Package Type: Package
Title: FUNCTIONS FOR HEALTH RESEARCH Title: FUNCTIONS FOR HEALTH RESEARCH
Version: 0.1.0.9029 Version: 0.1.0.9030
Author: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut"))) Author: c(person("Andreas", "Gammelgaard Damsbo", email = "agdamsbo@pm.me", role = c("cre", "aut")))
Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me> Maintainer: Andreas Gammelgaard Damsbo <agdamsbo@pm.me>
Description: I am a Danish medical doctor involved in neuropsychiatric research. Description: I am a Danish medical doctor involved in neuropsychiatric research.

View File

@ -164,11 +164,11 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
rona<-c() rona<-c()
for (i in 1:length(ads)){ for (i in 1:length(ads)){
if (is.factor(ads[,i])){ if (is.factor(ads[,i])){
rona<-c(rona,names(ads[i]),levels(ads[,i])) rona<-c(rona,names(ads[i]),levels(ads[,i]))}
if (!is.factor(ads[,i])){ if (!is.factor(ads[,i])){
rona<-c(rona,names(ads[i]),"Per unit increase") rona<-c(rona,names(ads[i]),"Per unit increase")
} }
}} }
if (p.val==TRUE){ if (p.val==TRUE){
ref<-data.frame(c(NA,rona),re[,2],re[,5],re[,6],re[,3],re[,4]) ref<-data.frame(c(NA,rona),re[,2],re[,5],re[,6],re[,3],re[,4])
@ -331,11 +331,11 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE,p.val=FALSE){
rona<-c() rona<-c()
for (i in 1:length(ads)){ for (i in 1:length(ads)){
if (is.factor(ads[,i])){ if (is.factor(ads[,i])){
rona<-c(rona,names(ads[i]),levels(ads[,i])) rona<-c(rona,names(ads[i]),levels(ads[,i]))}
if (!is.factor(ads[,i])){ if (!is.factor(ads[,i])){
rona<-c(rona,names(ads[i]),"Per unit increase") rona<-c(rona,names(ads[i]),"Per unit increase")
} }
}} }
if (p.val==TRUE){ if (p.val==TRUE){
ref<-data.frame(c(NA,rona),re[,2],re[,5],re[,6],re[,3],re[,4]) ref<-data.frame(c(NA,rona),re[,2],re[,5],re[,6],re[,3],re[,4])