Skip to content

Commit

Permalink
Update treatment.R
Browse files Browse the repository at this point in the history
  • Loading branch information
cwendorf committed Oct 7, 2023
1 parent ad24f4c commit 1506b94
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion R/treatment.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ treatment.first <- function (n, base=1, intercept=FALSE, contrasts=TRUE, sparse=
treatment.last <- function (n, intercept=FALSE, contrasts=TRUE, sparse=FALSE) {
base <- if (is.numeric(n) && length(n) == 1L) n else length(n)
cont <- contr.treatment(n, base=base, contrasts=contrasts, sparse=sparse)
levels <- as.character(seq_len(base))
colnames(cont) <- paste(n[-base], n[base], sep="-")
if(intercept) (cont <- cbind(Int=1,cont))
cont
Expand Down

0 comments on commit 1506b94

Please sign in to comment.