# can normalize numeric vectors, matrices, data.frames, and lists of those
normalize(
list(
c(-3, 0, 3),
matrix(1:12, nrow = 3, ncol = 4),
data.frame(a = 1:3, b = 4:6, c = 7:9, d = 10:12)
)
)
# can ignore columns (or rows)
normalize(
data.frame(a = 1:3, b = c("A", "B", "C"), c = 7:9, d = 10:12),
ignore = 2
)
# can normalize columns (or rows) jointly
normalize(
matrix(1:12, nrow = 3, ncol = 4),
jointly = list(1:2, 3:4)
)
Run the code above in your browser using DataLab