我正在执行以下操作以导入一些txt表并将它们保存为列表:
# 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
Run Code Online (Sandbox Code Playgroud)
我想访问一个特定的元素,比如说hypo_list [1].由于每个元素代表一个表,我应该如何获取访问特定单元格(行和列)?
我想做类似的事情:
a<-hypo_list[1]
a[1,2]
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误消息:
Error in a[1, 2] : incorrect number of dimensions
Run Code Online (Sandbox Code Playgroud)
有一个聪明的方法吗?
提前致谢!