seq(residuals)[abs(residuals) > (2*sd)]
gcm wrote on 07/16/2012 07:39:20 AM:
> But I'll need the indexes and that gives me the values. I need to
> then be able to make the indexes into a list of numbers.
>
> From: Jean V Adams [via R] [
mailto:ml-node+s789695n4636641...@n4.nabble.com]
> Sent:
But I'll need the indexes and that gives me the values. I need to then be able
to make the indexes into a list of numbers.
From: Jean V Adams [via R] [mailto:ml-node+s789695n4636641...@n4.nabble.com]
Sent: Monday, July 16, 2012 8:38 AM
To: Lauren Vogric
Subject: Re: Grabbing Indexes of a certain
residuals[abs(residuals) > (2*sd)]
gcm wrote on 07/16/2012 07:07:31 AM:
> Jean, how would you modify your function to grab all the selected
> and not just the first?
> Thank you so much!
>
> From: Jean V Adams [via R] [
mailto:ml-node+s789695n4636370...@n4.nabble.com]
> Sent: Thursday, July 1
Jean, how would you modify your function to grab all the selected and not just
the first?
Thank you so much!
From: Jean V Adams [via R] [mailto:ml-node+s789695n4636370...@n4.nabble.com]
Sent: Thursday, July 12, 2012 4:59 PM
To: Lauren Vogric
Subject: Re: Grabbing Indexes of a certain standard dev
Thank you a ton! This is perfect!
From: Jean V Adams [via R] [mailto:ml-node+s789695n4636370...@n4.nabble.com]
Sent: Thursday, July 12, 2012 4:59 PM
To: Lauren Vogric
Subject: Re: Grabbing Indexes of a certain standard deviation
I wrote a little function called first() to help with situations lik
I wrote a little function called first() to help with situations like
this. It returns a 1 every time an element of a vector is different from
the previous element, and a 0 otherwise.
first <- function(x) {
L <- length(x)
c(1, 1-(x[-1]==x[-L]))
}
sd <- 1
residuals <- c(1, 2.1, 3, 4
6 matches
Mail list logo