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
Get step-by-step solutions from verified subject matter experts
