Hi
I am trying to make some changes in data frame and return it to function .this 
is my function
rm.outliers = function(model,xsys)
{

  rst = rstudent(model)
  outliers<<-vector("numeric",10)
  xsys<<-xsys
for(i in 1:length(rst))
  {
    if(rst[i]<-3  & rst[i]>=-3)
      {
      #print("this is not outlier")
      print(i)
    }
    else
      {
      print("this is an outlier")
      print(i)
      outliers[i]<<-c(i)
      print(outliers)

    }

    i<-i+1
  }

xsys<-xsys[-outliers,]
print(" printing rows")
nrow(xsys)
return(xsys)
}
After returning xsys dataframe its not making changes in my global environment 
data frame.
I tried assign and <<- but no use.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to