-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skpr 0.61.6: fix case in
gen_design()
where order of levels in the …
…formula is not identical between the subplots and the whole plots
- Loading branch information
1 parent
ded8821
commit a80104b
Showing
6 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: skpr | ||
Title: Design of Experiments Suite: Generate and Evaluate Optimal Designs | ||
Version: 0.61.5 | ||
Version: 0.61.6 | ||
Authors@R: c(person("Tyler", "Morgan-Wall", email = "[email protected]", role = c("aut", "cre")), | ||
person("George", "Khoury", email = "[email protected]", role = c("aut"))) | ||
Description: Generates and evaluates D, I, A, Alias, E, T, and G optimal designs. Supports generation and evaluation of split/split-split/.../N-split plot designs. Includes parametric and Monte Carlo power evaluation functions, and supports calculating power for censored responses. Provides a framework to evaluate power using functions provided in other packages or written by the user. Includes a Shiny graphical user interface that displays the underlying code used to create and evaluate the design to improve ease-of-use and make analyses more reproducible. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#'@title Permutations | ||
#' | ||
#'@description Return permutations | ||
#' | ||
#'@param n Number of elements to permute | ||
#'@keywords internal | ||
#'@return Matrix of permuted element ids | ||
permutations = function(n){ | ||
if(n == 1){ | ||
return(matrix(1)) | ||
} else { | ||
sp = permutations(n-1) | ||
p = nrow(sp) | ||
A = matrix(nrow=n*p,ncol=n) | ||
for(i in 1:n){ | ||
A[(i-1)*p+1:p,] = cbind(i,sp+(sp>=i)) | ||
} | ||
return(A) | ||
} | ||
} | ||
|
||
#'@title Find potential permuted interactions | ||
#' | ||
#'@description Returns permuted interactions | ||
#' | ||
#'@param x character vector of interaction terms | ||
#'@keywords internal | ||
#'@return character vector of potential interaction terms | ||
potential_permuted_factors = function(x) { | ||
numberterms = length(x) | ||
if(numberterms == 1) { | ||
return(x) | ||
} | ||
return(unique(unlist(apply(matrix(x[permutations(numberterms)],ncol=numberterms),1, paste,collapse=":")))) | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.