Deleting a R vector
Deletion of a Vector is the process of deleting all of the elements of the vector. This can be done by assigning it to a NULL value.
R
# R program to delete a Vector # Creating a Vector M<- c (8, 10, 2, 5) # set NULL to the vector M<- NULL cat ( 'Output vector' , M) |
Output:
Output vector NULL
R Vectors
R Vectors are the same as the arrays in R language which are used to hold multiple data values of the same type. One major key point is that in R Programming Language the indexing of the vector will start from ‘1’ and not from ‘0’. We can create numeric vectors and character vectors as well.
Contact Us