Skip to content

Commit

Permalink
Update method of max date retrieval R/get_dataset_additional_info.R
Browse files Browse the repository at this point in the history
Co-authored-by: James McMahon <[email protected]>
  • Loading branch information
ross-hull and Moohan authored May 22, 2024
1 parent 6fcb440 commit 0664388
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions R/get_dataset_additional_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,11 @@ get_datasets_additional_info <- function(dataset_name){
amount_of_resources <- content$result$resources %>%
length()

last_resource_created_date <- purrr::map(content$result$resources, ~.$created) %>%
unlist() %>%
max()
last_resource_created_date <- purrr::map_chr(content$result$resources, ~.$created)

Check warning on line 14 in R/get_dataset_additional_info.R

View workflow job for this annotation

GitHub Actions / lint

file=R/get_dataset_additional_info.R,line=14,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 84 characters.

last_resource_modified_date <- purrr::map(content$result$resources, ~.$last_modified) %>%
unlist() %>%
max()
last_resource_modified_date <- purrr::map_chr(content$result$resources, ~.$last_modified)

Check warning on line 16 in R/get_dataset_additional_info.R

View workflow job for this annotation

GitHub Actions / lint

file=R/get_dataset_additional_info.R,line=16,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 91 characters.

most_recent_resource_date <- c(last_resource_modified_date, last_resource_created_date) %>%
max()
most_recent_resource_date <- max(last_resource_modified_date, last_resource_created_date)

Check warning on line 18 in R/get_dataset_additional_info.R

View workflow job for this annotation

GitHub Actions / lint

file=R/get_dataset_additional_info.R,line=18,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 91 characters.

return_value <- list("name" = dataset_name,
"amount_of_resources" = amount_of_resources,

Check warning on line 21 in R/get_dataset_additional_info.R

View workflow job for this annotation

GitHub Actions / lint

file=R/get_dataset_additional_info.R,line=21,col=25,[indentation_linter] Hanging indent should be 23 spaces but is 25 spaces.
Expand Down

0 comments on commit 0664388

Please sign in to comment.