Skip to content

Commit

Permalink
Make PR#48 actually work (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Shen authored and eddelbuettel committed Sep 6, 2018
1 parent f1363bf commit beb6f08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/rexp_obj.R
Expand Up @@ -63,12 +63,12 @@ rexp_integer <- function(obj){
}

rexp_list <- function(obj){
# Avoid infinite recursion
# some R objects return themselves when subindexed
if (length(obj) > 0 && identical(obj, obj[[1]])) {
xobj <- rexp_obj(unlist(obj))
} else if (is(obj, "POSIXlt")) {
if (is(obj, "POSIXlt")) {
xobj <- lapply(unclass(obj), rexp_obj)
} else if (length(obj) > 0 && identical(obj, obj[[1]])) {
# Avoid infinite recursion
# some R objects return themselves when subindexed
xobj <- rexp_obj(unlist(obj))
} else {
xobj <- lapply(obj, rexp_obj)
}
Expand Down

0 comments on commit beb6f08

Please sign in to comment.