我有这个功能(它似乎不起作用):
cluster_per_project <- function(clusterX_PR_ids, name){
clusterX_PR_ids_new <- clusterX_PR_ids %>%
select(project, PR_ids) %>%
filter(project == name)
project_cX <- name[rownames(name) %in% clusterX_PR_ids_new$PR_ids,]
output <- seqdef(project_cX, right = "DEL")
return(output)
}
我认为问题是输入name
应该是函数第1行的字符串(即&#34; name&#34;),而是第3行的对象(即名称)。有没有办法调整此行为,或者我只需要传递两个参数(name
和"name"
)?