Skip to content
This repository was archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
ensure just one url returned from get_url()
Browse files Browse the repository at this point in the history
  • Loading branch information
Athospd committed Aug 29, 2020
1 parent 915d9ac commit 4ecb810
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ get_url <- function(platform) {
if (r$status_code != 200) stop ("Could not access latest builds.")
json <- httr::content(r, simplifyDataFrame = TRUE)
da <- json[grepl(re, json$tag_name),]
da <- da[order(da$created_at, decreasing = TRUE), ]
da$assets[[1]]$browser_download_url
da <- da[order(da$created_at, decreasing = TRUE), "assets"][[1]]
sort(da$browser_download_url, decreasing = TRUE)[1]
}

#' Installs LightGBM
Expand Down

1 comment on commit 4ecb810

@Athospd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

touch #3

Please sign in to comment.