I used *lapply* and *for* to call the function *GetC* respectively. The
output is different!!! I can't figured out how this happen! It's so wierd.


> x=lapply(ipi.go,GetC, ont = "BP", org=cell.cycle)
> unlist(x)
*IPI00011654 IPI00013683
"cell cycle" "cell cycle"*

> categorate=list()
> for (i in 1:length(ipi.go)) {
+ x = GetC(ipi.go[i], ont="BP", org=cell.cycle)
+ x <- list(x)
+ names(x) <- names(ipi.go[i])
+ categorate <- c(categorate, x)
+ }
> unlist(categorate)
*IPI00003865 IPI00011654 IPI00013475 IPI00013683
"cell cycle" "cell cycle" "cell cycle" "cell cycle"
*

-- 
Best regards,
Guangchuang Yu

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to