我正在执行以下步骤,以便导入一些文本表并将它们保留为列表:
# set working directory - the folder where all selection tables are stored
hypo_selections<-list.files() # change object name according to each species
hypo_list<-lapply(hypo_selections,read.table,sep="\t",header=T) # change object name according to each species
我想要访问一个特定的元素,比如说hypo_list[1]。由于每个元素代表一个表格,我该如何访问特定的单元格(行和列)?
我想要做的事情类似于这样:
a<-hypo_list[1]
a[1,2]
但是我收到了以下错误信息:
Error in a[1, 2] : incorrect number of dimensions
有没有一种聪明的方法来做到这一点?