The c function in R programming 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). With the c function, you can extract data in three ways:
- To extract rows, use c(row, )
- To extract columns, use c( , column)
- To 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.