Dear Nico
Comment inline
On 22/09/2015 10:36, Nico Gutierrez wrote:
Hi All,
very rusty in R.. my results get overwritten when try to store within the
loop. This my code:
ListS=unique(data$Spec)
Stat<- numeric(0)
for(i in 5){
Is that what you meant? I would have expected something like 1:5
Hi Nico,
A bit difficult to see what is happening without the data, but two
suggestions:
smoothC=mean(SS$Cc[maxC + c(-2:2)],na.rm=TRUE)
...
Stat[i]<-Index
Jim
On Tue, Sep 22, 2015 at 7:36 PM, Nico Gutierrez
wrote:
> Hi All,
>
> very rusty in R.. my results get overwritten when try to store wi
Hi All,
very rusty in R.. my results get overwritten when try to store within the
loop. This my code:
ListS=unique(data$Spec)
Stat<- numeric(0)
for(i in 5){
SS=subset(data,data$Spec==ListS[i])
maxC<- which.max(SS$Cc)
smoothC=mean(SS$Cc[maxC + c(-2:2)])
currC=tail(SS,1)$Cc
Index=currC/smoothC
St
3 matches
Mail list logo