library(tidyverse)
library(tidytext)
library(RColorBrewer)
library(wordcloud)
#install_github("romainfrancois/dplyr5000")
library(dplyr5000)
#tokenization
tib_words <- dplyr5000 %>%
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(tidyverse) | |
library(lubridate) | |
#> | |
#> Attachement du package : 'lubridate' | |
#> The following object is masked from 'package:base': | |
#> | |
#> date | |
df <- tibble(Evt = c("F", "O", "F", "O", "O", "F", "F"), | |
date_time = as_datetime(c("2019-01-22 09:37:56", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(glue) | |
names = c("var1", "var2", "var3") | |
glue_index <- function(vect_names){ | |
glue('"{vect_names}" = 4,') | |
} | |
glue_index(names) | |
#> "var1" = 4, | |
#> "var2" = 4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(tidyverse) | |
df1 <- tibble(Name = c("Pastis", "Mojito", "Binouze"), | |
Species = c("CAT", NA, "DOG")) | |
df2 <- tibble(Name = c("Pastis", "Mojito", "Binouze", "Jack", "Binouze"), | |
Species = c("CAT", "CAT", "DOG", "DOG", "CAT"), | |
Gender = c("M", "M", "F", "M", "F")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(tidyverse) | |
df1 <- tibble(Name = c("Pastis", "Mojito", "Binouze"), | |
Species = c("CAT", NA, "DOG")) | |
df2 <- tibble(Name = c("Pastis", "Mojito", "Binouze", "Jack"), | |
Species = c("CAT", "CAT", "DOG", "DOG"), | |
Gender = c("M", "M", "F", "M")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(pdftools) | |
library(tidyverse) | |
publi_pdf <- pdf_text("https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6060449/pdf/12917_2018_Article_1517.pdf") | |
publi_lines <- publi_pdf %>% | |
map(1:length(publi_pdf), readr::read_lines()) |
#devtools::install_github("r-lib/gh")
library(gh)
#devtools::install_github("romainfrancois/dplyr5000")
library(dplyr5000)
library(tidyverse)
library(grid)
library(magick)
#> Linking to ImageMagick 6.9.7.4
#> Enabled features: fontconfig, freetype, fftw, lcms, pango, x11
library(tidyverse)
library(dplyr5000)
dplyr5000 %>%
mutate(time_min = as.numeric(finished_at - started_at) / 60 ) %>%
filter(time_min > 0, state == "passed") %>%
ggplot(aes(x=finished_at, y = time_min)) +
geom_point() +
geom_smooth(method = "auto", formula = y ~ x, se = FALSE, size = 2, color = "#9900CC") +
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
#si tu l'as pas : install.packages("dplyr") | |
#lecture des fichiers | |
data_train <- read.csv(file = "/home/cecile/Documents/R/train.csv") | |
data_test <- read.csv(file = "/home/cecile/Documents/R/test.csv") | |
#glimpse c'est juste une autre sorte de summary et le %>% si tu connais pas c'est la syntaxe du package dplyr | |
#c'est exactement comme ecrire glimpse(data_train) sauf que cette syntaxe ecrit sujet %>% verbe au lieu de verbe(sujet) | |
#c'est plus lisible et plus fashion lol |