[Rsdmx-commits] r14 - in pkg: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 23 22:45:26 CET 2013
Author: eblondel
Date: 2013-01-23 22:45:25 +0100 (Wed, 23 Jan 2013)
New Revision: 14
Modified:
pkg/DESCRIPTION
pkg/NAMESPACE
pkg/R/getSerie.R
Log:
Update DESCRIPTION, NAMESPACE and remove as.sp (for now)
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2012-06-13 09:15:10 UTC (rev 13)
+++ pkg/DESCRIPTION 2013-01-23 21:45:25 UTC (rev 14)
@@ -1,9 +1,12 @@
Package: RSDMX
Title: Package to import SDMX data
-Version: 0.01
-Date: 2011-04-19
+Version: 0.1
+Date: 2013-01-23
+Authors at R: c(person("Matthieu Stigler", "Developer", role = c("aut", "cre"),email = "matthieu.stigler at gmail.com"),
+ person("Emmanuel Blondel", "Developer", role = "aut", email = "emmanuel.blondel1 at gmail.com"))
Author: Matthieu Stigler, Emmanuel Blondel
-Maintainer: Matthieu.Stigler <Matthieu.Stigler at fao.org>
+Maintainer: Matthieu Stigler <matthieu.stigler at gmail.com>
+Depends: XML, methods
Description: RSDMX is a project under investigation to allow R users to import SDMX data into R. The R package seeks to import SDMX data, reads its components and convert the sdmx data to more usual R classes such as data.frame, ts.
License: GPL (>= 2)
-Depends: XML, methods
+URL: http://rsdmx.r-forge.r-project.org
\ No newline at end of file
Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE 2012-06-13 09:15:10 UTC (rev 13)
+++ pkg/NAMESPACE 2013-01-23 21:45:25 UTC (rev 14)
@@ -1,24 +1,19 @@
import(XML)
-export(getCodeListNames, getCodeList, getSerie, getDataSet, getPriMes, getAttr,getDimOld, getTimeDim, read.sdmx, as.spdf)
+export(read.sdmx, getCodeListNames, getCodeList, getSerie, getDataSet, getPriMes, getAttr,getDimOld, getTimeDim)
-
#exportClasses("RSDMX","XMLInternalDocument", "XMLAbstractDocument")
#exportClasses("RSDMXCodeLists","RSDMX","XMLInternalDocument", "XMLAbstractDocument")
#exportClasses("RSDMXDataSet","RSDMX","XMLInternalDocument", "XMLAbstractDocument")
exportClasses("RSDMXDataSet","RSDMXCodeLists","RSDMX")#,"XMLInternalDocument", "XMLAbstractDocument")
-
export(getDim)
exportMethods(getDim)
-
export(getKeyFamily)
exportMethods(getKeyFamily)
-
-
S3method(print,RSDMX)
S3method(summary,RSDMXCodeLists)
S3method(summary,RSDMXDataSet)
Modified: pkg/R/getSerie.R
===================================================================
--- pkg/R/getSerie.R 2012-06-13 09:15:10 UTC (rev 13)
+++ pkg/R/getSerie.R 2013-01-23 21:45:25 UTC (rev 14)
@@ -26,10 +26,19 @@
obsTime<-unique(sapply(cObsTime,function(x) {xmlValue(x)}))
L<-length(obsTime)
- #conceptValues (the dataframe is replicated according to the number of years)
+ #==================
+
+ #conceptValues (the dataframe is replicated according to the number of years) DOES NOT WORK WELL
+ conceptValues<-as.data.frame(sapply(conceptList, function(x){
+ cConceptValue<-getNodeSet(sdmx, sprintf(paste("//",prefix2,":SeriesKey/",prefix2,":Value[@concept='%s']",sep=""),x))
+ conceptValue<-sapply(cConceptValue,function(i) {xmlGetAttr(i,"value")})
+ }))
+
+
+ #conceptValues (the dataframe is replicated according to the number of years) DOES NOT WORK WELL
conceptValues<-as.data.frame(sapply(conceptList, function(x){
cConceptValue<-getNodeSet(sdmx, sprintf(paste("//",prefix2,":SeriesKey/",prefix2,":Value[@concept='%s']",sep=""),x))
- conceptValue<-sapply(cConceptValue,function(x) {rep(xmlGetAttr(x,"value"),L)})
+ conceptValue<-sapply(cConceptValue,function(i) {rep(xmlGetAttr(i,"value"),L)})
}))
#obsValues
More information about the Rsdmx-commits
mailing list