Change Name of Vector or Data Frame Object in R (Example Code)
This post illustrates how to rename data objects in R.
Creating Example Data
my_x <- 1:5 # Create vector object my_x # Show vector in RStudio console # [1] 1 2 3 4 5 |
my_x <- 1:5 # Create vector object my_x # Show vector in RStudio console # [1] 1 2 3 4 5
Example: Store Values of Vector in New Data Object
my_x_new <- my_x # Rename data object in R my_x_new # Show new vector object in RStudio console # [1] 1 2 3 4 5 |
my_x_new <- my_x # Rename data object in R my_x_new # Show new vector object in RStudio console # [1] 1 2 3 4 5
Further Resources
Have a look at the following tutorials. They explain topics such as lines, graphics in R, data objects, and character strings: