0

I want to change this R function in order to make my code
faster because it was terribly slow and parallel computing did not save the issue and i did not found the right solution.
fi=function(data,s,dcp,...){
data1=list()
for(k in 1:3){
data1[[k]]=subset(data,p==k)
if(nrow(data1[[k]]) != 0){
d...