Muito obrigado Rafael,

Problema resolvido

--
======================================================================
Alexandre dos Santos
Proteção Florestal
IFMT - Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso
Campus Cáceres
Caixa Postal 244
Avenida dos Ramires, s/n
Bairro: Distrito Industrial
Cáceres - MT                      CEP: 78.200-000
Fone: (+55) 65 8132-8112 (TIM)   (+55) 65 9686-6970 (VIVO)
e-mails:[email protected]
        [email protected]
Lattes: http://lattes.cnpq.br/1360403201088680
======================================================================



On 03/06/2015 07:59, Rafael Garcia Cunha wrote:
dados=rnorm(10)
a1=0.05767
a2=0.89000

RES<-NULL
I1 <- NULL
I2 <- NULL
for (i in 1:length(dados)){
  if(dados[i] <= a1){
    I1[i] <- 1
  } else {I1[i] <- 0}
  if(dados[i] <= a2){
    I2[i] <- 1
  } else {I2[i] <- 0}
  RES <- cbind(dados,I1,I2)
}
RES

_______________________________________________
R-br mailing list
[email protected]
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.

Responder a