From 59af1d42d7b14cf5350d8d42aabdbf34a5a8b2a9 Mon Sep 17 00:00:00 2001 From: Jinhwan Kim Date: Tue, 7 May 2024 18:27:33 +0900 Subject: [PATCH] styler applied --- R/csvFileInput.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/csvFileInput.R b/R/csvFileInput.R index 0e3919db..54da383b 100644 --- a/R/csvFileInput.R +++ b/R/csvFileInput.R @@ -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)), ] ) } }