[R] how to store a number into a vector
jholtman at gmail.com
Sun Jan 23 23:47:30 CET 2011
Do you want to store each digit as a separate character, or if you
want to compare the last three digits with other numbers, then use the
> x <- 12345
> x %% 1000
On Sun, Jan 23, 2011 at 1:39 PM, Quan Zhou <quan.poko2000 at gmail.com> wrote:
> Hi Everyone,
> A quick question how to store a number like 12345 to a vector or array with
> size(1,5), like 1, 2, 3, 4, 5
> So I can compare if the last three digits of this number is the same with
> some other numbers.
> Thanks a lot
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Data Munger Guru
What is the problem that you are trying to solve?
More information about the R-help