<font face="trebuchet ms,sans-serif">JC Faria,<br><br>Uma opção seria passar a fórmula a ser avaliada dentro do quote() e não como string. Veja<br><br><span style="font-family: courier new,monospace;">> mF <- function(x=seq(1, 5, by=1),</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ y=seq(0, 10, by=5),</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ z=<b>quote</b>(2 - 0.4*y - 0.5*x + 0.8*sqrt(x))){</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ z <- outer(x, y,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ function(x, y){</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ x <- x; y <- y</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ <b>eval</b>(z)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ )</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">+ z</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+ }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">> mF()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> [,1] [,2] [,3]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[1,] 2.300000 0.3000000 -1.700000</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[2,] 2.131371 0.1313708 -1.868629</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[3,] 1.885641 -0.1143594 -2.114359</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[4,] 1.600000 -0.4000000 -2.400000</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[5,] 1.288854 -0.7111456 -2.711146</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">> </span><br style="font-family: courier new,monospace;"><br>Para usar a string </font><font face="trebuchet ms,sans-serif">teriamos que arrumar um jeito de converter string (entrada) para language (saída do quote())</font>.<br>
<font face="trebuchet ms,sans-serif"><br>À disposição.<br>Walmes.<br><br clear="all"></font><span style="font-family: trebuchet ms,sans-serif;">==========================================================================</span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">Walmes Marques Zeviani</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">fone: (+55) 41 3361 3573</span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">VoIP: (3361 3600) 1053 1173</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a></span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">twitter: @walmeszeviani</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family: trebuchet ms,sans-serif;">
<span style="font-family: trebuchet ms,sans-serif;">linux user number: 531218</span><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">==========================================================================</span><br>