s-news
[Top] [All Lists]

convert numeric to character

To: s-news@lists.biostat.wustl.edu
Subject: convert numeric to character
From: Nora Muda <noramuda@yahoo.com>
Date: Mon, 5 Feb 2007 01:09:16 -0800 (PST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=S7karqZAkx1mWofkv4rEcX5mDB9s96rWFPoo8ucBgYKjzlUMA4bmgr3nJS7j+5EtOjMOUuD1THX2R37c72uhSAK+sOqUoi16iehDr5UMqHbO5K47lrBk3Eq0sN+hQcZFKARXndr3Tcvg3C0VgllfLbo6iA1WvchyNVThwyFFAxQ=;
Dear S-Plus users,
 
I want to change the 2 digits number become character.
For example:
 
n <- 36
label <- array(dim=n, NA)
 
for(i in 1:n)    label[i] <- i
 
here I want ;
label[10] become 0, and label[11] = A,   label[12] = B, .. etc
eq. output:
 
label:   [1] [2] [ 3] [4]  [5] [6] [7]  [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]
             1    2    3    4     5   6    7    8    9    0     A     B     C     D     E     F    G     H
 
[19][20][21][22][23][24]  [25][25][27][28] [29][30][31][32] [33][ 34][35][36]
   I    J    K    L    M    N    O    P    Q    R    S    T    U    V    W    X    Y    Z 
 
label[11]= A; A=11
 
Is it possible? If yes, how can I convert it to character?
 
Thank you for any suggestions.
 
Nora.
 


Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
<Prev in Thread] Current Thread [Next in Thread>