Statystyka/zajecia1/.Rhistory

127 lines
2.3 KiB
R
Raw Normal View History

2021-04-02 23:04:36 +02:00
start <- Sys.time()
for (x in 1:100000000){
pierw <- sqrt(x)
}
print(Sys.time() - start)
start <- Sys.time()
for (x in 1:100000000){
pierw <- x^(1/2)
}
print(Sys.time() - start)
library(schoolmath)
library("schoolmath")
install.packages("schoolmath")
library(schoolmath)
last <- 0
for (x in schoolmath.primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
install.packages("schoolmath")
library(schoolmath)
last <- 0
for (x in schoolmath.primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
install.packages("schoolmath")
library(schoolmath)
last <- 0
for (x in schoolmath.primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
library(schoolmath)
last <- 0
for (x in primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
library(schoolmath)
last <- 0
for (x in schoolmath.primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
install.packages("schoolmath")
library(schoolmath)
last <- 0
for (x in primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
last <- 0
for (x in data("primlist")){
if (x >= 1000){
print(last)
break
}
last <-x
}
print(data("primlist"))
print(data(primlist))
print(primlist)
last <- 0
for (x in primlist){
if (x >= 1000){
print(last)
break
}
last <-x
}
last <- 0
number <- 0
for (x in primlist){
if (x >= 1000){
print(last)
break
}
last <-x
if (x > 100 && x < 500){
number <- number + 1
}
}
print(number)
print(rep("a", 3))
print( paste(rep("a", 3), rep("b", 3)))
print( paste(rep("a", 3), rep("123", 3)))
print( paste(rep("a", 3), 1))
print( paste(rep("a", 3), 1, 2, 3))
for (x in rep("a", 3)){
print(paste(x, 1))
}
print(paste(rep("a", 3), 1:3))
print(paste(rep("a", 3), 1:3, sep = ""))
print(paste(paste(rep("a", 3), 1:3, sep = ""), rep("b", 3), 1:3, sep = ""))
print(paste(paste(rep("a", 3), 1:3, sep = "")))
print(paste(paste(rep("b", 3), 1:3, sep = "")))
print(paste(paste(rep("a", 3), 1:3, sep = "")) + paste(paste(rep("b", 3), 1:3, sep = "")))
print(c(paste(paste(rep("a", 3), 1:3, sep = "")), paste(paste(rep("b", 3), 1:3, sep = ""))))
litery <- c("X", "Y", "Z")
print(paste(1:30, rep(litery, 10)))
litery <- c("X", "Y", "Z")
print(paste(1:30, rep(litery, 10), sep="."))
install.packages("car")
library(car)
odpowiedzi <- c("a", "b", "c", "d", "e")
x <- sample(odpowiedzi, 100, replace = TRUE)
print(recode(x, "c('a', 'b') = 1; c('c', 'd') = 2; 'e' = 3"))