My code runs fine on local machine but while submitting in express lane for Sub challenge 1, the sort and order command in R gives error. Any idea why it is not working. My Submission ID is 9643630.

Created by sherry bhalla sherry_bhalla
Dear Gajendra, I wanted to follow up on this issue and say that it has been fixed. best, Tom
Dear Gajendra and Sherry, I played around with your code and I realized that I should have paid more attention while I was subsetting the training data to create the express lane data. There are rows where every sample is NA, which is when your k value becomes 6. So your line of code will be: ``` idx2=order(x)[1:6][6] #This value will be NA trainn[j,i]=trainn[j,idx2] #actual replacement` Error in `[<-.data.frame`(`*tmp*`, j, i, value = NULL) : replacement has length zero ``` I will fix the express lane data for round 2. Apologies for the inconvenience. Best, Tom
In continuation to above, following is R code k=2 idx2=which(x==sort(x,partial=k)[k])[1] and following is error Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : index 6 outside bounds Calls: which -> sort -> sort.default -> sort.int Execution halted ========= When we are using order command then we are getting following error Error in `[<-.data.frame`(`*tmp*`, j, i, value = NULL) : replacement has length zero Calls: [<- -> [<-.data.frame Execution halted

sort and order command not working while running on Docker. page is loading…