x <- rnorm(100)
y <- runif(100)
ks.test(x, y)
## 
##  Two-sample Kolmogorov-Smirnov test
## 
## data:  x and y
## D = 0.46, p-value = 1.292e-09
## alternative hypothesis: two-sided
x1 <- rnorm(100)
y1 <- rnorm(60)
ks.test(x1, y1)
## 
##  Two-sample Kolmogorov-Smirnov test
## 
## data:  x1 and y1
## D = 0.17333, p-value = 0.1895
## alternative hypothesis: two-sided
x <- rnorm(1e5, 1, 2)
ks.test(x, "pnorm", 1, 2)
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  x
## D = 0.0031201, p-value = 0.2846
## alternative hypothesis: two-sided