Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Transforming Dataframe in R...How to Categorize based on unique row values

$
0
0

@raj_265 wrote:

I have a data frame that looks like this:
Name Subject Marks
A Biology 55
B maths 70
A Physics 30

I want to transform it into
Name Subject1 Subject2 Marks1 Marks2
A Biology Physics 55 30
B maths NA 70 NA

Dcast function does not work as it has duplicate records. How to achieve this using R

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles