AS
Size: a a a
AS
Ю
AS
to_factors <- function(test_data, factors){
test_data[factors] <- mutate_each(test_data[factors], funs(factor(ifelse(. > mean(.), 1, 0))))
return(test_data)}
IY
AS
R
AS
a
AS
AS
PU
AS
to_factors <- function(test_data, factors){
test_data[factors] <- mutate_each(test_data[factors], funs(factor(ifelse(. > mean(.), 1, 0))))
return(test_data)}
ГД
1:5 > 3
не вызывает когнитивный диссонанс?AS
test_data <- as.data.frame(list(V1 = c(12, 10, 11, 10, 9, 9),
V2 = c(11, 11, 9, 12, 10, 8),
V3 = c(11, 11, 10, 10, 10, 10),
V4 = c(11, 10, 9, 11, 11, 8),
V5 = c(10, 9, 9, 10, 10, 9),
V6 = c(12, 9, 9, 10, 10, 9),
V7 = c(11, 11, 12, 10, 9, 9),
V8 = c(9, 11, 10, 8, 11, 9),
V9 = c(12, 10, 10, 12, 10, 12),
V10 = c(13, 9, 9, 9, 10, 9)))
to_factors <- function(test_data, factors){
fct = function(x) as.factor(ifelse(x > mean(x), 1, 0))
test_data %>% mutate_at(factors, fct)
}
AS
1:5 > 3
не вызывает когнитивный диссонанс?JL
JL
AS
ГД
AS