随笔分类 - R
摘要:library(tidyverse) install.packages("nycflights13") library(nycflights13) library(lubridate) dailyFlight <- flights %>% mutate(date = make_date(year,
阅读全文
摘要:install.packages('nycflights13') library(dplyr) library(utils) library(nycflights13) head(flights) flights_Month1_Day1 <- filter(flights, month == 1,
阅读全文
摘要:set.seed(125) myMat <- matrix(rpois(20, 3), nrow = 4) myMat dim(myMat) apply(myMat, 2, max) apply(myMat, 1, min) apply(myMat, 2, range) airquality spl
阅读全文
摘要:library(ggplot2) library(tidyverse) mtcars dim(mtcars) head(mtcars) ?qplot qplot(data = mtcars, x = wt, y = mpg) + ggtitle(" sjdklfd skdjskfl dsfs") +
阅读全文
摘要:library(lubridate) d1 <- Sys.Date() as.numeric(d1) d2 <- "2000-02-29" d3 <- as.Date(d2) d4 <- now() year(d4) month(d4) week(d4) s1 <- sample(LETTERS[1
阅读全文

浙公网安备 33010602011771号