<div dir="ltr">Esse?<div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style><br></div><div style><span style="font-family:arial,sans-serif;font-size:13px">E aí, galera!</span></div><div style><br style="font-family:arial,sans-serif;font-size:13px">
</div><div style><span style="font-family:arial,sans-serif;font-size:13px">Tirem onda aí com as respectivas "patroas" (</span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> ideal seria no dia dos namorados, mas... TODO DIA É DIA!).</span></div>
<div style><span class="" style="font-family:arial,sans-serif;font-size:13px">Mostre</span><span style="font-family:arial,sans-serif;font-size:13px"> que </span><span class="" style="font-family:arial,sans-serif;font-size:13px">você</span><span style="font-family:arial,sans-serif;font-size:13px"> sabe R de todo </span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> coraçã</span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> !!!</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">Basta copiar e colar </span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> código abaixo e terã</span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> uma supresa... Muito bonita (para elas, em especial).</span></div>
<div style><br style="font-family:arial,sans-serif;font-size:13px"></div><div style><span style="font-family:arial,sans-serif;font-size:13px">#-----------------------------</span><span style="font-family:arial,sans-serif;font-size:13px">------------------------------</span><span style="font-family:arial,sans-serif;font-size:13px">-----</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">core=function(nome="Meu amor")</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">{</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">  x=seq(-2,2,0.001)</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  y1=sqrt(1-((abs(x)-1)^2))</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">  y2=-3*sqrt(1-(sqrt(abs(x))/</span><span style="font-family:arial,sans-serif;font-size:13px">sqrt(2)))</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  plot(main="Enfim, achei uma fórmula </span><span class="" style="font-family:arial,sans-serif;font-size:13px">pra</span><span style="font-family:arial,sans-serif;font-size:13px"> explicar", ylab="</span><a href="http://www.profmsouza.blogspot.com/" target="_blank" style="font-family:arial,sans-serif;font-size:13px">www.profmsouza.blogspot.com</a><span style="font-family:arial,sans-serif;font-size:13px">",xlab="</span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> que sinto por </span><span class="" style="font-family:arial,sans-serif;font-size:13px">você</span><span style="font-family:arial,sans-serif;font-size:13px">...",sub=nome,c(x,x),c(y1,</span><span style="font-family:arial,sans-serif;font-size:13px">y2),lwd=3,pch=20,cex=6)</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  grid()</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">  cores=paste(c("red","tomato"),</span><span style="font-family:arial,sans-serif;font-size:13px">sort(rep(1:4,2)),sep="")</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  eq=c("( AM + BC ) * X = AM ( X + BOC ) - BCTE","AMX + BCX = AMX + AMBOC - BCTE","BCX = AMX - AMX + BC (AMO - TE)","BCX = BC ( AMO - TE )","X = ???")</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  pos=c(-0.3,-0.6,-0.9,-1.2,-1.</span><span style="font-family:arial,sans-serif;font-size:13px">5)</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">  cont=0</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  for (i in 1:30)</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">  {</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">    points(c(x,x),c(y1,y2),col=</span><span style="font-family:arial,sans-serif;font-size:13px">cores[sample(1:8,1)],lwd=</span><span style="font-family:arial,sans-serif;font-size:13px">sample(1:4,1),pch=20,cex=</span><span style="font-family:arial,sans-serif;font-size:13px">round(runif(1,1,4)))</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">    if (i%%5 == 0 & i <=25)</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">    {</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">      cont=cont+1</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">      text(0,pos[cont],eq[cont])</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">    }</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">  }</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">  text(1.2,-2.5,"AMO-TE",col="</span><span style="font-family:arial,sans-serif;font-size:13px">red",cex=3)</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">}</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">core()</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"># Se quiser personalizar, basta colocar </span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> nome de </span><span class="" style="font-family:arial,sans-serif;font-size:13px">sua</span><span style="font-family:arial,sans-serif;font-size:13px"> amada (entre aspas) como parâmetro da funçã</span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> core (e.g.: core("Cíntia"), escreveria </span><span class="" style="font-family:arial,sans-serif;font-size:13px">o</span><span style="font-family:arial,sans-serif;font-size:13px"> nome de minha amada... rs)</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"># Bom namoro </span><span class="" style="font-family:arial,sans-serif;font-size:13px">pra</span><span style="font-family:arial,sans-serif;font-size:13px"> vocês!</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px">#-----------------------------</span><span style="font-family:arial,sans-serif;font-size:13px">------------------------------</span><span style="font-family:arial,sans-serif;font-size:13px">-----</span></div>
<div style><br style="font-family:arial,sans-serif;font-size:13px"></div><div style><span style="font-family:arial,sans-serif;font-size:13px">-- </span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Prof. Márcio Souza, M.Sc. (DE/UFJF)</span></div>
<div style><a href="http://www.profmsouza.blogspot.com/" target="_blank" style="font-family:arial,sans-serif;font-size:13px">www.profmsouza.blogspot.com</a></div><div style><a href="http://lattes.cnpq.br/4578008002785684" target="_blank" style="font-family:arial,sans-serif;font-size:13px">http://lattes.cnpq.br/4578008002785684</a></div>
</blockquote></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/11 walmes . <span dir="ltr"><<a href="mailto:walmeszeviani@gmail.com" target="_blank">walmeszeviani@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="trebuchet ms,sans-serif">Saudações pessoal,<br><br>Alguém tem cópia daquele código R, uma vez compartilhado na lista, acho que na época do R-STAT ainda.<br>
</font><font face="trebuchet ms,sans-serif"><font face="trebuchet ms,sans-serif">O código que falo é aquele que tem um laço for(), as cores mudam com a execução.<br>
</font>Dou aula sobre funções hoje e quinta e queria motivar os alunos à presentear suas respectivas com um CMR amoroso.<br>Ou provocar logo a separação dependendo do senso de humor e diferença de nerdismo do casal.<br>Versões simples eu encontrei em:<br>

<a href="http://stackoverflow.com/questions/8082429/plot-a-heart-in-r" target="_blank">http://stackoverflow.com/questions/8082429/plot-a-heart-in-r</a><br><a href="http://blog.revolutionanalytics.com/2013/02/make-a-valentines-heart-with-r.html" target="_blank">http://blog.revolutionanalytics.com/2013/02/make-a-valentines-heart-with-r.html</a><br>

<a href="http://rud.is/b/2013/02/14/happy-valentines-day-mrshrbrmstr/" target="_blank">http://rud.is/b/2013/02/14/happy-valentines-day-mrshrbrmstr/</a><br><br>Grato.<br>Walmes.<br><br clear="all"></font><div><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: <a href="tel:%28%2B55%29%2041%203361%203573" value="+554133613573" target="_blank">(+55) 41 3361 3573</a></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><br>

skype: walmeszeviani<br style="font-family:trebuchet ms,sans-serif"></span><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></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>