Here I make a new column to indicate whether myData is above or below its median
### MedianSplits based on Whole Data #create some test data myDataFrame=data.fra
You weren't looking for something like this, were you?
Course$grade2 <- ifelse(Course$grade >= median(Course$grade), 1, 0)