t(iris[1:30,])
#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#> Sepal.Length "5.1" "4.9" "4.7" "4.6" "5.0" "5.4" "4.6" "5.0" "4.4" "4.9" "5.4" "4.8" "4.8" "4.3" "5.8" "5.7" "5.4" "5.1" "5.7" "5.1" "5.4" "5.1" "4.6" "5.1" "4.8" "5.0" "5.0" "5.2" "5.2" "4.7"
#> Sepal.Width "3.5" "3.0" "3.2" "3.1" "3.6" "3.9" "3.4" "3.4" "2.9" "3.1" "3.7" "3.4" "3.0" "3.0" "4.0" "4.4" "3.9" "3.5" "3.8" "3.8" "3.4" "3.7" "3.6" "3.3" "3.4" "3.0" "3.4" "3.5" "3.4" "3.2"
#> Petal.Length "1.4" "1.4" "1.3" "1.5" "1.4" "1.7" "1.4" "1.5" "1.4" "1.5" "1.5" "1.6" "1.4" "1.1" "1.2" "1.5" "1.3" "1.4" "1.7" "1.5" "1.7" "1.5" "1.0" "1.7" "1.9" "1.6" "1.6" "1.5" "1.4" "1.6"
#> Petal.Width "0.2" "0.2" "0.2" "0.2" "0.2" "0.4" "0.3" "0.2" "0.2" "0.1" "0.2" "0.2" "0.1" "0.1" "0.2" "0.4" "0.4" "0.3" "0.3" "0.3" "0.2" "0.4" "0.2" "0.5" "0.2" "0.2" "0.4" "0.2" "0.2" "0.2"
#> Species "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa" "setosa"
这是行内公式\(a^2+b^2+\sqrt{c}\),这是行间公式 \[x^2+y^2= z^2\] ## 动态图
library(ggplot2)
library(plotly)
p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) +
geom_bar(position = "dodge")
ggplotly(p)
library(rbokeh)
figure() %>%
ly_points(Sepal.Length, Sepal.Width, data = iris,
color = Species, glyph = Species,
hover = list(Sepal.Length, Sepal.Width))
library(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures") %>%
dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01"))
summary(cars)
#> speed dist
#> Min. : 4.0 Min. : 2.00
#> 1st Qu.:12.0 1st Qu.: 26.00
#> Median :15.0 Median : 36.00
#> Mean :15.4 Mean : 42.98
#> 3rd Qu.:19.0 3rd Qu.: 56.00
#> Max. :25.0 Max. :120.00
summary(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100 setosa :50
#> 1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300 versicolor:50
#> Median :5.800 Median :3.000 Median :4.350 Median :1.300 virginica :50
#> Mean :5.843 Mean :3.057 Mean :3.758 Mean :1.199
#> 3rd Qu.:6.400 3rd Qu.:3.300 3rd Qu.:5.100 3rd Qu.:1.800
#> Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500
summary(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100 setosa :50
#> 1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300 versicolor:50
#> Median :5.800 Median :3.000 Median :4.350 Median :1.300 virginica :50
#> Mean :5.843 Mean :3.057 Mean :3.758 Mean :1.199
#> 3rd Qu.:6.400 3rd Qu.:3.300 3rd Qu.:5.100 3rd Qu.:1.800
#> Max. :7.900 Max. :4.400 Max. :6.900 Max. :2.500
int foo (void) {
int i;
}
int foo (void) {
int i;
}
int foo (void) {
int i;
}
sessionInfo()
#> R version 4.0.2 (2020-06-22)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Mojave 10.14.5
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
#>
#> locale:
#> [1] zh_CN.UTF-8/zh_CN.UTF-8/zh_CN.UTF-8/C/zh_CN.UTF-8/zh_CN.UTF-8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> loaded via a namespace (and not attached):
#> [1] compiler_4.0.2 magrittr_1.5 bookdown_0.20 tools_4.0.2 htmltools_0.5.0 yaml_2.2.1 stringi_1.4.6 rmarkdown_2.3 blogdown_0.20 knitr_1.29 stringr_1.4.0 digest_0.6.25 xfun_0.17 rlang_0.4.7 evaluate_0.14