[R] Directory operations
Seth Falcon
sfalcon at fhcrc.org
Mon Jan 11 18:25:27 CET 2010
On 1/10/10 5:46 AM, anupam sinha wrote:
> Hi Uwe,
> Thanks for your suggestion . Here's my code. I am confused as
> to how to initialize an empty list . Here I have used pairlist()
>
>
> *list.files()->org_xml_dirs
## the following is much preferred:
org_xml_dirs <- list.files()
> for (i in org_xml_dirs)
> {
> setwd(file.path("/home/anupam/Research/Anupam_data/ORG_XML_FILES/",i))
> org_xml<-list.files()
> for(j in org_xml)
> {
> graph_list<-pairlist()
graph_list <- list() ## in general, avoid pairlist
> graph<-parseKGML2Graph(j,genesOnly=TRUE)
> graph_list<-c(graph_list,list(graph))
> }
> org_met_net<-mergeKEGGgraphs(graph_list)
> met_org<-igraph.from.graphNEL(org_met_net,name=TRUE)
> write.graph(met_org,"/home/anupam/Research/Anupam_data/ORG_XML_FILES/i.metnet",format=c("NCOL"))
> }
> *
> This is giving an error:
>
> Error in UseMethod("xmlAttrs", node) :
> no applicable method for "xmlAttrs"
>
> I apologise for asking a Bioconductor list related question on this list.
> Can you figure out the problem ? Thanks in advance.
Without output of sessionInfo() it is hard to diagnose further, but this
looks like a bug that has been resolved in latest version of the XML
package. Please make sure you are using the latest R release and latest
Bioconductor and CRAN packages.
+ seth
--
Seth Falcon
Bioconductor Core Team | FHCRC
More information about the R-help
mailing list