dataframe - reshaping data frame into contingency table in R -


i have series of excel files following contain contingency table :

         cns random h3k       12  682 not_h3k  343  30222 

when use 'gdata' library read file using command, gives following table not contingency table anymore:

random <- read.xls ("analysis.xlsx", sheet = 1, header = true)                x    cns   random         1     utr  12    682         2 not_utr 343  30222 

i want run fisher test on data, how can reshape data.frame data contingency table format?

read.xls allows arguments read.table. specifically, can specify number of column contains row names. use

random <- read.xls ("analysis.xlsx", sheet = 1, header = true, row.names=1) 

and proceed test


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -