After combining numeric elements into a vector object, individual elements can be retrieved by declaring an index. Below, the first and third indices are retrieved (see Figure 1):
> nums <- c(3, 6, 9, 12, 15, 18)
> nums[1]
[1] 3
> nums[3]
[1] 9
>
After combining numeric elements into a vector object, individual elements can be retrieved by declaring an index. Below, the first and third indices are retrieved (see Figure 1):
> nums <- c(3, 6, 9, 12, 15, 18)
> nums[1]
[1] 3
> nums[3]
[1] 9
>