<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span>Caro Colegas,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Bom dia.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Eu estou tentando construir uma PCA no base, mas estou entendo alguns problema.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color:
rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="background-color: transparent;">Tenho uma data.frame com uma célula com valor "#F7F7F7" (dm.x[,1+i]) e gostaria de substitui-la por outro valor de acordo com o valor de uma célula especifica,</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">assim tenho:</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">dm.x[,2][which(dm.x[,1] == 0)] <- #D9D9D9<br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new
york', times, serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">Erro.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><br></div><div style="background-color: transparent;"><div style="background-color: transparent;">Mensagens de aviso perdidas:</div><div style="background-color: transparent;">In `[<-.factor`(`*tmp*`, which(dm.x[, 1 + i] == var[[ii, 1]]), value = c(NA_integer_, :</div><div style="background-color: transparent;"> invalid factor level, NAs generated</div></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><br></div><div style="background-color:
transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;">Obrigando</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> </div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><font face="times new roman, new york, times, serif">Alisson Lucrécio da Costa</font></div></div></body></html>