[R] How can I delete column yhat AND STILL retain the order of Response?

BR_email br at dmstat1.com
Sat Apr 1 18:32:58 CEST 2017


Hi R'ers:
Attached, my R_code, the dataset, and my query.
How can I delete column yhat AND STILL retain the order of Response?
When I remove yhat, the resultant dataset has Response in the original 
order,
                     not the reordered version I created.

Any help is greatly accepted.
Thank you, in advance.

Bruce

-- 

-------------- next part --------------
#How can I delete column yhat AND STILL retain the order of Response?


Response    <- read.csv("C:/R_Data/firstRdata.csv", sep=",", header=TRUE)
Response
Response    <- data.frame(Response)
attach(Response)
Response
Response    <- Response[order(-yhat),]
Response    <- Response[rev(order(yhatResponse$yhat)),]
Response



More information about the R-help mailing list