Displaying 1 result from an estimated 1 matches for "cand_receipt".
Did you mean:
cand_receipts
2012 Feb 23
3
I'm sure I'm missing something with formatC() or sprintf()
...lowing frame:
zip
2108
60321
60321
22030
91910
I need row 1 to read '02108'. This forum directed me to formatC previously
(thanks!) That usually works but, for some reason, it's not in this
instance. Neither of the syntaxes below change '2108' to '02108.' The values
in cand_receipts[,1] are of type 'character.'
cand_receipts[,1] <- formatC(cand_receipts[,1], width = 5, format = 's',
flag = '0')
cand_receipts[,1] <- sprintf("%05s", cand_receipts[,1])
Any thoughts?
Thanks,
Zack
--
View this message in context: http://r.789695.n4...