[R] Using R to convert RDF/XML to

2021-12-31 Thread Evans, Richard K. (GRC-H000) via R-help
Hello R community,

I am a novice R enthusiast trying to use R to convert an RDFdump file [1] from 
Semantic Mediawiki [2] into something that can be natively imported by GePhi 
[3] for graph visualization. The SMW RDFdump file is formatted as RDF/XML and I 
have found the R package "rdflib" [4] 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: 
library(rdflib)
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 
subsettable"

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.
/Rich

[1] https://www.semantic-mediawiki.org/wiki/Help:Maintenance_script_dumpRDF.php
[2] 
https://www.semantic-mediawiki.org/wiki/Help:Introduction_to_Semantic_MediaWiki
[3] https://gephi.org/
[4] https://cran.r-project.org/web/packages/rdflib/rdflib.pdf

- Richard Evans, NASA GRC - Armstrong Test Facility
  mailto://richard.k.ev...@nasa.gov 
  http://www.linkedin.com/in/rkevans 

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


[R] how to ref data directly from bls.gov using their api

2019-01-29 Thread Evans, Richard K. (GRC-H000) via R-help
Hello, 

I'd like to generate my own plots of various labor statistics using live data 
available at https://www.bls.gov/bls/api_features.htm

This is 10% an R question and 90 % a bls.gov api query question.  Please 
forgive me for making this request here but I would be truly grateful for 
anyone here on the R mailinglist who can show me how to write a line of R code 
that "fetches" the raw data anew from the bls.gov website every time it runs. 

Truest Thanks,
/Rich

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.