[R-sig-teaching] subsetting data with the median position

Steven Stoline sstoline at gmail.com
Tue Dec 22 09:36:47 CET 2015


Dear All:

is there away for subsetting data by the median position?


Example:
------------


*Data1: *2, 4, 8, 9,11,11,12  *(n is odd)*

*Data1: *2,4,8,9,11,11,12,15

*  (n is even)*
for Data1:

* I want to get:*

*lower half:      2    4    8*


*upper half:    11   11   12*



*for Data2: I want to get:*

*lower half:     2   4      8    9*

*upper half:   11   11   12   15*


with many thanks
steve

-- 
Steven M. Stoline
1123 Forest Avenue
Portland, ME 04112
sstoline at gmail.com

	[[alternative HTML version deleted]]



More information about the R-sig-teaching mailing list