[R] Using R to convert RDF/XML to
w||||@mwdun|@p @end|ng |rom gm@||@com
Fri Dec 31 17:37:50 CET 2021
This is the sort of thing that you should first ask the package maintainer
about; there is an error in the rdf method for write_nquads:
function (x, file, ...)
rdf_serialize(rdf, file, "nquads", ...)
I suspect that the first argument to rdf_serialize should be 'x', not 'rdf'.
Another error in the package is that this function isn't tested.
On Fri, Dec 31, 2021 at 6:19 AM Evans, Richard K. (GRC-H000) via R-help <
r-help using r-project.org> wrote:
> Hello R community,
> I am a novice R enthusiast trying to use R to convert an RDFdump file 
> from Semantic Mediawiki  into something that can be natively imported by
> GePhi  for graph visualization. The SMW RDFdump file is formatted as
> RDF/XML and I have found the R package "rdflib"  and am able to read the
> RDF/XML file into R as an "rdf" object, but it is not clear to me how to
> save the "rdf_serialize" function output to a new file.
> What I have so far is:
> NewRDF <- tempfile( "TempFile", fileext = ".nq" )
> MyRDF <- rdf_parse( "MyRDFdumpFile.txt" )
> rdf_serialize( MyRDF, NewRDF, format = "nquads" )
> write_nquads( MyRDF, NewRDF )
> ..but this results in the error: "Error: object of type 'closure' is not
> I will keep struggling with this to learn what I need to learn, but any
> advice to help make quick work of this would be much appreciated.
> Thank you in advance.
>  https://gephi.org/
>  https://cran.r-project.org/web/packages/rdflib/rdflib.pdf
> - Richard Evans, NASA GRC - Armstrong Test Facility
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help