update to counting.

This commit is contained in:
agdamsbo 2018-10-12 12:51:56 +02:00
parent fa76288a0a
commit eceb10da45
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -5,7 +5,7 @@
#' @param adj variables to adjust for, as string.
#' @param data dataframe of data.
#' @param dec decimals for results, standard is set to 2. Mean and sd is dec-1.
#' @param n.by.adj flag to indicate wether to count number of patients in adjusted model or overall.
#' @param n.by.adj flag to indicate wether to count number of patients in adjusted model or overall for outcome meassure not NA.
#' @keywords logistic
#' @export
#' @examples
@ -102,7 +102,7 @@ strobe_pred<-function(meas,adj,data,dec=2,n.by.adj=FALSE){
}}}
else {
dat2<-dat[,-1]
dat2<-dat[!is.na(dat[,c(meas)]),][,-c(meas)]
for (i in 1:ncol(dat2)){
if (is.factor(dat2[,i])){
vec<-dat2[,i]

View File

@ -15,7 +15,7 @@ strobe_pred(meas, adj, data, dec = 2, n.by.adj = FALSE)
\item{dec}{decimals for results, standard is set to 2. Mean and sd is dec-1.}
\item{n.by.adj}{flag to indicate wether to count number of patients in adjusted model or overall.}
\item{n.by.adj}{flag to indicate wether to count number of patients in adjusted model or overall for outcome meassure not NA.}
}
\description{
Printable table of logistic regression analysis according to STROBE.