diff options
Diffstat (limited to 'lab2/intro.r')
| -rwxr-xr-x | lab2/intro.r | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/lab2/intro.r b/lab2/intro.r deleted file mode 100755 index 037210e..0000000 --- a/lab2/intro.r +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env Rscript - -v <- c(1:10, seq(11, 20, by = 2)) - -typeof(1) -typeof(1L) -typeof(v) -typeof(as.integer(v)) -head(v) -str(v) -plot(v) - - -save.image(file = "abc.Rdata") - -v <- seq(1, 10, by = 0.5) -v - -load("abc.Rdata") - -v - - -v <- c("a", "b", "c", "b", "a") - -f <- factor(v) - -func <- function(x, y = 0) { - return((x * x) + y) -} - -func(y = 3, 5) - - -m <- matrix(c(1:6, 11:13), nrow = 3, ncol = 3, byrow = TRUE) -m - -m[2:3, 1:2] - -df <- data.frame(a = c(1:5), b = c("a", "b", "c", "d", "e")) - -df$a -df$b - -df[df$a > 2, ] - - -q("no")
\ No newline at end of file |
