User Tools

Site Tools


en:history:2015-02-20-history

2015-02-20 History of commands

1+1
23*23
sqrt (12)
sqrt (12)
a <- sqrt (12)
a
ls ()
a
b
a
a + 2
b <- a + 2
b
ls ()
a+b
b <- a + 2
sqrt (a)
a1 <- 'ahoj'
a1
a1 <- ahoj
a1
a1 + 1
class (a)
class (a1)
a2 <- FALSE
a3 <- TRUE
class (a2)
class (a3)
a2
a3
a2 & a3
a3 <- T
a
d <- 1,2,3,4
d <- c(1,2,3,4)
d
length (d)
class (d)
summary
result
d
d.character <- c('ahoj', 'jak', 'se', 'mas')
d.character
class (d.character)
d
c (d, '5')
d <- c (d, '5')
d
as.numeric (d)
d <- as.numeric (d)
d
d
c(d, FALSE)
1:12
234:456
45:23
23:4
23/4
23-4
23 - 4
23 / 4
23 * 4
1:12
234:456
1:12
matrix (1:12)
?matrix
matrix (data = 1:12, nrow = 3, ncol = 4)
matrix (data = 1:12, nrow = 3, ncol = 4, byrow = T)
matrix (data = 1:12, nrow = 3, ncol = 4, byrow = TRUE)
matrix (data = 1:12, nrow = 3, ncol = 4, byrow = FALSE)
matrix (1:12, 3, 4, TRUE)
matrix (1:12, 4, 3, TRUE)
matrix (1:12, 3, 4, TRUE)
m1 <- matrix (1:12, 3, 4, TRUE)
m
m1
colSum (m1)
colSums (m1)
rowSums (m1)
rowMeans (m1)
colMeans (m1)
m1
m1
m1[2,3]
m1[2, ]
m1[,3]
m1[,]
a
d
d[3]
colnames (m1)
rownames (m1)
colnames (m1) <- c('a', 'b', 'c', 'd')
m1
letters
letters [1:4]
letters [c(1,3,5)]
m1
d1
d1 <- as.data.frame (m1)
d1
class (m1)
class (d1)
d1[2,3]
names (d1)
d1$a
d1[,1]
matrix (1:2, nrow = 3, ncol = 4)
as.data.frame (matrix (1:2, nrow = 3, ncol = 4))
d1
dim (d1)
cars
cars$speed
cars$dist
cars$d
plot (cars)
plot (speed ~ dist, data = cars)
d1
cbind (d1, e = c('ahoj', 'jak', 'se'))
d2 <- cbind (d1, e = c('ahoj', 'jak', 'se'))
d21
d2
d2$a
d2$e
a
a1
m1
d1
list (a, a1, m1, d1)
l1 <- list (a, a1, m1, d1)
l1
l1
l1 [[3]]
l1 [[3]][2,4]
l1 [[3]][2,]
l1 [[4]]$d
l1 [[4]]$d[2]
l2 <- list (l1, letters)
l2
l2[[1]][[4]][2,4]
l2 <- list (l1, letters)
en/history/2015-02-20-history.txt · Last modified: 2017/10/11 20:36 (external edit)