Sort a field based on another field in R

0 votes
Hi, I want to sort the students as per percentage of marks and show the student Id, department. Can someone help.
Jul 15 in Data Analytics by priya
24 views

1 answer to this question.

0 votes
Hi..

Just for sorting, you can use arrange function..

In case you want to get only those students who are within the specified percentage

You can try filter function for percentage of marks...save as a df.. use select function for selecting desired columns only such as name and department..

Hope it helps

regards
answered Aug 29 by Gups_1985
Thanks, @Gups_1985.

Related Questions In Data Analytics

0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,690 points
546 views
0 votes
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21 in Data Analytics by anonymous
• 28,320 points
137 views
0 votes
1 answer

Any filter based on conditional criteria in r?

Consider a data frame like this: #Create DF ...READ MORE

answered May 11, 2018 in Data Analytics by darklord
• 6,170 points
37 views
0 votes
1 answer

How to replace a value in a data frame based on a conditional 'If' statement?

It's easier to convert alpha to characters ...READ MORE

answered Jun 6, 2018 in Data Analytics by darklord
• 6,170 points
85 views
0 votes
1 answer

Extract a subset of a data frame based on a condition involving a field

Here are the two main approaches. I ...READ MORE

answered Jun 18, 2018 in Data Analytics by CodingByHeart77
• 3,690 points
761 views
0 votes
2 answers

How to use group by for multiple columns in dplyr, using string vector input in R?

data = data.frame(   zzz11def = sample(LETTERS[1:3], 100, replace=TRUE),   zbc123qws1 ...READ MORE

answered Aug 5 in Data Analytics by anonymous
3,230 views
0 votes
1 answer

How to group all columns exculding a single column?

You can either use group_by or group_by_at Using ...READ MORE

answered Apr 12, 2018 in Data Analytics by darklord
• 6,170 points
78 views
0 votes
0 answers

dplyr R - Pipelining

Hi, can you tell how pipelining works ...READ MORE

Jul 12 in Data Analytics by riya
27 views
0 votes
1 answer

How to use add_tally() and add_count()

Hey, add_tally and add_count returns the count of ...READ MORE

answered Sep 10 in Data Analytics by Cherukuri
• 28,320 points
30 views