x <- c(1, 2, 3) c(1,2,3)#vytvarim vektor x <- c(1, 2, 3) length(x) ?length length(x) class(x) y <- c("ahoj", "nazdar", "cau") x <- 1:100000000 x <- seq(0, 100, 2) length(x[seq(40,50)]) x*5 length(x) x * c(1:50) x[40:50][2:3][1] m <- matrix(data = NA, nrow = 5, ncol = 4) m m <- matrix(data = 1:20, nrow = 5, ncol = 4) m[,1] m[2,] head(x, 10) head(m) tail(x) m[2:3,3] m[c(2,5),3] m * 10 m * 1:10 m[2:4,3] <- c(1000, 2000, 3000) m m[2,4] <- "ahoj" m m +1 df <- data.frame(prvni=c(1:4), druhy=letters[1:4], treti=c(TRUE, TRUE, FALSE, TRUE)) df class(df[,3]) colnames(df)[2] <- "sloupec" df df[,2] df$sloupec df[1:2, "sloupec"] df$sloupec[1:2] m <- matrix(data = 1:20, nrow = 5, ncol = 5, byrow = F) m m * 1:5 m[,6] <- 1:5 df$ctvrty <- 1:4 df[,5] <- 1:4 df l <- list(prvni=1, druhy=seq(2,8,2), treti=m) l l$treti[3,3] l[[4]] <- c(TRUE, FALSE, TRUE) l l[2] l$druhy l[[2]][3] l[[3]][3,3]