Displaying 1 result from an estimated 1 matches for "tripleind".
Did you mean:
tripled
2012 Mar 01
5
select rows by criteria
Hello,
I am stuck with selecting the right rows from a data frame. I think the
problem is rather how to select them
then how to implement the R code.
Consider the following data frame:
df <- data.frame(ID = c(1,2,3,4,5,6,7,8,9,10), value =
c(34,12,23,25,34,42,48,29,30,27))
What I want to achieve is to select 7 rows (values) so that the mean value
of those rows are closest
to the value of 35