<div dir="ltr"><div>Andre, bom dia!</div><div><br></div><div>Deve funcionar se transformar "X" em factor().</div><div><br></div><font face="monospace, monospace">mt@data$X <- as.factor(sample(LETTERS[1:4], size = n, replace=T))</font><br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Éder Comunello <<a href="mailto:comunello.eder@gmail.com" target="_blank">c</a><a href="mailto:omunello.eder@gmail.com" target="_blank">omunello.eder@gmail.com</a>> <br>Dourados, MS - [22 16.5'S, 54 49'W]<br></div></div></div>
<br><div class="gmail_quote"><br></div></div></div>