rm(list = ls())
date()
## [1] "Sun Oct 6 21:24:37 2019"
sessionInfo()
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.6
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## loaded via a namespace (and not attached):
## [1] compiler_3.6.1 magrittr_1.5 tools_3.6.1 htmltools_0.3.6
## [5] yaml_2.2.0 Rcpp_1.0.2 stringi_1.4.3 rmarkdown_1.16
## [9] knitr_1.25 stringr_1.4.0 xfun_0.10 digest_0.6.21
## [13] evaluate_0.14
Библиотеки
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
# library(quanteda)
library(ggplot2)
#library(stringr)
Импорт данных
Genre <- read.csv2("../for_import/Genre.csv")
Genre$Name <- as.character(Genre$Name)
Количество по жанрам
table(Genre$Type)
##
## Исповедь Рассказ Рассуждение Сказка Стих
## 3 9 16 13 4 6
ggplot(Genre, aes(Type, Vitality)) +
geom_boxplot()
## Warning: Removed 5 rows containing non-finite values (stat_boxplot).
Критерий Краскела
kruskal.test(Vitality ~ Type, Genre)
##
## Kruskal-Wallis rank sum test
##
## data: Vitality by Type
## Kruskal-Wallis chi-squared = 3.9477, df = 5, p-value = 0.557
ggplot(Genre, aes(Type, Vovlech)) +
geom_boxplot()
## Warning: Removed 5 rows containing non-finite values (stat_boxplot).
Критерий Краскела
kruskal.test(Vovlech ~ Type, Genre)
##
## Kruskal-Wallis rank sum test
##
## data: Vovlech by Type
## Kruskal-Wallis chi-squared = 4.1572, df = 5, p-value = 0.527
ggplot(Genre, aes(Type, Kontr)) +
geom_boxplot()
## Warning: Removed 5 rows containing non-finite values (stat_boxplot).
Критерий Краскела
kruskal.test(Kontr ~ Type, Genre)
##
## Kruskal-Wallis rank sum test
##
## data: Kontr by Type
## Kruskal-Wallis chi-squared = 3.0325, df = 5, p-value = 0.695
ggplot(Genre, aes(Type, Risk)) +
geom_boxplot()
## Warning: Removed 5 rows containing non-finite values (stat_boxplot).
Критерий Краскела
kruskal.test(Risk ~ Type, Genre)
##
## Kruskal-Wallis rank sum test
##
## data: Risk by Type
## Kruskal-Wallis chi-squared = 3.7259, df = 5, p-value = 0.5895