Can rows be converted into columns in R

0 votes
Can rows be converted into columns in R?
Dec 11, 2018 in Data Analytics by Ali
• 11,360 points
474 views

1 answer to this question.

0 votes

You can use of the R package called tidyr. Something like this:

library(tidyr)
txt <- read.delim(text = "SUBD | X1 | X2
0 |.789|.655
1 |.889|.998", sep = "|")
gather(txt, WK, Per, -SUBD)
answered Dec 11, 2018 by Maverick
• 10,840 points

Related Questions In Data Analytics

0 votes
0 answers

Convert columns into rows in R Data frame

Can we convert columns into rows in ...READ MORE

Jul 12, 2019 in Data Analytics by Anita
1,718 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,188 views
0 votes
1 answer

How can I remove duplicated rows in R ?

The function distinct() in the dplyr package ...READ MORE

answered Apr 27, 2018 in Data Analytics by shams
• 3,670 points
2,989 views
0 votes
3 answers

Can a C program be written in R programming language?

If you have a algorithm you can ...READ MORE

answered Apr 9, 2019 in Data Analytics by anonymous
1,957 views
+10 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 9, 2018 in Data Analytics by Abhi
• 3,720 points
1,640 views
+1 vote
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
4,838 views
0 votes
1 answer

Trying to find frequent itemsets of a data set using arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", "milk", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
818 views
0 votes
1 answer

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
1,772 views
+1 vote
1 answer

Can R and hadoop be used together to get better results?

The most common way to link R ...READ MORE

answered Nov 2, 2018 in Data Analytics by Maverick
• 10,840 points
504 views
+1 vote
2 answers
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