Skip to content

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kauedesousa committed Nov 28, 2023
1 parent 69415b2 commit fbc3a24
Show file tree
Hide file tree
Showing 32 changed files with 210 additions and 75 deletions.
4 changes: 2 additions & 2 deletions 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.0
Version: 1.1
Authors@R: c(person("Kauê", "de Sousa",
email = "[email protected]",
role = c("aut", "cre"),
Expand All @@ -13,7 +13,7 @@ URL: https://agrdatasci.github.io/ClimMobTools/
BugReports: https://github.com/agrdatasci/ClimMobTools/issues
Description: API client for 'ClimMob', an open source software for decentralized
large-N trials with the 'tricot' approach <https://climmob.net/>.
Developed by van Etten et al. (2016) <doi:10.1017/S0014479716000739>, it turns the
Developed by Quiros et al. (2023) <doi:10.2139/ssrn.4463406>, it turns the
research paradigm on its head; instead of a few researchers designing complicated
trials to compare several technologies in search of the best solutions for the
target environment, it enables many participants to carry out reasonably simple
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.1 (2023-11-28)
=========================

### BUG FIXES

* Fix an issue in `.smart.round()` to handle `NA` in the `randomize()` function

ClimMobTools 1.0 (2023-11-10)
=========================

Expand Down
5 changes: 0 additions & 5 deletions R/AAA-getDataCM.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,3 @@ getDataCM <- function(key,
return(cmdata)

}





1 change: 0 additions & 1 deletion R/getProjectProgress.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,3 @@ getProjectProgress <- function(key, project, userowner, server = "climmob3"){
return(r)

}

3 changes: 0 additions & 3 deletions R/getProjectsCM.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,3 @@ getProjectsCM <- function(key, server = "climmob3", ...){
return(dat)

}



3 changes: 0 additions & 3 deletions R/internal_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,3 @@
return(ranks)

}



48 changes: 41 additions & 7 deletions R/randomize.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,38 @@
#' npackages = npackages,
#' itemnames = itemnames,
#' availability = availability)
#'
#'
#' @examplesIf interactive()
#' # run diagnostics to certify that randomization is balanced
#' # the number of interactions should have the lower sd as possible
#' # this verification may not work well when technologies are
#' # tested in different proportions
#' design = randomize(ncomp = ncomp,
#' npackages = npackages,
#' itemnames = itemnames)
#'
#' design$best = "A"
#'
#' design$worst = "C"
#'
#' # number of times each item is tested in the
#' # trial design
#' ntest = table(unlist(design[,c(1:3)]))
#'
#' ntest
#'
#' # put into the PlackettLuce structure to check
#' # number of interactions between items
#' r = gosset::rank_tricot(design, c(1:3), c(4:5))
#'
#' bn = gosset::set_binomialfreq(r)
#'
#' bn$interactions = bn$win1 + bn$win2
#'
#' bn = bn[,c(1,2,5)]
#'
#' bn
#'
#' @aliases randomise
#' @importFrom Matrix Diagonal
#' @importFrom methods as
Expand Down Expand Up @@ -503,13 +534,16 @@ makeAllocationsMatrix <- function(allocations){
return(t(out))
}

# Rounding values to closest integer while retaining the same sum
# From https://stackoverflow.com/questions/32544646/round-vector-of-numerics-to-integer-while-preserving-their-sum
#' Rounding values to closest integer while retaining the same sum
#' https://stackoverflow.com/questions/32544646/round-vector-of-numerics-to-integer-while-preserving-their-sum
#' @examples
#' .smart.round(c(NA, 3.5, 7.8, 9, 10.4))
#' @noRd
.smart.round <- function(x) {
y <- floor(x)
indices <- utils::tail(order(x-y), round(sum(x)) - sum(y))
y[indices] <- y[indices] + 1
.smart.round = function(x) {
x[is.na(x)] = 0
y = floor(x)
indices = utils::tail(order(x - y), round(sum(x)) - sum(y))
y[indices] = y[indices] + 1
y
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ClimMobTools

## Overview

**ClimMobTools** the API Client for the 'ClimMob' platform in R. [ClimMob](https://climmob.net/) is an open source software for decentralized large-N trials with the 'tricot' approach. Developed by [van Etten et al. (2019)](https://doi.org/10.1017/S0014479716000739) 'tricot' turns the research paradigm on its head; instead of a few researchers designing complicated trials to compare several technologies in search of the best solutions, it enables many participants to carry out reasonably simple experiments that taken together can offer even more information.
**ClimMobTools** the API Client for the 'ClimMob' platform in R. [ClimMob](https://climmob.net/) is an open source software for decentralized large-N trials with the 'tricot' approach. Developed by [Quiros et al. (2023)](http://dx.doi.org/10.2139/ssrn.4463406) 'tricot' turns the research paradigm on its head; instead of a few researchers designing complicated trials to compare several technologies in search of the best solutions, it enables many participants to carry out reasonably simple experiments that taken together can offer even more information.

## Package website

Expand Down
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "ClimMobTools",
"description": "API client for 'ClimMob', an open source software for decentralized large-N trials with the 'tricot' approach <https://climmob.net/>. Developed by van Etten et al. (2016) <doi:10.1017/S0014479716000739>, it turns the research paradigm on its head; instead of a few researchers designing complicated trials to compare several technologies in search of the best solutions for the target environment, it enables many participants to carry out reasonably simple experiments that taken together can offer even more information. 'ClimMobTools' enables project managers to deep explore and analyse their 'ClimMob' data in R.",
"description": "API client for 'ClimMob', an open source software for decentralized large-N trials with the 'tricot' approach <https://climmob.net/>. Developed by Quiros et al. (2023) <doi:10.2139/ssrn.4463406>, it turns the research paradigm on its head; instead of a few researchers designing complicated trials to compare several technologies in search of the best solutions for the target environment, it enables many participants to carry out reasonably simple experiments that taken together can offer even more information. 'ClimMobTools' enables project managers to deep explore and analyse their 'ClimMob' data in R.",
"name": "ClimMobTools: API Client for the 'ClimMob' Platform",
"codeRepository": "https://agrdatasci.github.io/ClimMobTools/",
"issueTracker": "https://github.com/agrdatasci/ClimMobTools/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "1.0",
"version": "1.1",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -232,7 +232,7 @@
},
"SystemRequirements": null
},
"fileSize": "1248.669KB",
"fileSize": "1250.405KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions docs/articles/Overview.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ pkgdown: 2.0.6
pkgdown_sha: ~
articles:
Overview: Overview.html
last_built: 2023-11-09T19:32Z
last_built: 2023-11-28T10:52Z

Loading

0 comments on commit fbc3a24

Please sign in to comment.