随笔分类 -  R

摘要:library(tidyverse) install.packages("nycflights13") library(nycflights13) library(lubridate) dailyFlight <- flights %>% mutate(date = make_date(year, 阅读全文
posted @ 2021-06-07 18:00 sinEagle 阅读(45) 评论(0) 推荐(0)
摘要:install.packages('nycflights13') library(dplyr) library(utils) library(nycflights13) head(flights) flights_Month1_Day1 <- filter(flights, month == 1, 阅读全文
posted @ 2021-05-24 18:06 sinEagle 阅读(47) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-05-17 18:01 sinEagle 阅读(60) 评论(0) 推荐(0)
摘要:library(ggplot2) library(tidyverse) mtcars dim(mtcars) head(mtcars) ?qplot qplot(data = mtcars, x = wt, y = mpg) + ggtitle(" sjdklfd skdjskfl dsfs") + 阅读全文
posted @ 2021-04-19 17:38 sinEagle 阅读(44) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-03-29 16:42 sinEagle 阅读(41) 评论(0) 推荐(0)