Combine Arguments into a Vector in R Programming – c() Function
c() function in R Language is used to combine the arguments passed to it.
Syntax: c(…)
Parameters:
…: arguments to be combined
Example 1:
# R program to cumulative maxima # Calling c() functionx <- c(1, 2, 3, 4)x |
Output:
[1] 1 2 3 4
Example 2:
# R program to cumulative maxima # Calling c() functionx <- c("a", "b", "c", "d")x |
Output:
[1] "a" "b" "c" "d"


