readASCII-methods | R Documentation |
Method to read a Message in ASCII format
signature(descriptor = "Descriptor", input = "ANY")
Read the message from a connection (file, etc ...)
signature(descriptor = "Descriptor", input = "character")
Read the message directly from the character string
## Not run: # example file that contains a "tutorial.AddressBook" message book <- system.file( "examples", "addressbook.pb", package = "RProtoBuf" ) # read the message message <- read( tutorial.AddressBook, book ) # Output in text format to a temporary file out.file <- tempfile() writeLines( as.character(message), file(out.file)) # Verify that we can read back in the message from a text file. message2 <- readASCII( tutorial.AddressBook, file(out.file, "rb")) # Verify that we can read back in the message from an unopened file. message3 <- readASCII( tutorial.AddressBook, file(out.file)) \dontshow{ stopifnot( identical( message, message2) ) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.