[R] Extracting 'SOME' values from a linear model.

David Winsemius dwinsemius at comcast.net
Sat Apr 3 00:00:54 CEST 2010


On Apr 2, 2010, at 5:32 PM, HouseBandit wrote:

>
> my goal is to return  the selected fitted values ...

Which were never really "selected".

> ... and then perform a sum of
> squares calcuation with them. I have looked at 'list' etc but cant  
> return
> anything. Its either all of the fitted values or just the first and  
> last of
> the sub set that I need.

A) In the future, don't delete the email train.

B) try this code and see if you can get value out of it:

 > vec <- 1:100
 > vec[(length(vec)*0.9):length(vec)]
  [1]  90  91  92  93  94  95  96  97  98  99 100

Mind you this is just a guess at what you wanted because your origianl  
posting seem unclear as to your goal, at least to my reading.

-- 
David.



More information about the R-help mailing list