[R] problem using rank

2007-08-17 Thread Jiong Zhang, PhD
Hi All, I had 12766 elements in a column, 12566 are values and 200 are NAs. I used the following line to get the ranks: total_list$MB.rank - rank(-total_list$MB,ties.method=min,na.last=NA) but I got an error message: Error in `$-.data.frame`(`*tmp*`, BCRP_PW_F.rank, value = c(3949, 6182, :

[R] combining P values using Fisher's method

2007-08-16 Thread Jiong Zhang, PhD
Hi All, Can somebody tell me how to use R to combine p values using Fisher's method? thanks. Jiong The email message (and any attachments) is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is

[R] rank in decreasing order

2007-08-06 Thread Jiong Zhang, PhD
Hi All, I want to give ranks to elements in a column so I used: total_list$field1.rank - rank(total_list$field1,ties.method=min) But this gives me the rank in increasing order. How do I get the ranks in decreasing order? I know decreasing = FALSE is not a legal argument here. Thanks. Jiong

[R] displaying one page at a time in the console

2007-07-02 Thread Jiong Zhang, PhD
Hi all, How do I ask the console to display one page at a time for commands such as names()? Thanks. jiong The email message (and any attachments) is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or

[R] stack multiple plots on one page

2007-06-28 Thread Jiong Zhang, PhD
Hi All, I typed pairs to see its code but did not get what I want. How do I see its code? What I am trying to do, is to stack about 10 scatter plots on one page as the way pairs does. I have about 150 variables in my table. Instead of plotting 150X150 pairs using pairs, I only need to plot 10

[R] why this doesn't work for qqnorm

2007-06-28 Thread Jiong Zhang, PhD
I want to qqnorm every column in a table. When I try the first column using qqnorm(table$column1), it worked. But when I use qqnorm(table[1]), it tells me Error in stripchart(x1, ...) : invalid plotting method. What happen? How can I make a function that qqnorms every column? thanks a lot.

[R] running saved scripts

2007-06-27 Thread Jiong Zhang, PhD
Hi All, I have a rather naive question. I need to run some simple calculations such as read.table, resid, and quantile on a data file. How can I save these commands in a text file and ask R to run this text file? Thanks. Jiong Zhang The email message (and any attachments) is for the sole use

[R] if statement

2007-06-13 Thread Jiong Zhang, PhD
Hi all, I have a rather naive question. I have the height of 100 individuals in a table and I want to assign the tallest 30% as Case=1 and the bottom 30% as Case=0. How do I do that? thanks. jiong The email message (and any attachments) is for the sole use of the intended recipient(s) and