renkun-ken / pipeR

Multi-Paradigm Pipeline Implementation
Other
167 stars 39 forks source link

Implement str method for Pipe #24

Closed renkun-ken closed 10 years ago

renkun-ken commented 10 years ago

As @ramnathv requested in #22, str.Pipe can be implemented to make it easier to see the internal structure of the value stored in Pipe object.

renkun-ken commented 10 years ago

An example is

> z <- Pipe(list(name="Ken",age=24))$c(type="A")
> str(z)
$value :
List of 3
 $ name: chr "Ken"
 $ age : num 24
 $ type: chr "A"

With Pipe.header = FALSE, the output is

> str(z)
List of 3
 $ name: chr "Ken"
 $ age : num 24
 $ type: chr "A"
renkun-ken commented 10 years ago

The following code works too.

> str(Pipe(1:3),header = FALSE)
 int [1:3] 1 2 3