Input Scalar

To input scalar value into variables, use -> operator.

x <- 2

Input Vector

Also, you can input vector easily. Use the function of c()./p>

v <- c(2,2,3,4)

When you want to inspect specific index of a vector, command like following.

v <- c(2,2,3,4)
v[2]

You can combine vectors.

x <- c(1, 2, 3);  y <- c(4, 5, 6);  z <- c(7, 8, 9)
v <- c(x, y, z)

Create Data Frame

You can hold the data as table form. Use the function of data.frame. When you want to inspect specific column of data frame, use the operator of $.

x <- c(1, 2, 3);  y <- c(4, 5, 6)
f <- data.frame(X=x,Y=y)
f$X