<div dir="ltr"><div>se vc fizer<br><br>attach(gasoline)<br><br>vc devera' conseguir se referir `as colunas sem precisar lidar com o nome do objeto que as contem.<br><br></div>b<br></div><div class="gmail_extra"><br><br>

<div class="gmail_quote">Em 5 de agosto de 2014 15:58, Ari Clecius <span dir="ltr"><<a href="mailto:ari072000@yahoo.com.br" target="_blank">ari072000@yahoo.com.br</a>></span> escreveu:<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"><a href="tel:%28085%2988412345" value="+558588412345" target="_blank">(085)88412345</a></span><br style="font-weight:bold;font-style:italic">

<span style="font-weight:bold;font-style:italic"><a href="tel:%28085%2933669042" value="+558533669042" target="_blank">(085)33669042</a></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><br clear="all"><br>-- <br><div dir="ltr">

<a href="http://about.me/benilton" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;color:rgb(43,130,173);text-decoration:none;line-height:18.200000762939453px" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px">

<tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">

<td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">

<td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline">

<img src="http://d13pix9kaak6wt.cloudfront.net/signature/me-badge.png" alt="Benilton Carvalho on about.me" width="48" height="48" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block"></div>

</td><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:8px"> </td><td align="left" valign="middle" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:middle;height:48px;line-height:0.9">

<div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)">

Benilton Carvalho</div><div style="margin:2px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline">

about.me/benilton</div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td colspan="3" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:20px">

 </td></tr></tbody></table></a></div>
</div>