diff --git a/r/factset.protobuf.stach.v2/DESCRIPTION b/r/factset.protobuf.stach.v2/DESCRIPTION index 7fcd4ff..d6b5282 100644 --- a/r/factset.protobuf.stach.v2/DESCRIPTION +++ b/r/factset.protobuf.stach.v2/DESCRIPTION @@ -1,9 +1,9 @@ Package: factset.protobuf.stach.v2 Type: Package +Version: 1.0.6 Title: 'FactSet' 'STACH V2' Library -Version: 1.0.3 -Author: analytics-reporting -Maintainer: Charlie Mathis +Authors@R: + person("Charlie Mathis", role = c("aut","cre"), email = "chmathis@factset.com") Description: Generates 'RProtobuf' classes for 'FactSet' 'STACH V2' tabular format which represents complex multi-dimensional array of data. These classes help in the 'serialization' and 'deserialization' of 'STACH V2' @@ -14,8 +14,10 @@ BugReports: https://github.com/factset/stachschema-sdks/issues License: Apache License 2.0 Encoding: UTF-8 LazyData: true -Imports: R6 -Depends: RProtoBuf +Imports: + R6 +Depends: + RProtoBuf Suggests: testthat SystemRequirements: ProtoBuf libraries and compiler version 3.3.0 or later; On Debian/Ubuntu these can be installed as libprotoc-dev, libprotobuf-dev diff --git a/r/factset.protobuf.stach.v2/inst/testdata/V2ColumnStachData b/r/factset.protobuf.stach.v2/inst/testdata/V2ColumnStachData new file mode 100644 index 0000000..28b7d24 Binary files /dev/null and b/r/factset.protobuf.stach.v2/inst/testdata/V2ColumnStachData differ diff --git a/r/factset.protobuf.stach.v2/inst/testdata/V2RowStachData b/r/factset.protobuf.stach.v2/inst/testdata/V2RowStachData new file mode 100644 index 0000000..a8bfd2c Binary files /dev/null and b/r/factset.protobuf.stach.v2/inst/testdata/V2RowStachData differ diff --git a/r/factset.protobuf.stach.v2/man/factset.protobuf.stach.v2.Rd b/r/factset.protobuf.stach.v2/man/factset.protobuf.stach.v2.Rd index af2a95a..b388860 100644 --- a/r/factset.protobuf.stach.v2/man/factset.protobuf.stach.v2.Rd +++ b/r/factset.protobuf.stach.v2/man/factset.protobuf.stach.v2.Rd @@ -15,7 +15,7 @@ The purpose of this library is to help in the serialization and de-serialization \describe{ \item{\code{package}}{Stach Data which is represented as a Package object} \item{\code{input}}{Input file which is in binary format} -} +}\if{html}{\out{}} } \examples{ @@ -26,8 +26,18 @@ read( factset.protobuf.stach.v2.Package, input = 'path of your stach file' ) # an example to Read row organized file data from a connection read( factset.protobuf.stach.v2.RowOrganizedPackage, input = 'path of your stach file' ) -# an example to Read the raw stach data as a character +# an example to Read the raw stach data as a character read( factset.protobuf.stach.v2.Package, input = as.character(stachdata) ) +} +\testonly{ +# an example to Read column organized file data from a connection +binaryFilePath <- + system.file('testdata/V2ColumnStachData', package = 'factset.protobuf.stach.v2') +package <- read( factset.protobuf.stach.v2.Package, input = binaryFilePath ) +# an example to Read row organized file data from a connection +binaryFilePath <- + system.file('testdata/V2RowStachData', package = 'factset.protobuf.stach.v2') +package <- read( factset.protobuf.stach.v2.RowOrganizedPackage, input = binaryFilePath ) } } \ No newline at end of file