Re: [R] Question about 'lables' ect.

2006-03-16 Thread jia ding
Thanks Marc Liaw! On 3/15/06, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: On Wed, 2006-03-15 at 17:54 +0100, jia ding wrote: Hi, I have a file named: test_R.txt aaa 2 bbb 5 ccc 7 sss 3 xxx 8 I want to have a plot:

Re: [R] Question about 'lables' ect.

2006-03-16 Thread Marc Schwartz
On Thu, 2006-03-16 at 10:37 +0100, jia ding wrote: Thanks Marc Liaw! On 3/15/06, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: On Wed, 2006-03-15 at 17:54 +0100, jia ding wrote: Hi, I have a file named: test_R.txt aaa 2

[R] Question about 'lables' ect.

2006-03-15 Thread jia ding
Hi, I have a file named: test_R.txt aaa 2 bbb 5 ccc 7 sss 3 xxx 8 I want to have a plot: test-read.table(test_R.txt,col.name=c(Name,Score)) par(mfrow=c(1,2)) barplot(test$Score) name-test$Name axis(1,at=1:length(test$Name),labels=paste(name)) Q1, if you try the script above,you will get 5

Re: [R] Question about 'lables' ect.

2006-03-15 Thread Liaw, Andy
Try something like: xp - barplot(test$Score, space=.5) axis(1, at=xp, labels=as.character(test$Name)) See ?barplot more more detail. Andy From: jia ding Hi, I have a file named: test_R.txt aaa 2 bbb 5 ccc 7 sss 3 xxx 8 I want to have a plot:

Re: [R] Question about 'lables' ect.

2006-03-15 Thread Marc Schwartz (via MN)
On Wed, 2006-03-15 at 17:54 +0100, jia ding wrote: Hi, I have a file named: test_R.txt aaa 2 bbb 5 ccc 7 sss 3 xxx 8 I want to have a plot: test-read.table(test_R.txt,col.name=c(Name,Score)) par(mfrow=c(1,2)) It's not clear what the purpose is here, at least in this example.