Created
January 19, 2021 19:06
-
-
Save ischurov/19c8d698a87af3e723e63452a79ffd09 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Work by Ivan Pozdniakov | |
# See details: http://math-info.hse.ru/s20/g | |
2 < 3 | |
2 > 3 | |
2 == 3 | |
some_comparison <- 2 != 3 | |
1:10 > 5 | |
1:10 >= 5 | |
d <- 10:1 | |
d[d >= 4] | |
2+2 | |
a <- 1:10 | |
c("three", 2, 3) | |
small_l <- list("three", 1:2) | |
l2 <- list(small_l, 1:3, `+`, log) | |
l2[[1]][[2]] | |
str(l2) | |
named_l <- list(letters = c("a", "b"), numbers = 1:10) | |
named_l$letters | |
a | |
attr(a, "dim") <- c(2, 5) | |
b <- 2:9 | |
b[1] | |
b[2:3] | |
b | |
b[c(TRUE, FALSE)] | |
a[1,] | |
df <- read.csv("https://goo.gl/v7nvho") | |
str(df) | |
df[c(TRUE, FALSE),] | |
df$Age[df$Age>=18] | |
df[df$Age >= 18, ] | |
mean(df$Age) | |
sd(df$Age) | |
sqrt(sum((df$Age - mean(df$Age))^2)/(length(df$Age) - 1)) | |
sd(df$Age) | |
var(df$Age) | |
hist(df$Age) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment