RE: [R] a little question about R
You can use letters[1:4]. (B (BI hope that this helps, (B John (B (B -Original Message- (B From: [EMAIL PROTECTED] (B [mailto:[EMAIL PROTECTED] On Behalf Of ?? (B Sent: Tuesday, September 07, 2004 7:42 PM (B To: [EMAIL PROTECTED] (B Subject: [R] a little question about R (B (B Hello,sir: Here's a little question about R which needs your (B help.Thanks in advance. (B If I wanna make a sequence just like a,b,c,d (In other (B words,a vector consists of 4 characters :a,b,c,d ).How can I (B do it in a shortcut manner? Yes,I can do it as following: (B c("a","b","c","d") and the result is:[1] "a" "b" "c" "d". (B But I remember there's a shortcut manner to do the same (B thing,something like c("a":"d").But the system said:"Error in (B "a":"d" : NA/NaN argument" So I wonder the correct method to (B do it(I remember the expression is very similar with (B c("a":"d")). Thanks from the bottom of my heart. My best regards! (B (B (B__ (B[EMAIL PROTECTED] mailing list (Bhttps://stat.ethz.ch/mailman/listinfo/r-help (BPLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] a little question about R
Try letters[1:4] -roger wrote: Hello,sir: Here's a little question about R which needs your help.Thanks in advance. If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as following: c(a,b,c,d) and the result is:[1] a b c d. But I remember there's a shortcut manner to do the same thing,something like c(a:d).But the system said:Error in a:d : NA/NaN argument So I wonder the correct method to do it(I remember the expression is very similar with c(a:d)). Thanks from the bottom of my heart. My best regards! __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] a little question about R
letters[1;4] LETTERS[1:4] for capitals. Hope this helps, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 07, 2004 8:42 PM To: [EMAIL PROTECTED] Subject: [R] a little question about R Hello,sir: Here's a little question about R which needs your help.Thanks in advance. If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as following: c(a,b,c,d) and the result is:[1] a b c d. But I remember there's a shortcut manner to do the same thing,something like c(a:d).But the system said:Error in a:d : NA/NaN argument So I wonder the correct method to do it(I remember the expression is very similar with c(a:d)). Thanks from the bottom of my heart. My best regards! __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] a little question about R
letters[1:4] Alec Stephenson Department of Statistics Macquarie University NSW 2109, Australia $(AÃÏÐÀ [EMAIL PROTECTED] 09/08/04 10:41am Hello,sir: Here's a little question about R which needs your help.Thanks in advance. If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as following: c(a,b,c,d) and the result is:[1] a b c d. But I remember there's a shortcut manner to do the same thing,something like c(a:d).But the system said:Error in a:d : NA/NaN argument So I wonder the correct method to do it(I remember the expression is very similar with c(a:d)). Thanks from the bottom of my heart. My best regards! __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] a little question about R
Hi, On Wed, 8 Sep 2004, [gb2312] ÃÏÐÀ wrote: Hello,sir: Here's a little question about R which needs your help.Thanks in advance. If I wanna make a sequence just like a,b,c,d (In other words,a vector consists of 4 characters :a,b,c,d ).How can I do it in a shortcut manner? Yes,I can do it as following: c(a,b,c,d) and the result is:[1] a b c d. But I remember there's a shortcut manner to do the same thing,something like How about letters[1:4] Ko-Kang Kevin Wang PhD Student Centre for Mathematics and its Applications Building 27, Room 1004 Mathematical Sciences Institute (MSI) Australian National University Canberra, ACT 0200 Australia Homepage: http://wwwmaths.anu.edu.au/~wangk/ Ph (W): +61-2-6125-2431 Ph (H): +61-2-6125-7407 Ph (M): +61-40-451-8301 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html