# R extract rows and columns of table

In R, I have a list A of size M by N, and each column has a header. I want to do statistics on the rows and columns.

The first row A[1, n] for n = 1, 2, 3, ..., N consists of integers.

I would like to find the average of A[1,n] in this range. Thus, I let B = A[1, ] and calculate mean(B). However, the values are not numeric. They still contain the headers.

B[1] is a list, but B[1,1] is the proper value. So, I calculate mean(B[1,]), but still it says the values are not numeric.

Also, sum(B) works fine, but not mean(B).

I cant find a way to remove the headers from B. I have a simple table containing data. How can I extract its columns and rows without worrying about headers?

gpier
answered question

## Have an answer?

JD

You mean

`A`

is a list of matrices?