<div dir="ltr">Pelo que entendi, tu nao quer digitar todos os nomes das variaveis independentes. Se for, isso deve funcionar:<div><br></div><div>gas1 <- plsr(octane ~ ., ncomp = 10, data = gasTrain, validation = "LOO")</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-05 15:58 GMT-03:00 Ari Clecius <span dir="ltr"><<a href="mailto:ari072000@yahoo.com.br" target="_blank">ari072000@yahoo.com.br</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:8pt">
<div><span>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 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><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:normal;background-color:transparent">
<span>Att,</span></div><div></div><div> </div><div><span style="font-weight:bold;font-style:italic">Ari Clecius Alves de Lima</span><br style="font-weight:bold;font-style:italic"><span style="font-weight:bold;font-style:italic">Engenheiro Químico</span><br style="font-weight:bold;font-style:italic">
<span style="font-weight:bold;font-style:italic">Me. Engenharia Civil</span><br style="font-weight:bold;font-style:italic"><span style="font-weight:bold;font-style:italic">(085)88412345</span><br style="font-weight:bold;font-style:italic">
<span style="font-weight:bold;font-style:italic">(085)33669042</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">
<span style="font-weight:bold;font-style:italic"><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">
<span style="font-weight:bold;font-style:italic"><br></span></div><div style="background-color:transparent"><b><i>library(pls)</i></b></div><div style="background-color:transparent"><b><i>data("gasoline")</i></b></div>
<div style="background-color:transparent"><b><i>class(gasoline)</i></b></div><div style="background-color:transparent"><b><i>[1] "data.frame"</i></b></div><div style="background-color:transparent"><b><i>names(gasoline)</i></b></div>
<div style="background-color:transparent"><b><i>[1] "octane" "NIR" </i></b></div><div style="background-color:transparent"><b><i>gasTrain <- gasoline[1:50, ]</i></b></div><div style="background-color:transparent">
<b><i>gasTest <- gasoline[51:60, ]</i></b></div><div style="background-color:transparent"><b><i>gas1 <- plsr(octane ~ NIR, ncomp = 10, data = gasTrain, validation = "LOO")</i></b></div><div style="background-color:transparent">
<b><i>head(gasoline)</i></b></div><div style="background-color:transparent"><b><i> 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"><b><i>1 85.30 -0.050193 -0.045903 -0.042187 -0.037177 -0.033348 -0.031207</i></b></div><div style="background-color:transparent"><b><i>2 85.25 -0.044227 -0.039602 -0.035673 -0.030911 -0.026675 -0.023871</i></b></div>
<div style="background-color:transparent"><b><i>3 88.45 -0.046867 -0.04126 -0.036979 -0.031458 -0.02652 -0.023346</i></b></div><div style="background-color:transparent"><b><i>4 83.40 -0.046705 -0.04224 -0.038561 -0.034513 -0.030206 -0.02768</i></b></div>
<div style="background-color:transparent"><b><i>5 87.90 -0.050859 -0.045145 -0.041025 -0.036357 -0.032747 -0.031498</i></b></div><div style="background-color:transparent"><b><i><span></span></i></b></div><div style="background-color:transparent">
<b><i>6 85.50 -0.048094 -0.042739 -0.038812 -0.034017 -0.030143 -0.02769</i></b></div></div></div><br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br></div>