Finding the slope for multiple points in selected columns
问题 Given the following data frame: structure(list(`-5` = c(0, 1, 0, 0, 9, 22), `-4` = c(1, 3, 0, 0, 1, 17), `-3` = c(1, 3, 0, 0, 0, 12), `-2` = c(1, 3, 0, 0, 2, 10), `-1` = c(0, 0, 0, 4, 3, 9), `0` = c(0, 1, 0, 2, 2, 21 ), `1` = c(0, 1, 1, 7, 1, 21), `2` = c(1, 0, 1, 2, 1, 10), `3` = c(0, 9, 0, 6, 1, 12), `4` = c(0, 2, 0, 5, 0, 18), `5` = c(0, 0, 0, 3, 0, 23)), .Names = c("-5", "-4", "-3", "-2", "-1", "0", "1", "2", "3", "4", "5"), row.names = c(NA, 6L), class = "data.frame") # -5 -4 -3 -2 -1 0