<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8pt"><div class="" style=""><span class="" style="">Prezados colegas, estou tentando executar um pacote do R, "pls", que tem um conjunto de dados que faz referência a um conjunto de variáveis por um único nome (NIR) que faz referência a várias outras NIR.900 nm... , como faço para configurar isto no R?</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class="" style=""><br></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;"><span class=""
style="">Att,</span></div><div class="" style=""></div><div class="" style=""> </div><div class="" style=""><span style="font-weight:bold;font-style:italic;" class="">Ari Clecius Alves de Lima</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">Engenheiro Químico</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">Me. Engenharia Civil</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">(085)88412345</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">(085)33669042</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; background-color:
transparent;"><span style="font-weight:bold;font-style:italic;" class=""><br></span></div><div style="color: rgb(0, 0, 0); font-size: 11px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; background-color: transparent;" class=""><span style="font-weight:bold;font-style:italic;" class=""><br class="" style=""></span></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">library(pls)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">data("gasoline")</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">class(gasoline)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">[1] "data.frame"</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i
class="" style="">names(gasoline)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">[1] "octane" "NIR" </i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">gasTrain <- gasoline[1:50, ]</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">gasTest <- gasoline[51:60, ]</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO")</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">head(gasoline)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""> octane NIR.900 nm NIR.902 nm NIR.904 nm NIR.906 nm NIR.908 nm NIR.910
nm</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">1 85.30 -0.050193 -0.045903 -0.042187 -0.037177 -0.033348 -0.031207</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">2 85.25 -0.044227 -0.039602 -0.035673 -0.030911 -0.026675 -0.023871</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">3 88.45 -0.046867 -0.04126 -0.036979 -0.031458 -0.02652 -0.023346</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">4 83.40 -0.046705 -0.04224 -0.038561 -0.034513 -0.030206 -0.02768</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i
class="" style="">5 87.90 -0.050859 -0.045145 -0.041025 -0.036357 -0.032747 -0.031498</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><span class="" style=""></span></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">6 85.50 -0.048094 -0.042739 -0.038812 -0.034017 -0.030143 -0.02769</i></b></div></div></body></html>