R/CreateTableOneJS.R
changed.
R/svyCreateTableOneJS.R
changed.
215 | 215 | catDigits = catDigits, contDigits = contDigits, pDigits = pDigits, minMax = minMax) |
|
216 | 216 | rownames(ptb1) <- gsub("(mean (SD))", "", rownames(ptb1), fixed=T) |
|
217 | 217 | if (showpm){ |
|
218 | - | ptb1[!grepl("(%)", rownames(ptb1)), ] <- gsub("\\(", "\u00B1 ", ptb1[!grepl("(%)", rownames(ptb1)), ] ) |
|
219 | - | ptb1[!grepl("(%)", rownames(ptb1)), ] <- gsub("\\)", "", ptb1[!grepl("(%)", rownames(ptb1)), ] ) |
|
218 | + | ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] <- gsub("\\(", "\u00B1 ", ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] ) |
|
219 | + | ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] <- gsub("\\)", "", ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] ) |
|
220 | 220 | } |
|
221 | 221 | cap.tb1 <- "Total" |
|
222 | 222 | #if (Labels & !is.null(labeldata)){ |
177 | 177 | rownames(ptb1) <- gsub("(mean (SD))", "", rownames(ptb1), fixed=T) |
|
178 | 178 | ||
179 | 179 | if (showpm){ |
|
180 | - | ptb1[!grepl("(%)", rownames(ptb1)), ] <- gsub("\\(", "\u00B1 ", ptb1[!grepl("(%)", rownames(ptb1)), ] ) |
|
181 | - | ptb1[!grepl("(%)", rownames(ptb1)), ] <- gsub("\\)", "", ptb1[!grepl("(%)", rownames(ptb1)), ] ) |
|
180 | + | ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] <- gsub("\\(", "\u00B1 ", ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] ) |
|
181 | + | ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] <- gsub("\\)", "", ptb1[!grepl("(%)", rownames(ptb1)) & rownames(ptb1) != "", ] ) |
|
182 | 182 | } |
|
183 | 183 | ||
184 | 184 | cap.tb1 <- "Total - weighted data" |
Files | Coverage |
---|---|
R | 85.87% |
Project Totals (12 files) | 85.87% |