> trial.table.df <- as.data.frame(trial.table) //assuming that trial.table exits
> str(trial.table.df)
The as.data.frame() function converts a table to a data frame in a format that you need for regression analysis on count data.
If you need to summarize the counts first, you use table() to create the desired table.