Skip to content

Commit

Permalink
Update functionfupcompleteness.R
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmveen authored Sep 21, 2023
1 parent 1a78c50 commit e536912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/functionfupcompleteness.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fup.completeness = function(date.inclusion,
dat$death.fup = as.numeric(dat$death.date - dat$date.inclusion)

x = table(dat$death)
if(!is.null(r.pre)){
if(is.null(r.pre)){
if(dim(x)==1){stop("There are no deaths; hence caculation of death rate is not possible. Please pre-specify a daily death rate (r)")}
r = sum(table(dat$death)[!rownames(x) == deathcode]) / sum(dat$death.fup)

Expand Down

0 comments on commit e536912

Please sign in to comment.