stata <- data.frame(state.name, state.abb, state.area) stata volcano heatmap(volcano) Titanic cars women car data(Chile, package = "car") x <- c(1, 2, 99999, "3kjlfkf", T) #向量 mode(x) # x中的元素都被转换成了字符型 x c(1:100) seq(from = 1, to = 100, length.out = 10) #等差数列 tmp <- rep(2, 5) #重复数列 print(tmp) rep(x, 5) rep(x, each = 5) rep(x, each = 5, times = 2) x <- c(1, 2, 3, 4) y <- c(2, 2, 2, 2) x*2+y x[x>3]
原文:https://www.cnblogs.com/sineagle/p/14802522.html