The c function in R programming usually stands for 'combine.' This function is used to get the output by giving parameters inside the function. The parameters are of the format c(row, column), also we can extract data in three ways:
- It is used to extract rows, use c(row, )
- Also to extract columns, use c( , column)
- Extract rows and columns together, use c(row, column)
Here, you give row and column numbers of the dataset that you are using, and the function will return a vector.
Also, the c() function can be used to combine two vectors.