newTuple: Manipulate the Gaggle Tuple data type

Description Usage Arguments See Also Examples

View source: R/gaggle.R

Description

Gaggle Tuples are lists of key/value pairs which can be nested. These functions support creation of tuple objects for broadcast to other Gaggle-connected software or conversion of tuples to R list objects.

The function getTupleAsList receives a Gaggle Tuple broadcast by converting the received value to a list. This is an alternative to the older getTuple which returns an environment object.

Usage

1
2
3
4
5

Arguments

name

name to be assigned to the tuple or individual value

list

a list of items to be converted to Singles and added to the tuple

value

the value of a key/value pair

tuple

a java tuple object

single

a java single object

See Also

getTuple. broadcast.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  t <- newTuple('sequence', list(name='chromosome', length=2014239))
  s <- newSingle('topology', 'circular')
  addSingle(t, single=s)
  addSingle(t, name='color', 'blue')
  tupleToList(t)
  # expected output:
  #  $name
  #    [1] "chromosome"
  #  $length
  #    [1] 2014239
  #  $topology
  #   [1] "circular"
  #  $color
  #    [1] "blue"

gaggle documentation built on Nov. 8, 2020, 8:07 p.m.