Another round of xgb serialization

I understand, but `name_exists` is kind of a messy way to do it IMHO, and
in this case [YAGNI](http://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it
)

On Tue, Dec 30, 2014 at 12:48 PM, Fei Ye <notifications@github.com> wrote:

> In R/adapter.r
> <https://github.com/robertzk/syberiaStages/pull/25#discussion-diff-22359080>
> :
>
> > -        obj$object$container$output$options$label <- NULL
> > -      }
> > -    } else {
> > -      obj <- object
> > -      if (name_exists("object$output$options$data")) {
> > -        data_restore_on_exit <- object$output$options$data
> > -        on.exit(object$output$options$data <- data_restore_on_exit, add = TRUE)
> > -        object$output$options$data <- NULL
> > -      }
> > -      if (name_exists("object$output$options$label")) {
> > -        label_restore_on_exit <- object$output$options$label
> > -        on.exit(object$output$options$label <- label_restore_on_exit, add = TRUE)
> > -        object$output$options$label <- NULL
> > -      }
> > -    }
> > +    if (name_exists("object$output$options$data")) {
>
> i am concerned the recursive path might have environments instead of lists
> involved, it is safer to check that way
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/robertzk/syberiaStages/pull/25/files#r22359080>.
>



-- 
-Robert Krzyzanowski