Adding elements in a vector in R programming – append() method
append() method in R programming is used to append the different types of integer values into a vector in the last.
append(x, value, index(optional))
Return: Returns the new vector after appending given value.
x <- rep(10:15)
# Using rep() method
gfg <- append(x, 1, 1)
 1 2 3 4 5 10
 10 1 11 12 13 14 15
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!