Skip to content

Commit

Permalink
styler applied
Browse files Browse the repository at this point in the history
  • Loading branch information
jhk0530 committed May 7, 2024
1 parent 60112df commit 59af1d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/csvFileInput.R
Original file line number Diff line number Diff line change
Expand Up @@ -395,21 +395,21 @@ csvFile <- function(input, output, session, nfactor.limit = 20) {
for (i in 1:length(colnames(out.old))) {
spss.labels <- attr(out.old[[i]], "labels")
if (!is.null(spss.labels)) {
index <- which(out.label$variable==colnames(out.old)[i], arr.ind = T)
index <- which(out.label$variable == colnames(out.old)[i], arr.ind = T)
cnt <- length(unname(spss.labels))

out.part <- data.table(
variable = rep(colnames(out.old)[i], cnt),
class = rep('factor', cnt),
class = rep("factor", cnt),
level = unname(spss.labels),
var_label = rep(colnames(out.old)[i], cnt),
val_label = names(spss.labels)
)

out.label <- rbind(
out.label[c(1:(min(index)-1)), ],
out.label[c(1:(min(index) - 1)), ],
out.part,
out.label[c((max(index)+1):nrow(out.label)),]
out.label[c((max(index) + 1):nrow(out.label)), ]
)
}
}
Expand Down

0 comments on commit 59af1d4

Please sign in to comment.