Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started