readProtoFiles | R Documentation |
Imports proto files into the descriptor pool that
is then used by the P
function to resolve
message type names.
readProtoFiles(files, dir, package="RProtoBuf", pattern="\\.proto$", lib.loc=NULL)
readProtoFiles2(files, dir=".", pattern="\\.proto$", recursive=FALSE, protoPath=getwd())
resetDescriptorPool()
files |
Proto files |
dir |
Directory. If |
package |
R package name. If |
pattern |
A filename pattern to match proto files when using |
recursive |
Whether to descend recursively into |
lib.loc |
Library location. |
protoPath |
Search path for proto file imports. |
readProtoFiles2
is different from readProtoFiles
to be
consistent with the behavior of protoc
command line tool in
being explicit about the search path for proto import statements. In addition,
we also require that both files
and dir
arguments are
interpreted relative to protoPath
, so that there is consistency in
future imports of the same files through import statements of other proto
files.
resetDescriptorPool
clears all imported proto definitions.
NULL
, invisibly.
Romain Francois <francoisromain@free.fr>
P
## Not run:
# from a package
readProtoFiles(package = "RProtoBuf")
# from a directory
proto.dir <- system.file("proto", package = "RProtoBuf")
readProtoFiles(dir = proto.dir)
# set of files
proto.files <- list.files(proto.dir, full.names = TRUE)
readProtoFiles(proto.files)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.