Skip to content

Commit

Permalink
Addition from amelie baud: unlist(lapply()) -> vapply
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroman committed Nov 17, 2021
1 parent ee574f6 commit 39ee853
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/query_gn.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ query_gn <-
result <- httr::GET(url)
httr::stop_for_status(result)
result <- httr::content(result, encoding=encoding, as=output)
result[unlist(lapply(result, is.null))] = NA


result[vapply(result, is.null, TRUE)] <- NA # added to avoid having as.data.frame(result) crash

check_gn_error(result)
}

Expand Down

0 comments on commit 39ee853

Please sign in to comment.