Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
Awesome! Thanks so much for your help. I am able to get the format I was looking for. On Mon, Jun 24, 2013 at 2:50 PM, Adams, Jean wrote: > When sharing data, use dput() to output the data in a way that R-Help > readers can easily use. > > Give this code a try and see if it helps. > > Jean > >

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Adams, Jean
When sharing data, use dput() to output the data in a way that R-Help readers can easily use. Give this code a try and see if it helps. Jean # read in the example data mat1 <- structure(list("GENE SYMBOL" = c("ADCK2", "ADCK3", "ADCK4", "ADCK5", "ADRBK1", "ADRBK2", "AKT1", "AKT2", "AKT3", "ALK

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
Sample data is as follows (for simplicity assume mat1 and mat2 are the same matrices). Also attached as an excel file. I want to get the pairwise interaction fischer test results. Not just the pvalues but also want to wrote the n00, n01, n10 and n11 in the file as: ADCK2_mat1 ADCK3_mat2 n00 n01

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Adams, Jean
Could you provide an example of mat1 and mat2 as well as an example of the output you would like from them. Your code is very difficult to follow as written. It will be easier for readers of the list to interpret if you use carriage returns rather than semi colons, for example ... fish <- functi

[R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
** I am using the following way to get p-values from fiser exact test. However, I do need to print for each pair the values "n00, n01, n10, n11". How can I print that as a table and not a matrix as below along with the p-value? Any help will be greatly appreciated fish <- function(y, x) {n00 = s