Question: a) Write a function in R to order a data frame by one of its columns. In other words, rearrange the rows such that one

a) Write a function in R to order a data frame by one of its columns. In other words, rearrange the rows such that one of the columns which is indicated by the "index" variable below is given in ascending order.

function(file, index)

{

}

b) Write a function in R that will order a function by the entries in column "index1" but breaks ties in the entries using "index2" and returns the resulting sorted data set.

function(file, index1, index2)

{

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!