How can I rbind multiple single-value rows to my data frame

0 votes
0

What follows functions as expected:

Data.frame(c(1, 2, 3)) - A

data.frame B (4, 5, 6)

cbind (A, B)

c.1..2..3. X4 X5 X6

1 1 4 5 6

2 2 4 5 6

3 3 4 5 6

Right now, I'm using rbind to transpose:

in data.frame (1, 2, 3)

Bt = data.frame(c(4),(5),(6))

rbind (At, Bt)

Also, this is ineffective:

Rbind(deparse.level,...) error: Numbers of parameters' columns do not match

The following is interestingly supported by both cbind and rbind:

cbind (A, 4, 5, 6)

c.1..2..3. 4 5 6

1 1 4 5 6

2 2 4 5 6

3 3 4 5 6

rbind (At, 4, 5, 6)

X1 X2 X3

1 1 2 3

2 4 4 4

3 5 5 5

4 6 6 6
Jun 24, 2022 in Data Analytics by Avinash
• 1,260 points
548 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
1 answer

How can I append rows to an R data frame?

Consider a dataSet i.e cicar(present under library ...READ MORE

answered May 9, 2018 in Data Analytics by zombie
• 3,790 points
10,767 views
0 votes
1 answer

How to spilt a column of a data frame into multiple columns

it is easily achievable by using "stringr" ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,773 views
0 votes
2 answers

How to remove rows with missing values (NAs) in a data frame?

Hi, The below code returns rows without ...READ MORE

answered Aug 20, 2019 in Data Analytics by anonymous
• 33,030 points
14,761 views
+1 vote
2 answers

How can I drop columns by name in a data frame ?

We can Drop Columns by name in ...READ MORE

answered Apr 14, 2018 in Data Analytics by zombie
• 3,790 points
28,426 views
0 votes
2 answers

How to subset rows containing NA in a chosen column of a data frame?

You can give this a try. subset(dataframe, is.na(dataframe$col2)) ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
10,464 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,570 points
1,030 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
1,178 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
5,890 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
1,111 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP