Closed eddelbuettel closed 7 years ago
We use str()
inside the print()
and I dont't know how to not make it show NULL
.
This seems to work better:
print.toml <- function(x, ...) { cat(utils::str(x, give.attr=FALSE)); invisible(x) }
Now:
R> z
List of 2
$ test :List of 3
..$ var1: chr "hello"
..$ var2: int 2
..$ var3: chr "some\\nmultiline string\\n"
$ test2:List of 1
..$ date: Date[1:1], format: "1970-01-01"
R> print(z)
List of 2
$ test :List of 3
..$ var1: chr "hello"
..$ var2: int 2
..$ var3: chr "some\\nmultiline string\\n"
$ test2:List of 1
..$ date: Date[1:1], format: "1970-01-01"
R>
I'll make the change.
just wanted to pass along, tried it out, works beautifully!
For those that come along and would like an example,
which gives
@eddelbuettel any reason why the print method gives a trailing
NULL
value?Even when saving to an object, when querying the object, it always has that trailing NULL
Just in case: