What does c do in R

0 votes
What exaclty is the role of C inR
Jun 1 in Data Science by Avinash
• 240 points
14 views

1 answer to this question.

0 votes

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.

answered Jun 1 by Sohail
• 2,280 points

Related Questions In Data Science

0 votes
1 answer

Why is it not advisable to use attach() in R, and what should I use instead?

There is one more option that applies ...READ MORE

answered 4 days ago in Data Science by Sohail
• 2,280 points
7 views
0 votes
0 answers

Introduction to Statistical Learning with Applications in R Figure Codes

I recently bought the following book: An Introduction ...READ MORE

Jun 1 in Data Science by avinash
• 860 points
19 views
0 votes
1 answer

Difference between the == and %in% operators in R

percent in percent "returns a vector of ...READ MORE

answered Jun 20 in Data Science by Sohail
• 2,280 points
15 views
0 votes
1 answer

Difference between the == and %in% operators in R

According to help('percent in percent'), percent in ...READ MORE

answered 5 days ago in Data Science by Sohail
• 2,280 points
9 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,610 points
422 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
467 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
4,280 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
491 views
0 votes
1 answer

What does |> (pipe greater than) mean in R?

The "pipe" operator in R is |>. ...READ MORE

answered Jun 14 in Data Science by Sohail
• 2,280 points
15 views
0 votes
1 answer

do-while loop in R

Unlike for and while loops, which test the loop condition at ...READ MORE

answered Jun 1 in Data Science by Sohail
• 2,280 points
19 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP