Skip to content

Commit

Permalink
v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kauedesousa committed Jan 25, 2024
1 parent d366c50 commit a5f56ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ClimMobTools
Type: Package
Title: API Client for the 'ClimMob' Platform
Version: 1.1
Version: 1.2
Authors@R: c(person("Kauê", "de Sousa",
email = "[email protected]",
role = c("aut", "cre"),
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
ClimMobTools 1.2 (2024-01-25)
=========================

### BUG FIXES

* Improves indexing of technologies aliases in `ClimMobTools:::as.data.frame()`

ClimMobTools 1.1 (2023-11-28)
=========================

Expand Down
22 changes: 5 additions & 17 deletions R/as.data.frame-climmob_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -258,23 +258,11 @@ as.data.frame.CM_list <- function(x,
# comparisons and package
comps <- dat[["packages"]][, "comps"]

if (ncomp == 3) {
comps <- lapply(comps, function(x) {
x <- unique(unlist(x$technologies))
x <- x[-1]
names(x) <- paste0("item_", LETTERS[1:length(x)])
x
})
}

if (ncomp > 3) {
comps <- lapply(comps, function(x) {
x <- unique(unlist(x$technologies))
x <- x[-1]
names(x) <- paste0("item_", 1:length(x))
x
})
}
comps <- lapply(comps, function(x) {
x <- do.call("rbind", x$technologies)[,"alias_name"]
names(x) <- paste0("item_", LETTERS[1:length(x)])
x
})

comps <- do.call("rbind", comps)

Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codeRepository": "https://agrdatasci.github.io/ClimMobTools/",
"issueTracker": "https://github.com/agrdatasci/ClimMobTools/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "1.1",
"version": "1.2",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -234,7 +234,7 @@
},
"SystemRequirements": null
},
"fileSize": "1328.135KB",
"fileSize": "1328.066KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down

0 comments on commit a5f56ec

Please sign in to comment.