<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div class="" style="">Caros listeiros,</div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class="">Tenho um problema que consiste em transformar um certo número para formato 'character' com comprimento 14. Para isso tentei usar a função base::sprintf, mas para números com mais de 10 dígitos, recebo a mensagem de erro abaixo:</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><br class="" style=""></div><div style="background-color:
transparent" class=""><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">> sprintf('%.14d', 1202342234)</span></div><div style="background-color: transparent" class=""><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">[1] "00001202342234"</span></div><div style="background-color: transparent" class=""><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;"><br></span></div><div style="background-color: transparent" class=""><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">> sprintf('%.14d', 12023422344)</span></div><div style="background-color: transparent" class=""><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif;">Error in sprintf("%.14d", 12023422344) : </span></div><div style="background-color: transparent" class=""><span style="font-family: 'Courier New', courier, monaco, monospace,
sans-serif;"> invalid format '%.14d'; use format %f, %e, %g or %a for numeric objects</span></div><div style="background-color: transparent" class=""><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">Alguém sabe uma forma de contornar isso?</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica
Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">Grato,</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">Rubem</div></div></body></html>