code
stringlengths 1
13.8M
|
---|
cmsc_r <- function(x, y, rescale = FALSE,
xmin = NULL, xmax = NULL,
ymin = NULL, ymax = NULL,
comp = "si") {
if (anyNA(x) || anyNA(y)) {
x[is.na(y)] <- NA
y[is.na(x)] <- NA
if (all(is.na(x))) return(NA)
}
if (is.null(xmin)) xmin <- min(x, na.rm = T)
if (is.null(xmax)) xmax <- max(x, na.rm = T)
if (is.null(ymin)) ymin <- min(y, na.rm = T)
if (is.null(ymax)) ymax <- max(y, na.rm = T)
if (xmin > xmax) stop("xmin > xmax, please reset them!");
if (ymin > ymax) stop("ymin > ymax, please reset them!");
if (xmax < min(x, na.rm = T) || xmin > max(x, na.rm = T)) stop("[xmin, xmax] is beyond the range of x!");
if (ymax < min(y, na.rm = T) || ymin > max(y, na.rm = T)) stop("[ymin, ymax] is beyond the range of x!");
xymin <- min(xmin, ymin)
xymax <- max(xmax, ymax)
if (xymin == xymax) stop("global min equals to global max!");
maxmmin <- xymax - xymin
if (rescale) {
if (xmin == xmax) x[!is.na(x)] <- 1 else x <- (x - xmin) / (xmax - xmin)
if (ymin == ymax) y[!is.na(y)] <- 1 else y <- (y - ymin) / (ymax - ymin)
maxmmin <- 1
}
sdx <- stats::sd(x, na.rm = T)
sdy <- stats::sd(y, na.rm = T)
s3 <- if (sdx == 0 && sdy == 0) {
1
} else if (sdx == 0 || sdy == 0) {
0
} else {
stats::cor(x, y, use = "na.or.complete")
}
d2 <- ((sdx - sdy) / (maxmmin / 2))^2
if (d2 > 1) d2 <- 1
mx <- mean(x, na.rm = T)
my <- mean(y, na.rm = T)
d1 <- ((mx - my) / maxmmin)^2
if (d1 > 1) d1 <- 1
s2 <- 1 - d2
s1 <- 1 - d1
if (comp == "si") return(s1 * s2 * s3)
if (comp == "s1") return(s1)
if (comp == "s2") return(s2)
if (comp == "s3") return(s3)
stop("comp should be 'si' or 's1', 's2', 's3'!")
} |
test_that("works as expected", {
files = list.files( test_file( '' ), full.names = TRUE )[1:4]
files = files[ !grepl( '~[$]', files ) ]
t = fldict( file.list = files )
expect_equal( length(t) > 0, TRUE )
}) |
setClass(
Class="PairwiseComparisonMatrix",
slots = c(
valuesChar = "matrix",
values = "matrix",
variableNames = "character"
),
validity=function(object)
{
if(nrow(object@valuesChar)!=ncol(object@valuesChar)){
return(paste("The pairwise comparison matrix is not a square matrix. Dimensions are - ncol = ", ncol(object@valuesChar),
", nrow = ", nrow(object@valuesChar), ".", sep = ""))
}
for(i in 1:nrow(object@valuesChar)){
if(!(object@valuesChar[i,i] == "1")){
return(paste("The elements on the main diagonal of the pairwise comparison matrix must be equal to 1. Position ",
i, ",", i, " is not equal to 1.", sep = ""))
}
}
for(i in 1:nrow(object@values)){
for(j in i:nrow(object@values)){
if (i!=j){
if (!isTRUE(all.equal(object@values[j,i], (1/object@values[i,j])))){
return(paste("The pairwise comparison matrix is not reciprocal. Elements [",i,",",j,
"] and [",j,",",i,"] are not reciprocal. ", object@values[i,j], " is not reciprocal to ",
object@values[j,i],". Because ", object@values[i,j], " != ", 1/object@values[j,i],
sep = ""))
}
}
}
}
if(max(object@values) > 9){
warning(paste("The maximal value in the pairwise comparison matrix should not be higher than 9, however,",
"the value ", max(object@values), " was found.", sep = ""))
}
return(TRUE)
}
)
setGeneric("pairwiseComparisonMatrix",
function(matrix) standardGeneric("pairwiseComparisonMatrix"))
setMethod(
f="pairwiseComparisonMatrix",
signature(matrix = "matrix"),
definition=function(matrix)
{
if(typeof(matrix)=="character"){
values = .parseCharacterMatrix(matrix)
names = .getVariableNames(matrix)
colnames(matrix) = NULL
matrix = .textMatrixRepresentation(values)
}else if(typeof(matrix)=="double"){
values = .parseDoubleMatrix(matrix)
names = .getVariableNames(matrix)
matrix = matrix(as.character(values), nrow = nrow(values), ncol=ncol(values))
colnames(matrix) = NULL
matrix = .textMatrixRepresentation(values)
}
return(new("PairwiseComparisonMatrix", valuesChar = matrix, values = values,
variableNames = names))
}
)
setGeneric(".textMatrixRepresentation",
function(matrix) standardGeneric(".textMatrixRepresentation"))
setMethod(
f=".textMatrixRepresentation",
signature(matrix = "matrix"),
definition=function(matrix)
{
values = matrix(data = "", nrow = nrow(matrix), ncol = ncol(matrix))
for (i in 1:nrow(matrix)){
for (j in 1:ncol(matrix)){
values[i, j] = as.character(fractions(matrix[i, j]))
}
}
return(values)
}
)
setGeneric(".parseDoubleMatrix",
function(matrix) standardGeneric(".parseDoubleMatrix"))
setMethod(
f=".parseDoubleMatrix",
signature(matrix = "matrix"),
definition=function(matrix)
{
values = matrix(data = 0, nrow = nrow(matrix), ncol = ncol(matrix))
for (i in 1:nrow(matrix)){
for (j in 1:ncol(matrix)){
if(is.na(matrix[i, j]) || matrix[i, j]==0){
values[i, j] = 0
}else{
values[i, j] = matrix[i, j]
}
}
}
if(all(values[upper.tri(values)] == 0)){
values[upper.tri(values)] = 1/t(values)[upper.tri(1/t(values))]
}
if(all(values[lower.tri(values)] == 0)){
values[lower.tri(values)] = 1/t(values)[lower.tri(1/t(values))]
}
return(values)
}
)
setGeneric(".parseCharacterMatrix",
function(matrix) standardGeneric(".parseCharacterMatrix"))
setMethod(
f=".parseCharacterMatrix",
signature(matrix = "matrix"),
definition=function(matrix)
{
values = matrix(data = 0, nrow = nrow(matrix), ncol = ncol(matrix))
for (i in 1:nrow(matrix)){
for (j in 1:ncol(matrix)){
cell = gsub(" ", "", matrix[i,j])
if(cell == "" || is.na(cell)){
values[i, j] = 0
}else if(grepl("/", cell)){
numbers = unlist(strsplit(cell, "/"))
if(suppressWarnings(is.na(as.numeric(numbers[1]))) || suppressWarnings(is.na(as.numeric(numbers[2])))){
stop(paste0("Element [", i, ",", j,"] is not a number - ", cell, "."))
}
values[i,j] = as.numeric(numbers[1]) / as.numeric(numbers[2])
}else{
values[i,j] = as.numeric(cell)
}
}
}
if(all(values[upper.tri(values)] == 0)){
values[upper.tri(values)] = 1/t(values)[upper.tri(1/t(values))]
}
if(all(values[lower.tri(values)] == 0)){
values[lower.tri(values)] = 1/t(values)[lower.tri(1/t(values))]
}
return(values)
}
)
setGeneric(".getVariableNames",
function(matrix) standardGeneric(".getVariableNames"))
setMethod(
f=".getVariableNames",
signature(matrix = "matrix"),
definition=function(matrix)
{
if(length(colnames(matrix))>0){
variableNames = colnames(matrix)
}else if(length(rownames(matrix))>0){
variableNames = rownames(matrix)
}else{
variableNames = c()
for(i in 1:nrow(matrix)){
variableNames = c(variableNames, paste0("C_",i))
}
}
return(variableNames)
}
) |
`cusp.nc.C` <-
function (alpha, beta, subdivisions = 100, rel.tol = .Machine$double.eps^0.25,
abs.tol = rel.tol, stop.on.error = TRUE, aux = NULL, keep.order = TRUE)
{
limit <- as.integer(subdivisions)
if (limit < 1 || (abs.tol <= 0 && rel.tol < max(50 * .Machine$double.eps,
5e-29)))
stop("invalid parameter values")
lower <- -Inf
upper <- Inf
inf <- 2
bound <- 0
wk <- .External("cuspnc", as.double(alpha), as.double(beta),
as.double(bound), as.integer(inf), as.double(abs.tol),
as.double(rel.tol), limit = limit)
wk
} |
b31gafr <- function(d, wth, l){
checkmate::assert_double(d, lower = 3.93e-2, upper = 1.27e5, finite = TRUE, any.missing = FALSE, min.len = 1)
checkmate::assert_double(wth, lower = 0, upper = 1.275e4, finite = TRUE, any.missing = FALSE, min.len = 1)
checkmate::assert_double(l, lower = 0, upper = 1.275e4, finite = TRUE, any.missing = FALSE, min.len = 1)
1e-3*trunc(1e3*.893*l/sqrt(d*wth))
} |
test_that("returns the correct linting", {
ops <- c(
"+",
"-",
"=",
"==",
"!=",
"<=",
">=",
"<-",
"<",
">",
"->",
"%%",
"/",
"*",
"|",
"||",
"&",
"&&",
"%>%",
"%Anything%",
"%+%",
NULL
)
linter <- infix_spaces_linter()
msg <- rex("Put spaces around all infix operators.")
expect_lint("blah", NULL, linter)
for (op in ops) {
expect_lint(paste0("1 ", op, " 2"), NULL, linter)
expect_lint(paste0("1 ", op, "\n2"), NULL, linter)
expect_lint(paste0("1 ", op, "\n 2"), NULL, linter)
expect_lint(paste0("1", op, "2"), msg, linter)
if (!op %in% ops[1:2]) {
expect_lint(paste0("1 ", op, "2"), msg, linter)
}
expect_lint(paste0("1", op, " 2"), msg, linter)
}
expect_lint("b <- 2E+4", NULL, linter)
expect_lint("a <- 1e-3", NULL, linter)
expect_lint("a[-1]", NULL, linter)
expect_lint("a[-1 + 1]", NULL, linter)
expect_lint("a[1 + -1]", NULL, linter)
expect_lint("fun(a=1)", msg, linter)
}) |
ggcorplot <- function(rpcaObj, pcs=c(1,2), loadings=TRUE, var_labels=FALSE, var_labels.names=NULL, alpha=1, top.n=NULL) {
if (!requireNamespace('ggplot2', quietly = TRUE)) {
stop("The package 'ggplot2' is needed for this function to work. Please install it.",
call. = FALSE)
}
p = nrow(rpcaObj$rotation)
stopifnot(length(pcs) == 2)
if(max(pcs) > ncol(rpcaObj$rotation)) stop("Selected PC is not valid.")
if(min(pcs) < 1) stop("Selected PC is not valid.")
PC1 = paste("PC", pcs[1], sep="")
PC2 = paste("PC", pcs[2], sep="")
theta <- c(seq(-pi, pi, length = 360))
circle <- data.frame(x = cos(theta), y = sin(theta))
if(loadings==FALSE) rotation = rpcaObj$rotation[,pcs]
if(loadings==TRUE) rotation = t(t(rpcaObj$rotation[,pcs]) * rpcaObj$eigvals[pcs]**0.5)
df <- data.frame(rotation=rotation, row.names = 1:p)
colnames(df) <- c( 'a', 'b')
if(is.null(rownames(rpcaObj$rotation))) {
df$"varName" <- as.character(1:p)
} else {
df$"varName" <- rownames(rpcaObj$rotation)
}
if(!is.null(var_labels.names)) df$"varName" <- var_labels.names
df$abs <- sqrt(df$a**2 + df$b**2)
variance = rpcaObj$sdev**2
explained_variance_ratio = round(variance / rpcaObj$var, 3) * 100
PC1 = paste("PC ", pcs[1], "(", explained_variance_ratio[pcs[1]] , "% explained var.)", sep="")
PC2 = paste("PC ", pcs[2], "(", explained_variance_ratio[pcs[2]] , "% explained var.)", sep="")
x <- NULL
y <- NULL
a <- NULL
b <- NULL
varName <- NULL
g <- ggplot2::ggplot( circle , ggplot2::aes( x , y) ) +
ggplot2::geom_path( size=0.5, colour="black" )
if(is.null(top.n)) top.n <- nrow(df)
if(top.n>nrow(df)) top.n <- nrow(df)
if(top.n < 50) {
g <- g + ggplot2::geom_point(data = df[order(df$abs, decreasing=TRUE)[1:top.n], ],
size = 4, mapping = ggplot2::aes(x = a, y = b, colour = varName ) ) +
ggplot2::theme(legend.position = "none")
}
g <- g + ggplot2::geom_segment(data = df,
ggplot2::aes(x = 0, y = 0, xend = a, yend = b ),
arrow = grid::arrow(length = grid::unit(0.5, 'picas')),
color = 'black' , size = 0.5, alpha = alpha)
g <- g + ggplot2::coord_fixed(ratio=1)
g <- g + ggplot2::ggtitle('Variables factor map (PCA)')
g <- g + ggplot2::xlab(PC1) + ggplot2::ylab(PC2)
g <- g + ggplot2::guides(colour=ggplot2::guide_legend(title=NULL))
g <- g + ggplot2::geom_vline(xintercept=0, linetype="dashed", color = "black")
g <- g + ggplot2::geom_hline(yintercept=0, linetype="dashed", color = "black")
if(var_labels == TRUE) {
g <- g + ggplot2::geom_text(data = df[order(df$abs, decreasing=TRUE)[1:top.n], ], ggplot2::aes(label = varName, x = a, y = b,
angle = 0, hjust = 0, vjust = 0),
color = 'black', size = 4)
}
g <- g + ggplot2::theme_bw()
g <- g + ggplot2::theme(panel.grid.major = ggplot2::element_blank(),
panel.grid.minor = ggplot2::element_blank())
return( g )
} |
'
Authors
Torsten Pook, [email protected]
Copyright (C) 2017 -- 2020 Torsten Pook
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'
get.age.point <- function(population, database=NULL, gen=NULL, cohorts=NULL, use.id=FALSE){
database <- get.database(population, gen, database, cohorts)
n.animals <- sum(database[,4] - database[,3] +1)
data <- rep(0, n.animals)
before <- 0
names <- numeric(n.animals)
for(row in 1:nrow(database)){
animals <- database[row,]
nanimals <- database[row,4] - database[row,3] +1
if(nanimals>0){
data[(before+1):(before+nanimals)] <- population$breeding[[animals[1]]][[22+ animals[2]]][animals[3]:animals[4]]
names[(before+1):(before+nanimals)] <- paste(if(animals[2]==1) "M" else "F", animals[3]:animals[4],"_", animals[1], sep="")
before <- before + nanimals
}
}
if(use.id){
names(data) <- get.id(population, database = database)
} else{
names(data) <- names
}
return(data)
} |
psmMergeSplit_base <- function(partition,
psm,
logPosteriorPredictiveDensity = function(i, subset) 0.0,
mass = 1.0,
discount = 0.0,
nUpdates = 1L,
selectionWeights = NULL) {
if (!is.function(logPosteriorPredictiveDensity)) {
stop("Function argument 'logPosteriorPredictiveDensity' must be of type 'closure'")
}
if (discount < 0 | discount >= 1) {
stop("Function argument 'discount' must be on the interval [0,1).")
}
if (mass <= -discount) {
stop("Function argument 'mass' must be strictly greater than the negative of the function argument 'discount'.")
}
if (!is.integer(nUpdates)) {
nUpdates <- as.integer(nUpdates)
if (nUpdates < 1) {
stop("Function argument 'nUpdates' must be a positive integer.")
}
}
if (!isCanonical(partition)) {
partition <- asCanonical(partition)
}
nItems <- length(partition)
if (is.null(selectionWeights)) {
samplePair <- function() sample(nItems, 2, replace = FALSE)
} else {
samplePair <- function() {
as.integer(selectionWeights[sample(nrow(selectionWeights), 1, prob = selectionWeights[,3]), 1:2])
}
}
psmWeights <- function(k, set) {
wt <- c(0,0)
clusterSizes <- sapply(set, length)
t <- sum(clusterSizes)
num <- sapply(1:2, function(x) sum(psm[set[[x]], k]))
wts <- num / sum(num)
wts
}
mkLogPriorRatio <- function(d) {
if (d == 0) {
function(doSplit) {
if (doSplit) {
log(mass) + lfactorial(n_si_split - 1) + lfactorial(n_sj_split - 1) - lfactorial(n_si -1)
} else {
lfactorial(n_si_merge - 1) - log(mass) - lfactorial(n_si - 1) - lfactorial(n_sj - 1)
}
}
} else {
function(doSplit) {
if (doSplit) {
log(mass + d*q) + lgamma(n_si_split - d) + lgamma(n_sj_split - d) -
lgamma(1-d) - lgamma(n_si - d)
} else {
lgamma(n_si_merge - d) + lgamma(1-d) -
log(mass + d*(q-1)) - lgamma(n_si - d) - lgamma(n_sj - d)
}
}
}
}
logPriorRatio <- mkLogPriorRatio(discount)
accept <- 0
for (u in 1:nUpdates) {
q <- length(unique(partition))
ijPair <- samplePair()
clusterForI <- clusterWithItem(ijPair[1], partition)
clusterForJ <- clusterWithItem(ijPair[2], partition)
doSplit <- clusterForI$which == clusterForJ$which
if (doSplit) {
s <- which(partition == clusterForI$which)
clusterForJ$which <- max(unique(partition)) + 1
s <- s[!s %in% ijPair]
s_i <- ijPair[1]
s_j <- ijPair[2]
n_s <- length(s)
if (n_s > 0) {
if (n_s > 1) {
permuteS <- sample(s)
} else {
permuteS <- s
}
q_k <- numeric(n_s)
for (k in 1:n_s) {
wts <- psmWeights(permuteS[k], list(s_i, s_j))
if (sum(wts) == 0) wts <- c(1,1)
chooseThisCluster <- sample(1:2, 1, prob = wts)
if (chooseThisCluster == 1) {
s_i <- sort(c(s_i, permuteS[k]))
} else {
s_j <- sort(c(s_j, permuteS[k]))
}
q_k[k] <- wts[chooseThisCluster]/sum(wts)
}
} else {
q_k <- 1
}
proposedPartition <- partition
proposedPartition[s_i] <- clusterForI$which
proposedPartition[s_j] <- clusterForJ$which
si_split <- clusterWithItem(ijPair[1], proposedPartition)$cluster
n_si_split <- length(si_split)
ik_split <- sapply(1:n_si_split, function(i) logPosteriorPredictiveDensity(si_split[i], si_split[0:(i-1)]))
sj_split <- clusterWithItem(ijPair[2], proposedPartition)$cluster
n_sj_split <- length(sj_split)
jk_split <- sapply(1:n_sj_split, function(j) logPosteriorPredictiveDensity(sj_split[j], sj_split[0:(j-1)]))
si <- clusterWithItem(ijPair[1], partition)$cluster
n_si <- length(si)
ik <- sapply(1:n_si, function(i) logPosteriorPredictiveDensity(si[i], si[0:(i-1)]))
pRatio <- logPriorRatio(doSplit)
lRatio <- sum(ik_split) + sum(jk_split) - sum(ik)
qRatio <- -sum(log(q_k))
mhRatio <- qRatio + pRatio + lRatio
if (log(runif(1)) < mhRatio) {
partition <- asCanonical(proposedPartition)
accept <- accept + 1
}
} else {
s <- union(clusterForI$cluster, clusterForJ$cluster)
proposedPartition <- partition
proposedPartition[s] <- partition[ijPair[1]]
s_split <- s[!s %in% ijPair]
s_i <- ijPair[1]
s_j <- ijPair[2]
n_s <- length(s_split)
if (n_s > 0) {
if (n_s > 1) {
permuteS <- sample(s_split)
} else {
permuteS <- s_split
}
q_k <- numeric(n_s)
for (k in 1:n_s) {
wts <- psmWeights(permuteS[k], list(s_i, s_j))
if (sum(wts) == 0) wts <- c(1,1)
chooseThisCluster <- sample(1:2, 1, prob = wts)
if (chooseThisCluster == 1) {
s_i <- c(s_i, permuteS[k])
} else {
s_j <- c(s_j, permuteS[k])
}
q_k[k] <- wts[chooseThisCluster]/sum(wts)
}
} else {
q_k <- 1
}
si_merge <- sort(union(clusterForI$cluster, clusterForJ$cluster))
n_si_merge <- length(si_merge)
ik_merge <- sapply(1:n_si_merge, function(i) logPosteriorPredictiveDensity(si_merge[i], si_merge[0:(i-1)]))
si <- clusterForI$cluster
n_si <- length(si)
ik <- sapply(1:n_si, function(i) logPosteriorPredictiveDensity(si[i], si[0:(i-1)]))
sj <- clusterForJ$cluster
n_sj <- length(sj)
jk <- sapply(1:n_sj, function(j) logPosteriorPredictiveDensity(sj[j], sj[0:(j-1)]))
pRatio <- logPriorRatio(doSplit)
lRatio <- sum(ik_merge) - sum(ik) - sum(jk)
qRatio <- sum(log(q_k))
mhRatio <- pRatio + lRatio + qRatio
if (log(runif(1)) < mhRatio) {
partition <- asCanonical(proposedPartition)
accept <- accept + 1
}
}
}
list(partition = partition, accept = accept/nUpdates)
} |
CIG <- function (design, select.catlg = catlg, nfac=NULL, static = FALSE, layout = layout.auto,
label = "num", plot = TRUE, ...)
{
ll <- list(...)
if ("vertex.label" %in% names(ll)) vertex.label <- ll$vertex.label
if ("catlg" %in% class(design)) {
if (length(design) > 1)
stop("design must not contain more than one catlg entry")
design <- design[[1]]
}
else {
if (is.matrix(design) || (is.character(design) & length(design)>1) ||
is(design,"formula")){
if (is(design,"formula")){
fn <- row.names(attr(terms(formula(design)), "factors"))
design <- estimable.check(design, length(fn), fn)
names(design) <- c("clear.2fis","nfac")
if (!exists("vertex.label", inherits=FALSE)) vertex.label <- fn
else if (!length(vertex.label)==length(fn)) warning("vertex.label has wrong length")
design$res <- 4
}
if (is.matrix(design)){
if (!nrow(design)==2) stop("matrix design must have two rows.")
if (any (design[1,]==design[2,]))
stop("entries in the same column of matrix design must be different")
fn <- unique(design)
if (!is.null(nfac) && all(fn %in% 1:nfac)) fn <- 1:nfac
if (!exists("vertex.label", inherits=FALSE)) vertex.label <- fn
else if (!length(vertex.label)==length(fn))
warning("vertex.label has wrong length")
if (is.character(design)) design <- list(clear.2fis=matrix(sapply(design, function(obj)
which(fn==obj)), nrow=2), nfac=length(fn),res=4)
else design <- list(clear.2fis=design, nfac=length(fn), res=4)
}
if (is.character(design) && length(design)>1){
if (!all(nchar(design)==2)) stop("character vector design must have length 2 entries only")
if (is.null(nfac)) nfac <-
max(which(Letters %in% unique(unlist(strsplit(design,"")))))
design <- estimable.check(design,nfac,NULL)
if (!exists("vertex.label", inherits=FALSE))
vertex.label <- Letters[1:design$nfac]
else if (!length(vertex.label)==design$nfac)
warning("vertex.label has wrong length")
names(design) <- c("clear.2fis","nfac")
if (any (design$clear.2fis[1,]==design$clear.2fis[2,]))
stop("characters in the same element of vector design must be different")
design$res <- 4
}
}
else{
if (!"catlg" %in% class(select.catlg))
stop("select.catlg must be a catalogue")
if (!(is.character(design) && length(design) == 1))
stop("design must be a design name")
if (!(design %in% names(select.catlg)))
stop("design must be a design name that occurs in select.catlg")
design <- select.catlg[[design]]
}
}
if (!exists("vertex.label", inherits=FALSE)) {
vertex.label <- 1:design$nfac
if (!label == "num")
vertex.label <- Letters[vertex.label]
}
go2 <- graph.empty(n = design$nfac, directed = FALSE)
if (!length(design$clear.2fis) == 0)
go2 <- add.edges(go2, design$clear.2fis)
if (design$res < 4)
warning("the design is of resolution less than IV")
if (plot) {
if (!static) {
id <- tkplot(go2, vertex.label = vertex.label, ...)
invisible(list(graph = go2, coords = tkplot.getcoords(id)))
}
else {
invisible(go2)
plot(go2, layout = layout, vertex.label = vertex.label,
...)
}
}
else return(go2)
}
CIGstatic <- function(graph, id, label = "num", xlim = c(-1, 1), ylim = c(1,
-1), ...){
if ("list" %in% class(graph))
if (names(graph)[1] == "graph") graph <- graph$graph
if (!exists("vertex.label", inherits = FALSE)) {
vertex.label <- 1:graph[[1]][[1]][2]
if (!label == "num")
vertex.label <- Letters[vertex.label]
}
coords <- tkplot.getcoords(id)
plot(graph, layout = coords, vertex.label = vertex.label,
xlim = xlim, ylim = ylim, ...)
} |
treespace <- function(x, method="treeVec", nf=NULL, lambda=0, return.tree.vectors=FALSE, processors=1, ...){
if(!inherits(x, "multiPhylo")) stop("x should be a multiphylo object")
num_trees <- length(x)
if(num_trees<3) {
stop("treespace expects at least three trees. The function treeDist is suitable for comparing two trees.")
}
dots <- list(...)
if(!is.null(dots$return.lambda.function)) stop("return.lambda.function is not compatible with treespace. Consider using multiDist instead.")
if(!is.null(dots$save.memory)) stop("save.memory is not compatible with treespace. Consider using multiDist instead.")
if(is.null(names(x))) names(x) <- 1:num_trees
else if(length(unique(names(x)))!=num_trees){
warning("duplicates detected in tree labels - using generic names")
names(x) <- 1:num_trees
}
lab <- names(x)
for (i in 1:num_trees) {
if (!setequal(x[[i]]$tip.label,x[[1]]$tip.label)) {
stop(paste0("Tree ",lab[[i]]," has different tip labels from the first tree."))
}
}
if (method=="treeVec") {
df <- t(mcmapply(treeVec, x, lambda=lambda, MoreArgs=dots, mc.cores=processors))
D <- as.dist(rdist(df))
}
else if(method %in% c("Abouheif","sumDD")){
df <- t(mcmapply(adephylo::distTips, x, method=method, MoreArgs=dots, mc.cores=processors))
D <- as.dist(rdist(df))
}
else if(method=="patristic"){
D <- path.dist(x, use.weight=TRUE)
}
else if(method=="nNodes"){
D <- path.dist(x, use.weight=FALSE)
}
else if(method=="RF"){
D <- RF.dist(x)
if (!ade4::is.euclid(D)) {
warning("Distance matrix is not Euclidean; making it Euclidean using ade4::cailliez")
D <- ade4::cailliez(D, print=FALSE)
}
}
else if(method=="wRF"){
D <- wRF.dist(x)
if (!ade4::is.euclid(D)) {
warning("Distance matrix is not Euclidean; making it Euclidean using ade4::cailliez")
D <- ade4::cailliez(D, print=FALSE)
}
}
else if(method=="KF"){
D <- KF.dist(x)
}
else if(method=="BHV"){
D <- dist.multiPhylo(x)
if (!ade4::is.euclid(D)) {
warning("Distance matrix is not Euclidean; making it Euclidean using ade4::cailliez")
D <- ade4::cailliez(D, print=FALSE)
}
}
attr(D,"Labels") <- lab
pco <- dudi.pco(D, scannf=is.null(nf), nf=nf)
if (return.tree.vectors==TRUE) {
out <- list(D=D, pco=pco, vectors=df)
}
else {
out <- list(D=D, pco=pco)
}
return(out)
} |
tbl_layout_feature <- function(features, contig_layout){
print("TODO: check start < end")
layout <- features %>%
select(cid=1,fstart=2,fend=3,fstrand=4, everything())
contig_info <- contig_layout %>%
mutate(
gcoffset=goffset+coffset,
gcstrand=gstrand*cstrand) %>%
select(cid, gid, gix, gcoffset, gcstrand)
layout %>% inner_join(contig_info) %>%
mutate(
fstrand=fstrand*gcstrand,
foffset=gcoffset) %>%
select(cid, gid, gix, foffset, fstart, fend, fstrand, everything())
} |
plot_errors <- function(dataIn, plotType = c('boxplot')) UseMethod('plot_errors')
plot_errors.errprof <- function(dataIn, plotType = c('boxplot')){
if(!plotType %in% c('boxplot', 'bar', 'line'))
stop('plotType must be boxplot, bar, or line')
if(plotType == 'boxplot'){
toplo <- attr(dataIn, 'errall')
toplo <- melt(toplo)
percs <- dataIn$MissingPercent
toplo$L2 <- factor(toplo$L2, levels = unique(toplo$L2), labels = percs)
names(toplo) <- c('Error value', 'Percent of missing observations', 'Methods')
p <- ggplot(toplo, aes(x = `Percent of missing observations`, y = `Error value`)) +
ggtitle(dataIn$Parameter) +
geom_boxplot(aes(fill = Methods)) +
theme_bw()
return(p)
}
toplo <- data.frame(dataIn[-1])
toplo <- melt(toplo, id.var = 'MissingPercent')
toplo$MissingPercent <- factor(toplo$MissingPercent)
names(toplo) <- c('Percent of missing observations', 'Methods', 'Error value')
if(plotType == 'bar'){
p <- ggplot(toplo, aes(x = `Percent of missing observations`, y = `Error value`)) +
ggtitle(dataIn$Parameter) +
geom_bar(aes(fill = Methods), stat = 'identity', position = 'dodge') +
theme_bw()
return(p)
}
if(plotType == 'line'){
p <- ggplot(toplo, aes(x = `Percent of missing observations`, y = `Error value`, group = Methods)) +
ggtitle(dataIn$Parameter) +
geom_line() +
geom_point(aes(fill = Methods), shape = 21, size = 5, alpha = 0.75) +
theme_bw()
return(p)
}
} |
go_indica_fi <- function(
time_0 = NA,
time_t = NA,
timeName = NA,
workDF = NA ,
indicaT = NA,
indiType = c('highBest','lowBest')[1],
seleMeasure = "all",
seleAggre = 'EU27',
x_angle = 45,
data_res_download = FALSE,
auth = 'A.Student',
dataNow = Sys.time(),
outFile = NA,
outDir = NA,
pdf_out = FALSE,
workTB = NULL,
selfContained = FALSE
){
if(is.na(workDF) & (!is.null(workTB))){
curTB <- workTB
}else if(!is.na(workDF) & is.null(workTB)){
curTB <- get(workDF,envir = .GlobalEnv)
workTB <- curTB
}else{
stop("Error while specifying data.")
}
if( any(!stats::complete.cases(curTB))){
obj_out <- convergEU_glb()$tmpl_out
obj_out$err <- paste("Error: one or more missing values (NAs) in the dataframe. ",
"Please perform imputation of missing values (NA) before making fiches.")
return(obj_out)
}
sourceFilecss <- system.file("extdata", "EUF.css", package = "convergEU")
sourceFile1 <- system.file("extdata", "indica_fi_2.Rmd", package = "convergEU")
sourceFile2 <- system.file("extdata", "eurofound.jpg", package = "convergEU")
sourceFile71 <- system.file("extdata", "indica_fi_2_sigma.Rmd", package = "convergEU")
sourceFile72 <- system.file("extdata", "indica_fi_2_beta.Rmd", package = "convergEU")
sourceFile73 <- system.file("extdata", "indica_fi_2_nobeta.Rmd", package = "convergEU")
sourceFile74 <- system.file("extdata", "indica_fi_2_delta.Rmd", package = "convergEU")
sourceFile75 <- system.file("extdata", "indica_fi_2_gamma.Rmd", package = "convergEU")
if (is.na(outFile)) {
outFile2 <- paste0("indica-fie-",seleAggre,"-", indicaT, "-", time_0,"-",time_t, ".html")
outFile <- paste0("indica-fi-",seleAggre,"-", indicaT, "-", time_0,"-",time_t)
}else{
outFile2 <- paste0(outFile,".html")
}
if (is.na(outDir)) {
outDir <- file.path(getwd(),"out_dir_counvergEU")
}
resDE <- dir.exists(outDir)
if (!resDE) {
dir.create(outDir, FALSE)
}
outPF <- file.path(outDir,outFile2)
outFcss <- file.path(outDir,"EUF.css")
sourcePF1 <- file.path(outDir,"indica_fi_2.Rmd")
sourcePF2 <- file.path(outDir,"eurofound.jpg")
sourcePF71 <- file.path(outDir,"indica_fi_2_sigma.Rmd")
sourcePF72 <- file.path(outDir,"indica_fi_2_beta.Rmd")
sourcePF73 <- file.path(outDir,"indica_fi_2_nobeta.Rmd")
sourcePF74 <- file.path(outDir,"indica_fi_2_delta.Rmd")
sourcePF75 <- file.path(outDir,"indica_fi_2_gamma.Rmd")
file.copy(from = sourceFile1,
to = sourcePF1,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFile2,
to = sourcePF2,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFile71,
to = sourcePF71,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFile72,
to = sourcePF72,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFile73,
to = sourcePF73,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFile74,
to = sourcePF74,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFile75,
to = sourcePF75,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
file.copy(from = sourceFilecss,
to = outFcss,
overwrite = TRUE,
recursive = FALSE,
copy.mode = TRUE, copy.date = FALSE);
if(selfContained){
myOutOpt <- list(self_contained = TRUE,
mathjax ="default")
}else{
myOutOpt <- list(self_contained = FALSE,
mathjax = 'local')
}
rmarkdown::render(sourcePF1,
params = list(
dataNow = dataNow,
workingDF = workDF,
time_0 = time_0,
time_t = time_t,
timeName = timeName,
indiType = indiType,
indicaT = indicaT,
seleMeasure = seleMeasure,
seleAggre = seleAggre,
x_angle = x_angle,
data_res_download = data_res_download,
auth = auth,
outFile = outFile,
outDir = outDir,
pdf_out = FALSE,
workTB = workTB
),
output_options = myOutOpt,
output_file = outPF,
encoding = "UTF-8")
} |
gpScaleBiasGradient <-
function(model) {
g = list()
if (model$learnScales) {
g = 1/model$scale * drop(model$innerProducts-1)
fhandle <- get(model$scaleTransform$func, mode="function")
g = g * fhandle(model$scale, "gradfact")
}
return (g)
} |
relocate.dtplyr_step <- function(.data, ..., .before = NULL, .after = NULL) {
sim_data <- simulate_vars(.data)
to_move <- tidyselect::eval_select(expr(c(...)), sim_data)
if (length(to_move) == 0) {
return(.data)
}
.before <- enquo(.before)
.after <- enquo(.after)
has_before <- !quo_is_null(.before)
has_after <- !quo_is_null(.after)
if (has_before && has_after) {
abort("Must supply only one of `.before` and `.after`.")
} else if (has_before) {
where <- min(unname(tidyselect::eval_select(.before, sim_data)))
if (!where %in% to_move) {
to_move <- c(to_move, where)
}
} else if (has_after) {
where <- max(unname(tidyselect::eval_select(.after, sim_data)))
if (!where %in% to_move) {
to_move <- c(where, to_move)
}
} else {
where <- 1L
if (!where %in% to_move) {
to_move <- union(to_move, where)
}
}
lhs <- setdiff(seq2(1, where - 1), to_move)
rhs <- setdiff(seq2(where + 1, ncol(.data)), to_move)
new_vars <- .data$vars[unique(c(lhs, to_move, rhs))]
out <- step_colorder(.data, new_vars)
step_group(out, .data$groups)
}
relocate.data.table <- function(.data, ..., .before = NULL, .after = NULL) {
.data <- lazy_dt(.data)
relocate(.data, ..., .before = {{ .before }}, .after = {{ .after }})
} |
downsample_time_data <- function(data, pupil, timebin_size, option = c('mean', 'median')){
if('PupillometryR' %in% class(data) == FALSE){
stop('Dataframe is not of class PupillometryR. Did you forget to run make_pupillometryr_data? Some tidyverse functions associated with dplyr and tidyr can also interfere with this functionality.')
}
if(is.null(option)) option = 'mean'
options <- attr(data, 'PupillometryR')
subject <- options$Subject
trial <- options$Trial
time <- options$Time
condition <- options$Condition
other <- options$Other
pupil <- deparse(substitute(pupil))
data[["Timebin"]] <- floor(data[[time]] / timebin_size)
if(option == 'median'){
message('Calculating median pupil size in each timebin \n')
data2 <- data %>%
group_by(!!sym(subject), !!sym(trial), !!sym(condition), !!sym(other),
Timebin) %>%
summarise(!!sym(pupil) := median(!!sym(pupil))) %>%
ungroup() %>%
mutate(!!sym(time) := Timebin * timebin_size)
}else{
message('Calculating mean pupil size in each timebin \n')
data2 <- data %>%
group_by(!!sym(subject), !!sym(trial), !!sym(condition), !!sym(other),
Timebin) %>%
summarise(!!sym(pupil) := mean(!!sym(pupil))) %>%
ungroup() %>%
mutate(!!sym(time) := Timebin * timebin_size)
}
class(data2) <- c(class(data))
attr(data2, 'PupillometryR') <- options
return(data2)
}
calculate_missing_data <- function(data, pupil){
if('PupillometryR' %in% class(data) == FALSE){
stop('Dataframe is not of class PupillometryR.
Did you forget to run make_pupillometryr_data? Some tidyverse functions associated with dplyr and tidyr can also interfere with this functionality.')
}
options <- attr(data, 'PupillometryR')
subject <- options$Subject
trial <- options$Trial
time <- options$Time
condition <- options$Condition
other <- options$Other
pupil <- deparse(substitute(pupil))
data_trial <- data %>%
group_by(!!sym(subject), !!sym(trial)) %>%
mutate(Missing = ifelse(is.na(!!sym(pupil)), 1, 0)) %>%
summarise(Missing = sum(Missing) /length(Missing)) %>%
ungroup()
return(data_trial)
}
clean_missing_data <- function(data, pupil, trial_threshold = 1, subject_trial_threshold = 1){
if('PupillometryR' %in% class(data) == FALSE){
stop('Dataframe is not of class PupillometryR.
Did you forget to run make_pupillometryr_data?
Some tidyverse functions associated with dplyr and tidyr
can also interfere with this functionality.')
}
options <- attr(data, 'PupillometryR')
subject <- options$Subject
trial <- options$Trial
time <- options$Time
condition <- options$Condition
other <- options$Other
pupil <- deparse(substitute(pupil))
if(subject_trial_threshold == 1){
if(trial_threshold > 1){
stop('Please input trial threshold as a proportion')
}
data_trial <- data %>%
group_by(!!sym(subject), !!sym(trial)) %>%
mutate(Missing = ifelse(is.na(!!sym(pupil)), 1, 0)) %>%
summarise(SumMissing = sum(Missing),
PropMissing = sum(Missing)/length(Missing)) %>%
ungroup()
data_trial2 <- data_trial[data_trial[['PropMissing']] < trial_threshold,]
data_bad <- data_trial[data_trial[['PropMissing']] > trial_threshold,]
data_trial <- data_trial %>%
mutate(Remove = ifelse(PropMissing > trial_threshold, 1, 0))
bad_num <- length(data_bad[['PropMissing']])
message(paste('Removing trials with a proportion missing >', trial_threshold,
'\n ...removed', bad_num, 'trials \n'))
data_out <- left_join(data_trial2, data, by = c(subject, trial))
data_out$SubjProp <- 1
}else{
if(subject_trial_threshold > 1){
stop('Please input subject trial threshold as a proportion')
}
if(trial_threshold > 1){
stop('Please input trial threshold as a proportion')
}
data_trial <- data %>%
group_by(!!sym(subject), !!sym(trial)) %>%
mutate(Missing = ifelse(is.na(!!sym(pupil)), 1, 0)) %>%
summarise(SumMissing = sum(Missing),
PropMissing = sum(Missing)/length(Missing)) %>%
ungroup()
data_trial2 <- data_trial[data_trial$PropMissing < trial_threshold,]
data_bad <- data_trial[data_trial$PropMissing > trial_threshold,]
bad_num <- length(data_bad[['PropMissing']])
data_trial <- data_trial %>%
mutate(Remove = ifelse(PropMissing > trial_threshold, 1, 0))
message(paste('Removing trials with a proportion missing >', trial_threshold,
'\n ...removed', bad_num, 'trials \n'))
data_part <- data_trial %>%
group_by(!!sym(subject)) %>%
summarise(SubjProp = sum(Remove)/length(Remove)) %>%
ungroup()
data_part2 <- data_part[data_part[['SubjProp']] < subject_trial_threshold,]
data_bad2 <- data_part[data_part[['SubjProp']] > subject_trial_threshold,]
part_num <- length(data_bad2[['SubjProp']])
message(paste('Removing subjects with a proportion of missing trials >',
subject_trial_threshold,
'\n ...removed', part_num, 'subjects \n'))
data_out2 <- left_join(data_trial2, data, by = c(subject, trial))
data_out <- left_join(data_part2, data_out2, by = subject)
}
data_out <- data_out %>%
select(-SubjProp, -PropMissing, -SumMissing)
class(data_out) <- c(class(data))
attr(data_out, 'PupillometryR') <- options
return(data_out)
} |
writeExpectTest <- function(expr, filename="", ...)
{
tfile <- tempfile()
on.exit(unlink(tfile))
exsub <- deparse(substitute(expr))
result <- paste(deparse(dput(expr, file=tfile)), collapse="\n")
output <- paste0("expect_equal(", exsub, ",\n",
result, "\n)")
cat(output, file=filename, ...)
} |
ParamStMoE <- setRefClass(
"ParamStMoE",
fields = list(
X = "numeric",
Y = "numeric",
n = "numeric",
phiBeta = "list",
phiAlpha = "list",
K = "numeric",
p = "numeric",
q = "numeric",
df = "numeric",
alpha = "matrix",
beta = "matrix",
sigma2 = "matrix",
lambda = "matrix",
delta = "matrix",
nu = "matrix"
),
methods = list(
initialize = function(X = numeric(), Y = numeric(1), K = 1, p = 3, q = 1) {
X <<- X
Y <<- Y
n <<- length(Y)
phiBeta <<- designmatrix(x = X, p = p)
phiAlpha <<- designmatrix(x = X, p = q)
df <<- (q + 1) * (K - 1) + (p + 1) * K + K + K + K
K <<- K
p <<- p
q <<- q
alpha <<- matrix(0, q + 1, K - 1)
beta <<- matrix(NA, p + 1, K)
sigma2 <<- matrix(NA, 1, K)
lambda <<- matrix(NA, ncol = K)
delta <<- matrix(NA, ncol = K)
nu <<- matrix(NA, ncol = K)
},
initParam = function(segmental = FALSE) {
"Method to initialize parameters \\code{alpha}, \\code{beta} and
\\code{sigma2}.
If \\code{segmental = TRUE} then \\code{alpha}, \\code{beta} and
\\code{sigma2} are initialized by clustering the response \\code{Y}
uniformly into \\code{K} contiguous segments. Otherwise, \\code{alpha},
\\code{beta} and \\code{sigma2} are initialized by clustering randomly
the response \\code{Y} into \\code{K} segments."
if (!segmental) {
klas <- sample(1:K, n, replace = TRUE)
for (k in 1:K) {
Xk <- phiBeta$XBeta[klas == k,]
yk <- Y[klas == k]
beta[, k] <<- solve(t(Xk) %*% Xk) %*% t(Xk) %*% yk
sigma2[k] <<- sum((yk - Xk %*% beta[, k]) ^ 2) / length(yk)
}
} else {
nk <- round(n / K) - 1
klas <- rep.int(0, n)
for (k in 1:K) {
i <- (k - 1) * nk + 1
j <- (k * nk)
yk <- matrix(Y[i:j])
Xk <- phiBeta$XBeta[i:j, ]
beta[, k] <<- solve(t(Xk) %*% Xk, tol = 0) %*% (t(Xk) %*% yk)
muk <- Xk %*% beta[, k, drop = FALSE]
sigma2[k] <<- t(yk - muk) %*% (yk - muk) / length(yk)
klas[i:j] <- k
}
}
Z <- matrix(0, nrow = n, ncol = K)
Z[klas %*% ones(1, K) == ones(n, 1) %*% seq(K)] <- 1
tau <- Z
res <- IRLS(phiAlpha$XBeta, tau, ones(nrow(tau), 1), alpha)
alpha <<- res$W
lambda <<- -1 + 2 * rand(1, K)
delta <<- lambda / sqrt(1 + lambda ^ 2)
nu <<- 50 * rand(1, K)
},
MStep = function(statStMoE, calcAlpha = FALSE, calcBeta = FALSE,
calcSigma2 = FALSE, calcLambda = FALSE, calcNu = FALSE,
verbose_IRLS = FALSE) {
"Method which implements the M-step of the EM algorithm to learn the
parameters of the StMoE model based on statistics provided by the object
\\code{statStMoE} of class \\link{StatStMoE} (which contains the E-step)."
reg_irls <- 0
if (calcAlpha) {
res_irls <- IRLS(phiAlpha$XBeta, statStMoE$tik, ones(nrow(statStMoE$tik), 1), alpha, verbose_IRLS)
reg_irls <- res_irls$reg_irls
alpha <<- res_irls$W
}
if (calcBeta) {
for (k in 1:K) {
TauikWik <- (statStMoE$tik[, k] * statStMoE$wik[, k]) %*% ones(1, p + 1)
TauikX <- phiBeta$XBeta * (statStMoE$tik[, k] %*% ones(1, p + 1))
betak <- solve((t(TauikWik * phiBeta$XBeta) %*% phiBeta$XBeta), tol = 0) %*% (t(TauikX) %*% ((statStMoE$wik[, k] * Y) - (delta[k] * statStMoE$E1ik[, k])))
beta[, k] <<- betak
}
}
if (calcSigma2) {
for (k in 1:K) {
sigma2[k] <<- sum(statStMoE$tik[, k] * (statStMoE$wik[, k] * ((Y - phiBeta$XBeta %*% beta[, k]) ^ 2) - 2 * delta[k] * statStMoE$E1ik[, k] * (Y - phiBeta$XBeta %*% beta[, k]) + statStMoE$E2ik[, k])) / (2 * (1 - delta[k] ^ 2) * sum(statStMoE$tik[, k]))
}
}
if (calcLambda) {
for (k in 1:K) {
try(lambda[k] <<- uniroot(f <- function(lmbda) {
return((lmbda / sqrt(1 + lmbda ^ 2)) * (1 - (lmbda ^ 2 / (1 + lmbda ^ 2))) *
sum(statStMoE$tik[, k])
+ (1 + (lmbda ^ 2 / (1 + lmbda ^ 2))) * sum(statStMoE$tik[, k] * statStMoE$dik[, k] *
statStMoE$E1ik[, k] / sqrt(sigma2[k]))
- (lmbda / sqrt(1 + lmbda ^ 2)) * sum(statStMoE$tik[, k] * (
statStMoE$wik[, k] * (statStMoE$dik[, k] ^ 2) + statStMoE$E2ik[, k] / (sqrt(sigma2[k]) ^ 2)
))
)
}, c(-100, 100), extendInt = "yes")$root,
silent = TRUE)
delta[k] <<- lambda[k] / sqrt(1 + lambda[k] ^ 2)
}
}
if (calcNu) {
for (k in 1:K) {
try(nu[k] <<- suppressWarnings(uniroot(f <- function(nnu) {
return(-psigamma((nnu) / 2) + log((nnu) / 2) + 1 + sum(statStMoE$tik[, k] * (statStMoE$E3ik[, k] - statStMoE$wik[, k])) /
sum(statStMoE$tik[, k]))
}, c(0, 100))$root), silent = TRUE)
}
}
return(reg_irls)
}
)
) |
hhpdf <- function(file, ...) {invisible(NULL)}
hhdev.off <- function(...) {invisible(NULL)}
hhcapture <- function(file, text, echo=TRUE, print.eval=TRUE) {
source(textConnection(text),
echo=TRUE, print.eval=TRUE, keep.source=TRUE,
max.deparse.length=500)
}
hhcode <- function(file, text) {
cat(text)
}
hhpng <- function(file, ...) {invisible(NULL)}
hhlatex <- function(file="", ...) {
file.tex <- Hmisc::latex(file="", ...)
invisible(NULL)
} |
data(ttrc)
rownames(ttrc) <- ttrc$Date
ttrc$Date <- NULL
input <- list( all=ttrc[1:250,], top=ttrc[1:250,], mid=ttrc[1:250,] )
input$top[1:10,] <- NA
input$mid[9:20,] <- NA
iAll <- ttrc[1:250,]
iTop <- iAll; iTop[1:10,] <- NA
iMid <- iAll; iMid[9:20,] <- NA
hl <- c('High','Low')
hlc <- c('High','Low','Close')
cl <- 'Close'
load(system.file("unitTests/output.misc.rda", package="TTR"))
test.ROC.continuous <- function() {
roc <- ROC(iAll[,cl], type='continuous')
checkEqualsNumeric( roc, output$allROCc )
checkEquals( attributes(roc), attributes(output$allROCc) )
}
test.ROC.discrete <- function() {
roc <- ROC(input$all$Close, type='discrete')
checkEqualsNumeric( roc, output$allROCd )
checkEquals( attributes(roc), attributes(output$allROCd) )
}
test.momentum <- function() {
mom <- momentum(input$all$Close)
checkEqualsNumeric( mom, output$allMom )
checkEquals( attributes(mom), attributes(output$allMom) )
}
test.CLV <- function() {
ia <- iAll[,hlc]; rownames(ia) <- NULL
it <- iTop[,hlc]; rownames(it) <- NULL
oa <- as.data.frame(output$allCLV); rownames(oa) <- rownames(ia)
ot <- as.data.frame(output$topCLV); rownames(ot) <- rownames(it)
checkEqualsNumeric( CLV(ia), output$allCLV )
checkEquals( attributes(CLV(ia)), attributes(output$allCLV) )
checkEqualsNumeric( CLV(it), output$topCLV )
checkEquals( attributes(CLV(it)), attributes(output$topCLV) )
}
test.EMV <- function() {
ia <- iAll[,hl]; rownames(ia) <- NULL
emv.all <- EMV(ia, input$all$Volume)
checkEqualsNumeric( emv.all, output$allEMV )
checkEquals( attributes(emv.all), attributes(output$allEMV) )
}
test.KST <- function() {
checkEqualsNumeric( KST(input$all$Close), output$allKST )
checkEquals( attributes(KST(input$all$Close)), attributes(output$allKST) )
} |
setGeneric(name="cancel",def=function(.Object){standardGeneric("cancel")})
setMethod(f = "cancel",signature(.Object = "geojob"),definition = function(.Object){
setJobState()
.Object@id <- "<no active job>"
return(.Object)
})
setMethod(f = "cancel",signature(.Object = "missing"),definition = function(.Object){
setJobState()
}) |
uM2pool <- function(m2, n_x, n_y) {
m2*(n_x + n_y)/(n_x + n_y - 2)
}
uM3pool <- function(m3, n_x, n_y) {
m3*n_x*n_y*(n_x + n_y)/(n_x^2*n_y + n_x*n_y^2 - 6*n_x*n_y + 2*n_x + 2*n_y)
}
uM2pow2pool <- function(m2, m4, n_x, n_y) {
n_x*n_y*(-m2^2*(n_x^2 + 2*n_x*n_y + n_y^2)*(n_x^3*n_y^2 + n_x^2*n_y^3 - 8*n_x^2*n_y^2 + 6*n_x^2*n_y - 3*n_x^2 + 6*n_x*n_y^2 - 3*n_y^2) + m4*n_x*n_y*(n_x + n_y)*(n_x^2*n_y + n_x*n_y^2 - 4*n_x*n_y + n_x + n_y))/(3*(n_x^2*n_y + n_x*n_y^2 - 4*n_x*n_y + n_x + n_y)*(4*n_x^2*n_y^2 - 5*n_x^2*n_y + 3*n_x^2 - 5*n_x*n_y^2 + 3*n_y^2) - (n_x^3*n_y^2 + n_x^2*n_y^3 - 8*n_x^2*n_y^2 + 6*n_x^2*n_y - 3*n_x^2 + 6*n_x*n_y^2 - 3*n_y^2)*(n_x^3*n_y + 2*n_x^2*n_y^2 - 5*n_x^2*n_y + n_x*n_y^3 - 5*n_x*n_y^2 + 12*n_x*n_y - 3*n_x - 3*n_y))
}
uM4pool <- function(m2, m4, n_x, n_y) {
n_x*n_y*(3*m2^2*(n_x^2 + 2*n_x*n_y + n_y^2)*(4*n_x^2*n_y^2 - 5*n_x^2*n_y + 3*n_x^2 - 5*n_x*n_y^2 + 3*n_y^2) - m4*n_x*n_y*(n_x + n_y)*(n_x^3*n_y + 2*n_x^2*n_y^2 - 5*n_x^2*n_y + n_x*n_y^3 - 5*n_x*n_y^2 + 12*n_x*n_y - 3*n_x - 3*n_y))/(3*(n_x^2*n_y + n_x*n_y^2 - 4*n_x*n_y + n_x + n_y)*(4*n_x^2*n_y^2 - 5*n_x^2*n_y + 3*n_x^2 - 5*n_x*n_y^2 + 3*n_y^2) - (n_x^3*n_y^2 + n_x^2*n_y^3 - 8*n_x^2*n_y^2 + 6*n_x^2*n_y - 3*n_x^2 + 6*n_x*n_y^2 - 3*n_y^2)*(n_x^3*n_y + 2*n_x^2*n_y^2 - 5*n_x^2*n_y + n_x*n_y^3 - 5*n_x*n_y^2 + 12*n_x*n_y - 3*n_x - 3*n_y))
}
uM2M3pool <- function(m2, m3, m5, n_x, n_y) {
n_x^2*n_y^2*(m2*m3*(n_x^2 + 2*n_x*n_y + n_y^2)*(n_x^4*n_y^3 + n_x^3*n_y^4 - 10*n_x^3*n_y^3 + 10*n_x^3*n_y^2 - 10*n_x^3*n_y + 4*n_x^3 + 10*n_x^2*n_y^3 - 10*n_x*n_y^3 + 4*n_y^3) - m5*n_x*n_y*(n_x + n_y)*(n_x^3*n_y^2 + n_x^2*n_y^3 - 8*n_x^2*n_y^2 + 5*n_x^2*n_y - 2*n_x^2 + 5*n_x*n_y^2 - 2*n_y^2))/(10*(n_x^3*n_y^2 + n_x^2*n_y^3 - 8*n_x^2*n_y^2 + 5*n_x^2*n_y - 2*n_x^2 + 5*n_x*n_y^2 - 2*n_y^2)*(-2*n_x^3*n_y^3 + 5*n_x^3*n_y^2 - 8*n_x^3*n_y + 4*n_x^3 + 5*n_x^2*n_y^3 - 8*n_x*n_y^3 + 4*n_y^3) + (n_x^4*n_y^3 + n_x^3*n_y^4 - 10*n_x^3*n_y^3 + 10*n_x^3*n_y^2 - 10*n_x^3*n_y + 4*n_x^3 + 10*n_x^2*n_y^3 - 10*n_x*n_y^3 + 4*n_y^3)*(n_x^4*n_y^2 + 2*n_x^3*n_y^3 - 12*n_x^3*n_y^2 + 2*n_x^3*n_y + n_x^2*n_y^4 - 12*n_x^2*n_y^3 + 60*n_x^2*n_y^2 - 42*n_x^2*n_y + 20*n_x^2 + 2*n_x*n_y^3 - 42*n_x*n_y^2 + 20*n_y^2))
}
uM5pool <- function(m2, m3, m5, n_x, n_y) {
n_x^2*n_y^2*(10*m2*m3*(n_x^2 + 2*n_x*n_y + n_y^2)*(-2*n_x^3*n_y^3 + 5*n_x^3*n_y^2 - 8*n_x^3*n_y + 4*n_x^3 + 5*n_x^2*n_y^3 - 8*n_x*n_y^3 + 4*n_y^3) + m5*n_x*n_y*(n_x + n_y)*(n_x^4*n_y^2 + 2*n_x^3*n_y^3 - 12*n_x^3*n_y^2 + 2*n_x^3*n_y + n_x^2*n_y^4 - 12*n_x^2*n_y^3 + 60*n_x^2*n_y^2 - 42*n_x^2*n_y + 20*n_x^2 + 2*n_x*n_y^3 - 42*n_x*n_y^2 + 20*n_y^2))/(10*(n_x^3*n_y^2 + n_x^2*n_y^3 - 8*n_x^2*n_y^2 + 5*n_x^2*n_y - 2*n_x^2 + 5*n_x*n_y^2 - 2*n_y^2)*(-2*n_x^3*n_y^3 + 5*n_x^3*n_y^2 - 8*n_x^3*n_y + 4*n_x^3 + 5*n_x^2*n_y^3 - 8*n_x*n_y^3 + 4*n_y^3) + (n_x^4*n_y^3 + n_x^3*n_y^4 - 10*n_x^3*n_y^3 + 10*n_x^3*n_y^2 - 10*n_x^3*n_y + 4*n_x^3 + 10*n_x^2*n_y^3 - 10*n_x*n_y^3 + 4*n_y^3)*(n_x^4*n_y^2 + 2*n_x^3*n_y^3 - 12*n_x^3*n_y^2 + 2*n_x^3*n_y + n_x^2*n_y^4 - 12*n_x^2*n_y^3 + 60*n_x^2*n_y^2 - 42*n_x^2*n_y + 20*n_x^2 + 2*n_x*n_y^3 - 42*n_x*n_y^2 + 20*n_y^2))
} |
cdm_ll_numerical_differentiation <- function(ll0, ll1, ll2, h)
{
d1 <- ( ll1 - ll2 ) / ( 2 * h )
d2 <- ( ll1 + ll2 - 2*ll0 ) / h^2
res <- list( d1=d1, d2=d2)
return(res)
} |
.ptime <- proc.time()
unname(extSoftVersion()["PCRE"])
unname(pcre_config()["stack"])
if(pcre_config()["stack"]) {
op <- options(warn = 1)
for (n in c(seq(5000L, 10000L, 1000L), 20000L, 50000L, 100000L)) {
print(n)
x <- paste0(rep("a", n), collapse="")
print(grepl("(a|b)+", x, perl = TRUE))
}
options(op)
}
if(!pcre_config()["JIT"]) {
message("The rest of these tests are pointless without JIT support")
q("no")
}
txt2 <- c("The", "licenses", "for", "most", "software", "are",
"designed", "to", "take", "away", "your", "freedom",
"to", "share", "and", "change", "it.",
"", "By", "contrast,", "the", "GNU", "General", "Public", "License",
"is", "intended", "to", "guarantee", "your", "freedom", "to",
"share", "and", "change", "free", "software", "--",
"to", "make", "sure", "the", "software", "is",
"free", "for", "all", "its", "users")
grep("[gu]", txt2, perl = TRUE)
st <- function(expr) sum(system.time(expr)[1:2])
st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
options(PCRE_use_JIT = TRUE)
st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
txt3 <- rep(txt2, 10)
options(PCRE_use_JIT = FALSE)
st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
options(PCRE_use_JIT = TRUE)
st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
pat <- "([^[:alpha:]]|a|b)+"
long_string <- paste0(rep("a", 1023), collapse="")
N <- 10
options(PCRE_use_JIT = FALSE)
st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
options(PCRE_use_JIT = TRUE)
st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
txt <- rep("a test of capitalizing", 50)
options(PCRE_use_JIT = FALSE)
st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
options(PCRE_use_JIT = TRUE)
st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
if(grepl("^10", extSoftVersion()["PCRE"])) {
cat("Time elapsed: ", proc.time() - .ptime,"\n")
q()
}
options(PCRE_study = FALSE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
txt3 <- rep(txt2, 10)
options(PCRE_study = FALSE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
pat <- "([^[:alpha:]]|a|b)+"
long_string <- paste0(rep("a", 1023), collapse="")
N <- 10
options(PCRE_study = FALSE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
txt <- rep("a test of capitalizing", 50)
options(PCRE_study = FALSE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
cat("Time elapsed: ", proc.time() - .ptime,"\n") |
expected <- eval(parse(text="TRUE"));
test(id=0, code={
argv <- eval(parse(text="list(structure(list(srcfile = \"/home/lzhao/tmp/RtmptukZK0/R.INSTALL2ccc3a5cba55/nlme/R/lmList.R\", frow = 612L, lrow = 612L), .Names = c(\"srcfile\", \"frow\", \"lrow\"), row.names = c(NA, -1L)))"));
do.call(`is.list`, argv);
}, o=expected); |
context("sofa_deletedb")
sofa_createdb("deldbtesting")
test_that("sofa_deletedb returns a character of length 1", {
expect_that(length(sofa_deletedb("deldbtesting")), equals(1))
})
sofa_createdb("deldbtesting")
test_that("sofa_deletedb returns the right characters", {
expect_that(sofa_deletedb("deldbtesting"), matches(""))
})
sofa_createdb("deldbtesting")
test_that("sofa_deletedb returns the correct class", {
expect_that(sofa_deletedb('deldoctesting'), is_a("character"))
expect_that(sofa_deletedb('deldoctesting_absent'), is_a("character"))
}) |
mybnn <-
function(train,test,ratio){
n = dim(train)[1]
weight = rep(0,n)
for(i in 1:n){
weight[i] = ratio*(1-ratio)^(i-1)/(1-(1-ratio)^n)
}
if(is.vector(test) == TRUE){
if(dim(train)[2] - 1 == 1){
test.mat = as.matrix(test)
}else{
test.mat = t(as.matrix(test))
}
}else{
test.mat = test
}
if(dim(test.mat)[2] != (dim(train)[2]-1)) stop("training data and test data have different dimensions")
label = apply(test.mat,1,function(x) mywnn(train,x,weight))
return(label)
} |
NULL
GeomMarkCircle <- ggproto('GeomMarkCircle', GeomShape,
setup_data = function(self, data, params) {
if (!is.null(data$filter)) {
self$removed <- data[!data$filter, c('x', 'y', 'PANEL')]
data <- data[data$filter, ]
}
data
},
draw_panel = function(self, data, panel_params, coord, expand = unit(5, 'mm'),
radius = expand, n = 100,
label.margin = margin(2, 2, 2, 2, 'mm'),
label.width = NULL, label.minwidth = unit(50, 'mm'),
label.hjust = 0, label.buffer = unit(10, 'mm'),
label.fontsize = 12, label.family = '',
label.fontface = c('bold', 'plain'),
label.fill = 'white', label.colour = 'black',
label.lineheight = 1,
con.colour = 'black', con.size = 0.5, con.type = 'elbow',
con.linetype = 1, con.border = 'one',
con.cap = unit(3, 'mm'), con.arrow = NULL) {
if (nrow(data) == 0) return(zeroGrob())
coords <- coord$transform(data, panel_params)
if (!is.integer(coords$group)) {
coords$group <- match(coords$group, unique(coords$group))
}
coords <- coords[order(coords$group), ]
first_idx <- !duplicated(coords$group)
first_rows <- coords[first_idx, ]
label <- NULL
ghosts <- NULL
if (!is.null(coords$label) || !is.null(coords$description)) {
label <- first_rows
is_ghost <- which(self$removed$PANEL == coords$PANEL[1])
if (length(is_ghost) > 0) {
ghosts <- self$removed[is_ghost, ]
ghosts <- coord$transform(ghosts, panel_params)
ghosts <- list(x = ghosts$x, y = ghosts$y)
}
}
circEncGrob(coords$x, coords$y,
default.units = 'native',
id = coords$group, expand = expand, radius = radius, n = n,
label = label, ghosts = ghosts,
mark.gp = gpar(
col = first_rows$colour,
fill = alpha(first_rows$fill, first_rows$alpha),
lwd = first_rows$size * .pt,
lty = first_rows$linetype
),
label.gp = gpar(
col = label.colour,
fill = label.fill,
fontface = label.fontface,
fontfamily = label.family,
fontsize = label.fontsize,
lineheight = label.lineheight
),
con.gp = gpar(
col = con.colour,
fill = con.colour,
lwd = con.size * .pt,
lty = con.linetype
),
label.margin = label.margin,
label.width = label.width,
label.minwidth = label.minwidth,
label.hjust = label.hjust,
label.buffer = label.buffer,
con.type = con.type,
con.border = con.border,
con.cap = con.cap,
con.arrow = con.arrow
)
},
default_aes = aes(fill = NA, colour = 'black', alpha = 0.3, size = 0.5,
linetype = 1, filter = NULL, label = NULL,
description = NULL)
)
geom_mark_circle <- function(mapping = NULL, data = NULL, stat = 'identity',
position = 'identity', expand = unit(5, 'mm'),
radius = expand, n = 100,
label.margin = margin(2, 2, 2, 2, 'mm'),
label.width = NULL, label.minwidth = unit(50, 'mm'),
label.hjust = 0, label.fontsize = 12,
label.family = '', label.lineheight = 1,
label.fontface = c('bold', 'plain'),
label.fill = 'white', label.colour = 'black',
label.buffer = unit(10, 'mm'), con.colour = 'black',
con.size = 0.5, con.type = 'elbow',
con.linetype = 1, con.border = 'one',
con.cap = unit(3, 'mm'), con.arrow = NULL, ...,
na.rm = FALSE, show.legend = NA,
inherit.aes = TRUE) {
layer(
data = data,
mapping = mapping,
stat = stat,
geom = GeomMarkCircle,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(
na.rm = na.rm,
expand = expand,
radius = radius,
n = n,
label.margin = label.margin,
label.width = label.width,
label.minwidth = label.minwidth,
label.fontsize = label.fontsize,
label.family = label.family,
label.lineheight = label.lineheight,
label.fontface = label.fontface,
label.hjust = label.hjust,
label.fill = label.fill,
label.colour = label.colour,
label.buffer = label.buffer,
con.colour = con.colour,
con.size = con.size,
con.type = con.type,
con.linetype = con.linetype,
con.border = con.border,
con.cap = con.cap,
con.arrow = con.arrow,
...
)
)
}
circEncGrob <- function(x = c(0, 0.5, 1, 0.5), y = c(0.5, 1, 0.5, 0), id = NULL,
id.lengths = NULL, expand = 0, radius = 0, n = 100,
label = NULL, ghosts = NULL, default.units = 'npc',
name = NULL, mark.gp = gpar(), label.gp = gpar(),
con.gp = gpar(), label.margin = margin(),
label.width = NULL, label.minwidth = unit(50, 'mm'),
label.hjust = 0, label.buffer = unit(10, 'mm'),
con.type = 'elbow', con.border = 'one',
con.cap = unit(3, 'mm'), con.arrow = NULL, vp = NULL) {
if (is.null(id)) {
if (is.null(id.lengths)) {
id <- rep(1, length(x))
} else {
id <- rep(seq_along(id.lengths), id.lengths)
if (length(id) != length(x)) {
stop('id.lengths must sum up to the number of points', call. = FALSE)
}
}
}
include <- unlist(lapply(split(seq_along(x), id), function(i) {
xi <- x[i]
yi <- y[i]
if (length(unique(xi)) == 1) {
return(i[c(which.min(yi), which.max(yi))])
}
if (length(unique(yi)) == 1) {
return(i[c(which.min(xi), which.max(xi))])
}
i[chull(xi, yi)]
}))
mark <- shapeGrob(
x = x[include], y = y[include], id = id[include],
id.lengths = NULL, expand = expand, radius = radius,
default.units = default.units, name = name, gp = mark.gp,
vp = vp
)
if (!is.null(label)) {
label <- lapply(seq_len(nrow(label)), function(i) {
grob <- labelboxGrob(label$label[i], 0, 0, label$description[i],
gp = label.gp, pad = label.margin, width = label.width,
min.width = label.minwidth, hjust = label.hjust
)
if (con.border == 'all') {
grob$children[[1]]$gp$col <- con.gp$col
grob$children[[1]]$gp$lwd <- con.gp$lwd
grob$children[[1]]$gp$lty <- con.gp$lty
}
grob
})
labeldim <- lapply(label, function(l) {
c(
convertWidth(grobWidth(l), 'mm', TRUE),
convertHeight(grobHeight(l), 'mm', TRUE)
)
})
ghosts <- lapply(ghosts, unit, default.units)
} else {
labeldim <- NULL
}
gTree(
mark = mark, n = n, label = label, labeldim = labeldim,
buffer = label.buffer, ghosts = ghosts, con.gp = con.gp, con.type = con.type,
con.cap = as_mm(con.cap, default.units), con.border = con.border,
con.arrow = con.arrow, name = name, vp = vp, cl = 'circ_enc'
)
}
makeContent.circ_enc <- function(x) {
mark <- x$mark
x_new <- convertX(mark$x, 'mm', TRUE)
y_new <- convertY(mark$y, 'mm', TRUE)
circles <- enclose_points(round(x_new, 2), round(y_new, 2), mark$id)
circles$id <- seq_len(nrow(circles))
circles <- circles[rep(circles$id, each = x$n), ]
points <- 2 * pi * (seq_len(x$n) - 1) / x$n
circles$x <- circles$x0 + cos(points) * circles$r
circles$y <- circles$y0 + sin(points) * circles$r
circles <- unique(circles)
mark$x <- unit(circles$x, 'mm')
mark$y <- unit(circles$y, 'mm')
mark$id <- circles$id
if (inherits(mark, 'shape')) mark <- makeContent(mark)
if (!is.null(x$label)) {
polygons <- Map(function(x, y) list(x = x, y = y),
x = split(as.numeric(mark$x), mark$id),
y = split(as.numeric(mark$y), mark$id)
)
labels <- make_label(
labels = x$label, dims = x$labeldim, polygons = polygons,
ghosts = x$ghosts, buffer = x$buffer, con_type = x$con.type,
con_border = x$con.border, con_cap = x$con.cap,
con_gp = x$con.gp, anchor_mod = 2, arrow = x$con.arrow
)
setChildren(x, do.call(gList, c(list(mark), labels)))
} else {
setChildren(x, gList(mark))
}
} |
get_conservation_scores <- function(variantsTable, conservationBwPath) {
Chr <- Pos <- Ref <- NULL
coords <- variantsTable %>%
transmute(chrom = Chr, start = Pos, end = as.numeric(start+nchar(Ref))-1)
if (all(str_starts(coords[[1]], "chr")) == FALSE) {
coords[!str_starts(coords[[1]], "chr"),1] <- str_c("chr", coords[[1]][!str_starts(coords[[1]], "chr")])
}
scores_out <- c()
for (i in 1:nrow(coords)) {
scores_df <- data.frame(pos = seq(coords[[i,2]], coords[[i,3]]))
scores_vec <- rtracklayer::import.bw(con = conservationBwPath, which = GRanges(paste0(coords[[i, 1]], ":", coords[[i,2]], "-", coords[[i,3]])))
if (length(scores_vec) == 0) {
scores_out <- append(scores_out, paste(rep("NA", nrow(scores_df)), collapse = ";"))
next
}
final_score <- data.frame(pos = start(scores_vec), conservation = round(scores_vec$score, 3))
scores_df <- left_join(scores_df, final_score, by=c("pos"="pos"))
scores_out <- append(scores_out, paste(scores_df$conservation, collapse = ";"))
}
return (scores_out)
} |
updateSd <- function(X.new,
integration.points.oldsd,
model,
precalc.data,
integration.points
){
d <- model@d
n <- model@n
X.new <- t(X.new)
krig <- predict_nobias_km(object=model,
newdata=as.data.frame(X.new),
type="UK",
se.compute=TRUE,
cov.compute=TRUE)
mk <- krig$mean
sk <- krig$sd
F.newdata <- krig$F.newdata
c.newdata <- krig$c
Sigma.r <- krig$cov
kn = computeQuickKrigcov(model,
integration.points,
X.new,
precalc.data,
F.newdata,
c.newdata)
chol.Sigma.r <- NULL
chol.Sigma.r <- try(chol(Sigma.r),TRUE)
if(!is.numeric(chol.Sigma.r)) return(list(error=TRUE))
lambda_nplus.r <- kn %*% chol2inv(chol.Sigma.r)
predict_var <- pmax(0,integration.points.oldsd^2 - rowSums(lambda_nplus.r * kn))
predict_sd <- sqrt(predict_var)
return(predict_sd)
} |
"petri_dishes" |
pava.sa <- function(y,w=NULL,decreasing=FALSE,long.out=FALSE,stepfun=FALSE)
{
if(decreasing) y <- rev(y)
n <- length(y)
if(is.null(w))
w <- rep(1,n)
else if(decreasing) w <- rev(w)
r <- rep(1,n)
repeat {
stble <- TRUE
i <- 1
while(i < n) {
if(y[i] > y[i+1]) {
stble <- FALSE
www <- w[i] + w[i+1]
ttt <- (w[i]*y[i] + w[i+1]*y[i+1])/www
y[i+1] <- ttt
w[i+1] <- www
y <- y[-i]
w <- w[-i]
r[i+1] <- r[i] + r[i+1]
r <- r[-i]
n <- n-1
}
i <- i+1
}
if(stble) break
}
y <- rep(y,r)
if(decreasing) y <- rev(y)
if(long.out | stepfun) {
if(decreasing) r <- rev(r)
tr <- rep(tapply(1:length(y),rep(1:length(r),r),min),r)
}
if(long.out) {
if(decreasing) w <- rev(w)
w <- rep(w,r)
lout <- list(y=y,w=w,tr=tr)
}
if(stepfun) {
knots <- 1+which(diff(tr)!=0)
y0 <- c(y[1],y[knots])
h <- stepfun(knots,y0)
}
ntype <- 1+sum(c(long.out,stepfun)*(1:2))
switch(ntype,y,lout,h,c(lout,list(h=h)))
} |
expected <- eval(parse(text="structure(c(1.00192158474469, 0.500611696028749, 0.332967709798622, 0.249529151583945, 0.199859932368632, 0.166171774633113, 0.143725080104588, 0.126847385576286, 0.111726067153096, 0.500611696028749, 0.33253138023914, 0.249894545257491, 0.200854308505617, 0.166937485699285, 0.142293779520833, 0.124647353499376, 0.110137293143018, 0.0998824472204338, 0.332967709798622, 0.249894545257491, 0.199825768542762, 0.166651515553326, 0.142257314562146, 0.12462530226749, 0.11031627347356, 0.0988990038212295, 0.0904793912005313, 0.249529151583945, 0.200854308505617, 0.166651515553326, 0.143436707679878, 0.124928204062841, 0.111342021505031, 0.100047337927152, 0.090875357601969, 0.0835813207368242, 0.199859932368632, 0.166937485699285, 0.142257314562146, 0.124928204062841, 0.110898989913376, 0.0998749310316349, 0.0908543225642293, 0.0833287409605183, 0.0765033842774308, 0.166171774633113, 0.142293779520833, 0.12462530226749, 0.111342021505031, 0.0998749310316349, 0.0915211007463971, 0.0833424511320793, 0.0769931402253433, 0.0707755214962486, 0.143725080104588, 0.124647353499376, 0.11031627347356, 0.100047337927152, 0.0908543225642293, 0.0833424511320793, 0.0770880372305834, 0.0718651376951712, 0.0666164897993546, 0.126847385576286, 0.110137293143018, 0.0988990038212295, 0.090875357601969, 0.0833287409605183, 0.0769931402253433, 0.0718651376951713, 0.0676106605311985, 0.063324574978029, 0.111726067153096, 0.0998824472204338, 0.0904793912005313, 0.0835813207368242, 0.0765033842774308, 0.0707755214962486, 0.0666164897993546, 0.063324574978029, 0.0613649549614623), .Dim = c(9L, 9L))"));
test(id=0, code={
argv <- eval(parse(text="list(structure(c(-1.22589324018138, -0.740548974281808, -0.54768368397833, -0.441021701509591, -0.370068251595057, -0.319690799411412, -0.282987166340516, -0.254112864677485, -0.230083320312515, 0.203647970189376, -0.0305516337408725, -0.0825170335109532, -0.0984577177107505, -0.100129992839015, -0.0988979642888749, -0.0945771185256416, -0.0902309571831907, -0.0871241228998968, -0.00955870050771132, 0.0197754782700907, 0.0125304440435148, 0.00419858922572787, -0.00191073996840182, -0.0061756059258365, -0.00956682744689523, -0.0127366531032827, -0.0131079781713544, 0.000214464770644159, -0.000956552371122151, 5.72249143534175e-05, 0.00029865136977495, 0.00077852017665313, 0.00142425180877207, 0.000491677810053133, -0.000120006753650731, -0.00247588122373662, 4.2574997724815e-05, -0.000297064220851874, 0.000399761711902461, 5.67830351414009e-05, -0.00026523273781528, 0.000320119491527155, -0.00026454073650643, -0.000195756422133707, 0.000192249930248858, -4.94461924222768e-07, 2.80125995838013e-05, -0.000119138513940463, 0.000151917649712048, -7.31975645151543e-05, 4.92140187851149e-05, -1.13604576670922e-05, -3.74519303853871e-05, 9.55915555684852e-06), .Dim = c(9L, 6L)), structure(c(-0.709851441473678, -0.428813651666777, -0.317135326144804, -0.255372882626744, -0.214287405483635, -0.185116425598763, -0.163863247924954, -0.147143631578904, -0.133229363887123, 0.633337192677659, -0.0950143815681878, -0.256624734846691, -0.306199636924392, -0.311400346924765, -0.307568786499592, -0.294131125799441, -0.280614734641737, -0.270952601985731, -0.28505721606605, 0.58973945020027, 0.373679821042009, 0.125209295460755, -0.0569816174886273, -0.184167401344961, -0.285299575647986, -0.379829336915808, -0.390902901787376, 0.0675695685124445, -0.301372718615498, 0.0180293609967187, 0.0940935153626058, 0.245281648154537, 0.448726753036158, 0.154908693733931, -0.0378094944843564, -0.780054577138554, 0.056333641054865, -0.393064241503382, 0.528949712019966, 0.0751331835725979, -0.350946016360591, 0.423570111428232, -0.350030386168567, -0.259017559788085, 0.254377901167792, -0.00226968135332679, 0.128583560874789, -0.546870143699694, 0.697333080468545, -0.335991790571385, 0.225902410856869, -0.0521468239901137, -0.171912019667483, 0.0438784789244046), .Dim = c(9L, 6L)))"));
.Internal(tcrossprod(argv[[1]], argv[[2]]));
}, o=expected); |
library(mfdb)
library(unittest, quietly = TRUE)
helpers <- c('utils/helpers.R', 'tests/utils/helpers.R') ; source(helpers[file.exists(helpers)])
mdb <- fake_mdb()
even <- function (x) x %% 2 == 0
cap <- function(code) {
grep("\\d{4}-\\d{2}-\\d{2}", capture.output({
x <- code
cat("Return Value:\n")
str(x)
}), value = TRUE, invert = TRUE)
}
ok_group("sanitise_col", local({
ok(cmp(sanitise_col(mdb, data.frame(aaaa=1,b=2,aa=3), 'aaaa'), 1), "Picked correct column (aaaa)")
ok(cmp(sanitise_col(mdb, data.frame(aaaa=1,b=2,aa=3), 'aa'), 3), "Picked correct column (aa)")
ok(cmp(sanitise_col(mdb, data.frame(aaaa=9,b=8,aa=7), 'AaAa'), 9), "Case is insensitive (AaAa)")
ok(cmp(sanitise_col(mdb, data.frame(aaaa=9,b=8,aa=7), 'Aa'), 7), "Case is insensitive (Aa)")
ok(cmp_error(sanitise_col(mdb, data.frame(a=9,b=8,c=7), 'bueller'), 'bueller'), "Complained about missing column when no default supplied")
ok(cmp(sanitise_col(mdb, data.frame(a=9,b=8,c=7), 'x', default = 99), 99), "No column x, used default")
ok(cmp(sanitise_col(mdb, data.frame(a=9,b=8,x=7), 'x', default = 99), 7), "Column overrode default")
ok(cmp(
sanitise_col(mdb, data.frame(gerald = c(2,4,6,8), freda = c(1,2,3,5)), 'gerald', test = even),
c(2,4,6,8)), "All of gerald passes test")
ok(cmp_error(
sanitise_col(mdb, data.frame(gerald = c(2,4,6,8), freda = c(1,2,3,5)), 'freda', test = even),
"freda"), "Freda does not")
ok(cmp_error(
sanitise_col(mdb, data.frame(gerald = c(2,4,6,8), freda = c(1,2,3,5)), 'freda', test = even),
"1,3,5$"), "Which items that don't match are mentioned")
ok(cmp_error(
sanitise_col(mdb, data.frame(freda = c(1:150)), 'freda', test = even),
paste(c(seq(1, 50 * 2 - 1, 2), " \\.\\.\\.$"), collapse=",")), "Give up complaining after 50 items")
}, asNamespace('mfdb'))) |
"addDscal" <-
function (modellist, dscal)
{
if(length(dscal) != 0) {
for(i in 1:length(dscal)){
if(length(dscal[[i]]$perclp) == 0)
dscal[[i]]$perclp <- FALSE
modellist[[dscal[[i]]$to]]@dscalspec <- dscal[[i]]
modellist[[dscal[[i]]$to]]@drel <- dscal[[i]]$value
}
}
modellist
} |
SquareSpike <- function(baseline, peak, period, duty_cycle, trend, duration, resolution) {
if(peak < baseline) {
stop("peak must be larger than baseline!")
}
if(duration <= resolution ) {
stop("duration must be longer than resolution!")
}
if((abs(duration/resolution - round(duration/resolution))) > 1e-10) {
stop("duration must be a multiple of resolution!")
}
if((abs(period/resolution - round(period/resolution))) > 1e-10) {
stop("period must be a multiple of resolution!")
}
if(duration <= 0 || resolution <= 0 || peak <= 0 || period <= 0) {
ID=matrix(ncol=1,nrow=6)
rownames(ID)=c("duration","resolution","peak","period")
ID[,1]=c(duration,resolution,peak,period)
Ind=which(ID[,1]<=0)
stop(paste0(rownames(ID)[Ind]," must be larger than 0! "))
}
if(baseline < 0) {
stop("baseline must be larger than or equal to 0!")
}
if(duty_cycle <= 0 || duty_cycle > 1) {
stop("duty cycle must be larger than 0 and smaller or equal to 1!")
}
if(trend <=0) {
stop("trend must be larger than 0!")
}
Osc=matrix(ncol=2,nrow=length(seq(0,duration,resolution)))
colnames(Osc)=c("time","osc")
Osc[,1]=seq(0,duration,resolution)
active=period*duty_cycle
Osc[,2]=baseline
for (i in 1:(nrow(Osc)*resolution/period)) {
Osc[round((((i-1)*(period/resolution))+2):(((i-1)*(period/resolution))+active/resolution)),2]=peak
peak=peak*trend
if(peak <= baseline) {
peak=baseline
}
}
if ((nrow(Osc)-(((i)*(period/resolution)))) <= (active/resolution)) {
Osc[round((((i)*(period/resolution))+1):nrow(Osc)),2]=peak
} else {
Osc[round((((i)*(period/resolution))+1):(((i)*(period/resolution))+active/resolution)),2]=peak
}
Osc[round((((i)*(period/resolution))+1)),2] = baseline
return(Osc)
} |
packagename = "DSAIDE"
helperdir = "auxiliary/helperfunctions"
figuredir = "media"
appdocdir = "appinformation"
filenames = c("get_settings.R","write_tasktext.R")
files_to_source = paste(here::here(),helperdir,filenames,sep="/")
sapply(files_to_source, source) |
span(
h4("Step 2: Adding the random interaction term"),
conditionalPanel(
condition = "0",
uiOutput("Mod8Step2_hidden")
),
p(paste0("Step 1 above layered on the random slopes for each $",NOT$env,"$ variable,
and these served to tip the population mean plane in various directions in environmental space,
much like a circus performer spinning plates at various heights and with variable skill.
However, the population mean plane could be warped due to an interaction between
the two $",NOT$env,"$ variables. Because it appears that such warping is adaptive in real organisms,
this would imply that individual variation in the extent of warping is possible.
Here we add that last random effect term to the phenotypic equation.")),
p(paste0("This now expands the phenotypic equation to include three slope terms, $",EQ1$dev1,"$,
$",EQ1$dev2,"$, and $",EQ1$dev12,"$, which are the individual deviation from the population
slope with respect to $",NOT$env,"_{1}$, $",NOT$env,"_{2}$, and the interaction between the
two $",NOT$env,"$ variables, respectively. The full equation is thus:")),
p(paste0("$$",
NOT$trait.1,"_{",NOT$time,NOT$ind,"} =
",EQ1$mean0," +
",EQ1$dev0," +
(",EQ1$mean1,"+",EQ1$dev1,")",NOT$env,"_{1",NOT$time,NOT$ind,"} +
(",EQ1$mean2,"+",EQ1$dev2,")",NOT$env,"_{2",NOT$time,NOT$ind,"} +
(",EQ1$mean12,"+",EQ1$dev12,")",NOT$env,"_{1",NOT$time,NOT$ind,"}",NOT$env,"_{2",NOT$time,NOT$ind,"} +
",NOT$error,"_{",NOT$time,NOT$ind,"}$$")),
p("As above, the addition of another random effect expands the variance-covariance once again.
It now is an ugly beast, but if you move through it systematically, you will see it is just
a ledger sheet that accounts for every possibility:"),
p(paste0("$$",
"\\begin{pmatrix}
",EQ1$dev0," \\\\ ",EQ1$dev1," \\\\ ",EQ1$dev2," \\\\ ",EQ1$dev12,"
\\end{pmatrix}",
"\\sim MVN(0, \\Omega_{",NOT$devI,NOT$devS,"}):
\\Omega_{",NOT$devI,NOT$devS,"}= ",
"\\begin{pmatrix}
Var(",NOT$devI,") & Cov_{",NOT$devI,EQ3$dev1,"} & Cov_{",NOT$devI,EQ3$dev2,"} & Cov_{",NOT$devI,EQ3$dev12,"} \\\\
Cov_{",NOT$devI,EQ3$dev1,"} & Var(",EQ3$dev1,") & Cov_{",EQ3$dev1,EQ3$dev2,"} & Cov_{",EQ3$dev1,EQ3$dev12,"} \\\\
Cov_{",NOT$devI,EQ3$dev2,"} & Cov_{",EQ3$dev1,EQ3$dev2,"} & Var(",EQ3$dev2,") & Cov_{",EQ3$dev2,EQ3$dev12,"} \\\\
Cov_{",NOT$devI,EQ3$dev12,"} & Cov_{",EQ3$dev1,EQ3$dev12,"} & Cov_{",EQ3$dev2,EQ3$dev12,"} & Var(",EQ3$dev12,")
\\end{pmatrix}",
"$$")),
p("We will simulate data with these terms, and assess two consequences of random slopes
in two dimensions. First, we will ask where variation due to the interaction term
ends up in a model that lacks that term. Second, we will try to visualize where
variation caused by variation in warping is more likely to be seen."),
p(paste0("As the phenotypic equation is getting more complex, we will increase the number of sampled individuals to 500.
As before, each individual is measured 20 times for both $",NOT$env,"$ variables and both environments are random and unshared.")),
p("Below, specify some parameter values:"),
getSliderInput("Mod8Step2_Vi", Modules_VAR$Vi),
getSliderInput("Mod8Step2_Ve", Modules_VAR$Vm),
getSliderInput("Mod8Step2_B1", Modules_VAR$B1.1),
getSliderInput("Mod8Step2_B2", Modules_VAR$B2.1),
getSliderInput("Mod8Step2_B12", Modules_VAR$B1122),
getSliderInput("Mod8Step2_Vs1", Modules_VAR$Vsx.1),
getSliderInput("Mod8Step2_Vs2", Modules_VAR$Vsx.2),
getSliderInput("Mod8Step2_Vs12", Modules_VAR$Vsx.12),
getSliderInput("Mod8Step2_CorIS1", Modules_VAR$CorIS1),
getSliderInput("Mod8Step2_CorIS2", Modules_VAR$CorIS2),
getSliderInput("Mod8Step2_CorIS12", Modules_VAR$CorIS12),
getSliderInput("Mod8Step2_CorS1S2", Modules_VAR$CorS1S2),
getSliderInput("Mod8Step2_CorS1S12", Modules_VAR$CorS1S12),
getSliderInput("Mod8Step2_CorS2S12", Modules_VAR$CorS2S12),
p("As before, it might be easiest to start with 0 covariances (represented as correlations) and add them in
individually so you can more easily see what each does."),
p("Once the data are simulated, we can analyze them with lme4 as was done in
the random regression module. For example, we can use the following equation
in which the individual specific interaction term is omitted:"),
p(paste0("$$",
NOT$trait.1,"_{",NOT$time,NOT$ind,"} =
",EQ1$mean0," +
",EQ1$dev0," +
(",EQ1$mean1,"+",EQ1$dev1,")",NOT$env,"_{1",NOT$time,NOT$ind,"} +
(",EQ1$mean2,"+",EQ1$dev2,")",NOT$env,"_{2",NOT$time,NOT$ind,"} +
(",EQ1$mean12,")",NOT$env,"_{1",NOT$time,NOT$ind,"}",NOT$env,"_{2",NOT$time,NOT$ind,"} +
",NOT$error,"_{",NOT$time,NOT$ind,"}$$")),
displayRCode("
LMM1 <- lme4::lmer(Phenotype ~ 1 + X1*X2 (1 + X1 + X2|Individual)
+ (0 + X2|Individual), data = sampled_data)"),
p("And we will compare those results with the full model:"),
p(paste0("$$",
NOT$trait.1,"_{",NOT$time,NOT$ind,"} =
",EQ1$mean0," +
",EQ1$dev0," +
(",EQ1$mean1,"+",EQ1$dev1,")",NOT$env,"_{1",NOT$time,NOT$ind,"} +
(",EQ1$mean2,"+",EQ1$dev2,")",NOT$env,"_{2",NOT$time,NOT$ind,"} +
(",EQ1$mean12,"+",EQ1$dev12,")",NOT$env,"_{1",NOT$time,NOT$ind,"}",NOT$env,"_{2",NOT$time,NOT$ind,"} +
",NOT$error,"_{",NOT$time,NOT$ind,"}$$")),
displayRCode("LMM2 <- lme4::lmer(Phenotype ~ 1 + X1*X2 (1+X1*X2|Individual), data = sampled_data)"),
actionButton("Mod8Step2_Run", label = Modules_VAR$Run$label, icon = Modules_VAR$Run$icon, class = "runButton"),
runningIndicator(),
sim_msg(),
p("Statistical output:"),
uiOutput("Mod8Step2_summary_table"),
p("As usual, omission of a key parameter causes variation to be placed elsewhere in the equation,
in this case mostly in the residual."),
p(paste0("A 3-d plot of the population mean (below) provides you with a visual orientation
to the average phenotype across the environmental space created by the two $",NOT$env,"$ variables.
We have also plotted the values different individuals will express at the corners of
the graph where they would experience an extreme in both $",NOT$env,"$ distributions.")),
p(plotlyOutput("Mod8Step2_3D")),
p("Run this simulation several times with different values for the interaction term
and the covariance terms. Where does the interaction term create the most phenotypic
variance and how do covariances affect this?"),
p(HTML("<b>Conclusion:</b> The effect of interactions between environments on phenotypes
has three important characteristics. First, it seems biologically likely given
the complexity of the environment and it in fact exists in many traits.
Second, these effects can be modelled using mixed models, including the random effects
of individual on the response to each environment and in theory on the interaction term itself.
The third characteristic is that these models are exceedingly complex. At this point, you
don't have in your mental pocket the full phenotypic equation. There are many more
complexities to explore, but you now have all the basic tools.
The SQuID platform can now be explored so you can assess what sampling
regimes and experimental designs will allow you to effectively
measure the attributes of most interest.")),
div(class = "line"),
actionLink("Mod8Step2GotoStep1", label = "<< Previous Step (1)", class= "linkToModuleSteps"),
) |
library(CHAID)
library(rsample)
library(plyr)
library(dplyr)
attrition %>% select_if(is.factor) %>% ncol
attrition %>% select_if(is.numeric) %>% ncol
attrition %>% select_if(function(col) length(unique(col)) <= 5 & is.integer(col)) %>% head
attrition %>% select_if(function(col) length(unique(col)) <= 10 & is.integer(col)) %>% head
income = floor(runif(1000, 50, 100))
gender = sample(c('M','F'), size=1000, replace=T, prob=c(.6,.4))
married = sample(c('Married','Single', 'Divorce'), size=1000, replace=T, prob=c(.3,.4,.3))
buy = sample(c('Buy','DontBuy'), size=1000, replace=T, prob=c(.6,.4))
df = data.frame(income, gender, married, buy)
head(df)
str(df)
fcols = c('income','gender', 'married', 'buy')
df[fcols] = lapply(df[fcols], factor)
lapply(df,class)
table(df$gender, df$buy)
chaidmodel_1 = chaid(buy ~ gender + married + income, data=df)
print(chaidmodel_1)
plot(chaidmodel_1)
ctrl_1 = chaid_control(minsplit = 10, minprob = 0.01)
chaidmodel_2 = chaid(buy ~ incomee + gender + married, data=df, control = ctrl_1)
plot(chaidmodel_2)
print(chaidmodel_2)
chaidmodel = chaid(buy ~ ., data=df)
?chaid
require(rsample)
data(attrition)
str(attrition)
names(attrition) |
ancestral.pml <- function(object, type = "marginal", return = "prob") {
call <- match.call()
pt <- match.arg(type, c("marginal", "joint", "ml", "bayes"))
tree <- object$tree
INV <- object$INV
inv <- object$inv
data <- getCols(object$data, tree$tip.label)
data_type <- attr(data, "type")
if (is.null(attr(tree, "order")) || attr(tree, "order") != "postorder") {
tree <- reorder(tree, "postorder")
}
nTips <- length(tree$tip.label)
node <- tree$edge[, 1]
edge <- tree$edge[, 2]
m <- length(edge) + 1
w <- object$w
g <- object$g
l <- length(w)
nr <- attr(data, "nr")
nc <- attr(data, "nc")
dat <- vector(mode = "list", length = m * l)
result <- vector(mode = "list", length = m)
dim(dat) <- c(l, m)
x <- attributes(data)
label <- as.character(1:m)
nam <- tree$tip.label
label[seq_along(nam)] <- nam
x[["names"]] <- label
tmp <- length(data)
if (return != "phyDat") {
result <- new2old.phyDat(data)
} else {
result[1:nTips] <- data
}
eig <- object$eig
bf <- object$bf
el <- tree$edge.length
P <- getP(el, eig, g)
nr <- as.integer(attr(data, "nr"))
nc <- as.integer(attr(data, "nc"))
node <- as.integer(node - min(node))
edge <- as.integer(edge - 1)
nTips <- as.integer(length(tree$tip.label))
mNodes <- as.integer(max(node) + 1)
contrast <- attr(data, "contrast")
eps <- 1.0e-5
ind1 <- which(apply(contrast, 1, function(x) sum(x > eps)) == 1L)
ind2 <- which(contrast[ind1, ] > eps, arr.ind = TRUE)
pos <- ind2[match(seq_len(ncol(contrast)), ind2[, 2]), 1]
nco <- as.integer(dim(contrast)[1])
for (i in 1:l) dat[i, (nTips + 1):m] <- .Call('LogLik2', data, P[i, ], nr, nc,
node, edge, nTips, mNodes, contrast, nco)
parent <- tree$edge[, 1]
child <- tree$edge[, 2]
nTips <- min(parent) - 1
for (i in 1:l) {
for (j in (m - 1):1) {
if (child[j] > nTips) {
tmp2 <- (dat[[i, parent[j]]] / (dat[[i, child[j]]] %*% P[[i, j]]))
dat[[i, child[j]]] <- (tmp2 %*% P[[i, j]]) * dat[[i, child[j]]]
}
}
}
for (j in unique(parent)) {
tmp <- matrix(0, nr, nc)
if (inv > 0) tmp <- as.matrix(INV) * inv
for (i in 1:l) {
tmp <- tmp + w[i] * dat[[i, j]]
}
if ((pt == "bayes") || (pt == "marginal")) tmp <- tmp * rep(bf, each = nr)
tmp <- tmp / rowSums(tmp)
if (return == "phyDat") {
if (data_type == "DNA") {
tmp <- p2dna(tmp)
tmp <- fitchCoding2ambiguous(tmp)
}
else {
tmp <- pos[max.col(tmp)]
}
}
result[[j]] <- tmp
}
attributes(result) <- x
attr(result, "call") <- call
result
}
ancestral2phyDat <- function(x) {
eps <- 1.0e-5
contr <- attr(x, "contrast")
ind1 <- which(apply(contr, 1, function(x) sum(x > eps)) == 1L)
ind2 <- which(contr[ind1, ] > eps, arr.ind = TRUE)
pos <- ind2[match(seq_len(ncol(contr)), ind2[, 2]), 1]
res <- lapply(x, function(x, pos) pos[max.col(x)], pos)
attributes(res) <- attributes(x)
return(res)
}
fitchCoding2ambiguous <- function(x, type = "DNA") {
y <- c(
1L, 2L, 4L, 8L, 8L, 3L, 5L, 9L, 6L, 10L, 12L, 7L, 11L, 13L,
14L, 15L, 15L, 15L
)
fmatch(x, y)
}
fitchCoding2ambiguous2 <- function(x, type = "DNA") {
y <- c(1L, 2L, 4L, 8L, 8L, 3L, 5L, 9L, 6L, 10L, 12L, 7L, 11L, 13L, 14L, 15L)
dna <- c(
"a", "c", "g", "t", "t", "m", "r", "w", "s", "y", "k", "v", "h",
"d", "b", "n"
)
rna <- c(
"a", "c", "g", "u", "u", "m", "r", "w", "s", "y", "k", "v", "h",
"d", "b", "n"
)
res <- switch(type,
"DNA" = dna[fmatch(x, y)],
"RNA" = rna[fmatch(x, y)]
)
res
}
ancestral.pars <- function(tree, data, type = c("MPR", "ACCTRAN"), cost = NULL,
return = "prob") {
call <- match.call()
type <- match.arg(type)
if (type == "ACCTRAN") {
res <- ptree(tree, data, return = return)
attr(res, "call") <- call
}
if (type == "MPR") {
res <- mpr(tree, data, cost = cost, return = return)
attr(res, "call") <- call
}
res
}
pace <- ancestral.pars
mpr.help <- function(tree, data, cost = NULL) {
tree <- reorder(tree, "postorder")
if (!inherits(data, "phyDat")) {
stop("data must be of class phyDat")
}
levels <- attr(data, "levels")
l <- length(levels)
if (is.null(cost)) {
cost <- matrix(1, l, l)
cost <- cost - diag(l)
}
weight <- attr(data, "weight")
p <- attr(data, "nr")
kl <- TRUE
i <- 1
dat <- prepareDataSankoff(data)
for (i in seq_along(dat)) storage.mode(dat[[i]]) <- "double"
tmp <- fit.sankoff(tree, dat, cost, returnData = "data")
p0 <- tmp[[1]]
datf <- tmp[[2]]
datp <- pnodes(tree, datf, cost)
nr <- attr(data, "nr")
nc <- attr(data, "nc")
node <- tree$edge[, 1]
edge <- tree$edge[, 2]
node <- as.integer(node - 1L)
edge <- as.integer(edge - 1L)
res <- .Call('sankoffMPR', datf, datp, as.numeric(cost), as.integer(nr),
as.integer(nc), node, edge)
root <- getRoot(tree)
res[[root]] <- datf[[root]]
res
}
mpr <- function(tree, data, cost = NULL, return = "prob") {
data <- subset(data, tree$tip.label)
att <- attributes(data)
type <- att$type
nr <- att$nr
nc <- att$nc
res <- mpr.help(tree, data, cost)
l <- length(tree$tip.label)
m <- length(res)
label <- as.character(1:m)
nam <- tree$tip.label
label[seq_along(nam)] <- nam
att[["names"]] <- label
ntips <- length(tree$tip.label)
contrast <- att$contrast
eps <- 5e-6
rm <- apply(res[[ntips + 1]], 1, min)
RM <- matrix(rm, nr, nc) + eps
fun <- function(X) {
rs <- rowSums(X)
X / rs
}
for (i in 1:ntips) res[[i]] <- contrast[data[[i]], , drop = FALSE]
for (i in (ntips + 1):m) res[[i]][] <- as.numeric(res[[i]] < RM)
if (return == "prob") {
if (return == "prob") res <- lapply(res, fun)
}
attributes(res) <- att
fun2 <- function(x) {
x <- p2dna(x)
fitchCoding2ambiguous(x)
}
if (return != "prob") {
if (type == "DNA") {
res <- lapply(res, fun2)
attributes(res) <- att
}
else {
res <- ancestral2phyDat(res)
}
res[1:ntips] <- data
}
res
}
plotAnc <- function(tree, data, i = 1, site.pattern = TRUE, col = NULL,
cex.pie = par("cex"), pos = "bottomright", ...) {
y <- subset(data, select = i, site.pattern = site.pattern)
CEX <- cex.pie
xrad <- CEX * diff(par("usr")[1:2]) / 50
levels <- attr(data, "levels")
nc <- attr(data, "nc")
y <- matrix(unlist(y[]), ncol = nc, byrow = TRUE)
l <- dim(y)[1]
dat <- matrix(0, l, nc)
for (i in 1:l) dat[i, ] <- y[[i]]
plot(tree, label.offset = 1.1 * xrad, plot = FALSE, ...)
lastPP <- get("last_plot.phylo", envir = .PlotPhyloEnv)
XX <- lastPP$xx
YY <- lastPP$yy
xrad <- CEX * diff(lastPP$x.lim * 1.1) / 50
par(new = TRUE)
plot(tree, label.offset = 1.1 * xrad, plot = TRUE, ...)
if (is.null(col)) col <- hcl.colors(nc)
if (length(col) != nc) {
warning("Length of color vector differs from number of levels!")
}
BOTHlabels(
pie = y, XX = XX, YY = YY, adj = c(0.5, 0.5),
frame = "rect", pch = NULL, sel = seq_along(XX), thermo = NULL,
piecol = col, col = "black", bg = "lightblue", horiz = FALSE,
width = NULL, height = NULL, cex = cex.pie
)
if (!is.null(pos)) legend(pos, legend=levels, text.col = col)
}
acctran2 <- function(tree, data) {
if(!is.binary(tree)) tree <- multi2di(tree)
tree <- reorder(tree, "postorder")
edge <- tree$edge
data <- subset(data, tree$tip.label)
f <- init_fitch(data, FALSE, FALSE, m=2L)
psc_node <- f$pscore_node(edge)
tmp <- reorder(tree)$edge
tmp <- tmp[tmp[,2]>Ntip(tree), ,drop=FALSE]
f$traverse(edge)
if(length(tmp)>0)f$acctran_traverse(tmp)
psc <- f$pscore_acctran(edge)
el <- psc
parent <- unique(edge[,1])
desc <- Descendants(tree, parent, "children")
for(i in seq_along(parent)){
x <- psc_node[parent[i]] -sum(psc[desc[[i]]])
if(x>0) el[desc[[i]] ] <- el[desc[[i]] ] + x/length(desc[[i]])
}
tree$edge.length <- el[edge[,2]]
tree
}
acctran <- function(tree, data) {
if (inherits(tree, "multiPhylo")) {
compress <- FALSE
if (!is.null(attr(tree, "TipLabel"))){
compress <- TRUE
tree <- .uncompressTipLabel(tree)
}
res <- lapply(tree, acctran2, data)
class(res) <- "multiPhylo"
if (compress) res <- .compressTipLabel(res)
return(res)
}
acctran2(tree, data)
}
ptree <- function(tree, data, return = "prob") {
tree <- reorder(tree, "postorder")
edge <- tree$edge
att <- attributes(data)
nr <- att$nr
type <- att$type
m <- max(edge)
nTip <- Ntip(tree)
f <- init_fitch(data, FALSE, FALSE, m=2L)
f$traverse(edge)
tmp <- reorder(tree)$edge
tmp <- tmp[tmp[,2]>Ntip(tree),]
if(length(tmp)>0)f$acctran_traverse(tmp)
res <- vector("list", m)
att$names <- c(att$names, as.character((nTip+1):m))
if(return == "phyDat"){
res[1:nTip] <- data[1:nTip]
if(type=="DNA"){
for(i in (nTip+1):m)
res[[i]] <- f$getAnc(i)[1:nr]
}
}
if(return == "phyDat"){
res[1:nTip] <- data[1:nTip]
if(type=="DNA"){
for(i in (nTip+1):m)
res[[i]] <- f$getAncAmb(i)[1:nr]
}
else stop("This is only for nucleotide sequences supported so far")
}
else {
fun <- function(X) {
rs <- rowSums(X)
X / rs
}
contrast <- att$contrast
for(i in seq_len(nTip)) res[[i]] <- contrast[data[[i]], , drop=FALSE]
for(i in (nTip+1):m) res[[i]] <- f$getAnc(i)[1:nr, , drop=FALSE]
res <- lapply(res, fun)
}
attributes(res) <- att
res
} |
rearrr_fn_ <- function(data, origin_fn, check_fn, allowed_types, force_df, min_dims){
stop("'rearrr_fn' should not be called. Is used for documentation only.")
} |
new_ml_model_bisecting_kmeans <- function(pipeline_model, formula, dataset,
features_col) {
m <- new_ml_model_clustering(
pipeline_model = pipeline_model,
formula = formula,
dataset = dataset,
features_col = features_col,
class = "ml_model_bisecting_kmeans"
)
model <- m$model
m$summary <- model$summary
m$centers <- model$cluster_centers() %>%
do.call(rbind, .) %>%
as.data.frame() %>%
rlang::set_names(m$feature_names)
m$cost <- suppressWarnings(
possibly_null(
~ pipeline_model %>%
ml_stage(1) %>%
ml_transform(dataset) %>%
model$compute_cost()
)()
)
m
}
print.ml_model_bisecting_kmeans <- function(x, ...) {
preamble <- sprintf(
"K-means clustering with %s %s",
nrow(x$centers),
if (nrow(x$centers) == 1) "cluster" else "clusters"
)
cat(preamble, sep = "\n")
print_newline()
ml_model_print_centers(x)
print_newline()
cat(
"Within Set Sum of Squared Errors = ",
if (is.null(x$cost)) "not computed." else x$cost
)
} |
plot.scdf <- function(...) {
plotSC(...)
}
plotSC <- function(data, dvar, pvar, mvar,
ylim = NULL, xlim = NULL, xinc = 1,
lines = NULL, marks = NULL,
phase.names = NULL, xlab = NULL, ylab = NULL,
main = "", case.names = NULL,
style = getOption("scan.plot.style"),
...) {
dots <- list(...)
op <- par(no.readonly = TRUE)
on.exit(par(op))
if (missing(dvar)) dvar <- scdf_attr(data, .opt$dv) else scdf_attr(data, .opt$dv) <- dvar
if (missing(pvar)) pvar <- scdf_attr(data, .opt$phase) else scdf_attr(data, .opt$phase) <- pvar
if (missing(mvar)) mvar <- scdf_attr(data, .opt$mt) else scdf_attr(data, .opt$mt) <- mvar
data_list <- .prepare_scdf(data)
N <- length(data_list)
if (N > 1) par(mfrow = c(N, 1))
if (is.list(style)) {
ref.style <- "default"
if ("style" %in% names(style)) ref.style <- style$style
style <- c(style, style_plotSC(ref.style))
style <- style[unique(names(style))]
}
if (is.character(style)) style <- style_plotSC(style)
sty_names <- c("fill", "fill.bg", "frame", "grid", "lwd", "pch", "text.ABlag", "type")
if (any(names(dots) %in% sty_names)) {
stop("Using style parameters directly as arguments (like 'fill') is deprectated. ",
"Please use the 'stlye' argument to provide these parameters. ",
"E.g., style = list(fill = 'blue', pch = 19)")
}
annotations <- style$annotations
if (is.na(style$frame)) style$bty <- "n"
par("bg" = style$col.bg)
par("col" = style$col)
par("family" = style$font)
par("cex" = style$cex)
par("cex.lab" = style$cex.lab)
par("cex.axis" = style$cex.axis)
par("las" = style$las)
par("bty" = style$bty)
par("col.lab" = style$col.text)
par("col.axis" = style$col.text)
if (isTRUE(style$frame == "")) style$frame <- NA
if (isTRUE(style$grid == "")) style$grid <- FALSE
if (isTRUE(style$fill.bg == "")) style$fill.bg <- FALSE
if (identical(class(marks), c("sc_outlier")))
marks <- list(positions = marks$dropped.mt)
if (!is.null(case.names)) names(data_list) <- case.names
case.names <- names(data_list)
if (is.null(xlab)) xlab <- mvar
if (is.null(ylab)) ylab <- dvar
if (is.null(xlab)) xlab <- "Measurement time"
if (is.null(ylab)) ylab <- "Score"
if (xlab == "mt") xlab <- "Measurement time"
lines <- .prepare_arg_lines(lines)
values.tmp <- unlist(lapply(data_list, function(x) x[, dvar]))
mt.tmp <- unlist(lapply(data_list, function(x) x[, mvar]))
if (is.null(ylim))
ylim <- c(min(values.tmp, na.rm = TRUE), max(values.tmp, na.rm = TRUE))
if (is.null(xlim))
xlim <- c(min(mt.tmp, na.rm = TRUE), max(mt.tmp, na.rm = TRUE))
par(mgp = c(2, 1, 0))
for(case in 1:N) {
data <- data_list[[case]]
design <- .phasestructure(data, pvar)
y.lim <- ylim
if (is.na(ylim[2])) y.lim[2] <- max(data[, dvar])
if (is.na(ylim[1])) y.lim[1] <- min(data[, dvar])
if (N == 1) {
if (main != "") par(mai = c(style$mai[1:2], style$mai[3] + 0.4, style$mai[4]))
if (main == "") par(mai = style$mai)
plot(
data[[mvar]], data[[dvar]], type = "n",
xlim = xlim, ylim = y.lim, ann = FALSE,
yaxt = "n",
xaxt = "n", ...
)
xticks_pos <- seq(xlim[1], xlim[2], 1)
axis(side = 1, at = xticks_pos, labels = FALSE)
text(
x = seq(xlim[1], xlim[2], xinc),
y = par("usr")[3],
cex = style$cex.axis,
labels = seq(xlim[1], xlim[2], xinc),
srt = 0,
pos = 1,
offset = style$cex.axis,
xpd = TRUE
)
yticks_pos <- axTicks(2, usr = c(y.lim[1], ylim[2]))
axis(side = 2, at = yticks_pos, labels = NA)
text(
x = par("usr")[1],
y = yticks_pos,
labels = yticks_pos,
offset = style$cex.axis,
srt = 0,
pos = 2,
cex = style$cex.axis,
xpd = TRUE
)
if (style$ylab.orientation == 0)
mtext(text = ylab, side = 2, line = 2, las = 0, cex = style$cex.lab)
if (style$ylab.orientation == 1) {
mtext(
text = ylab, side = 2, line = 2, las = 1, at = max(y.lim),
cex = style$cex.lab
)
}
mtext(text = xlab, side = 1, line = 2, las = 0, cex = style$cex.lab)
}
if (N > 1 && case != N) {
if (case == 1) {
if (main != "") {
par(mai = c(style$mai[1] * 2 / 6, style$mai[2], style$mai[3] * 3, style$mai[4]))
}
if (main == "") {
par(mai = c(style$mai[1] * 2 / 6, style$mai[2], style$mai[3] * 3, style$mai[4]))
}
} else {
par(mai = c(style$mai[1] * 4 / 6, style$mai[2], style$mai[3] * 2, style$mai[4]))
}
plot(
data[[mvar]], data[[dvar]], xaxt = "n", yaxt = "n", type = "n",
xlim = xlim, ylim = y.lim, ann = FALSE, ...
)
yticks_pos <- axTicks(2, usr = c(y.lim[1], ylim[2]))
axis(side = 2, at = yticks_pos, labels = NA)
text(
x = par("usr")[1],
y = yticks_pos,
labels = yticks_pos,
offset = style$cex.axis,
srt = 0,
pos = 2,
cex = style$cex.axis,
xpd = TRUE
)
if (style$ylab.orientation == 0)
mtext(ylab, side = 2, line = 2, las = 0, cex = style$cex.lab)
if (style$ylab.orientation == 1)
mtext(ylab, side = 2, line = 2, las = 1, at = max(y.lim), cex = style$cex.lab)
}
if (N > 1 && case == N) {
par(mai = style$mai)
plot(
data[[mvar]], data[[dvar]], type = "n",
xlim = xlim, ylim = y.lim, ann = FALSE,
xaxp = c(xlim[1], xlim[2], xlim[2] - xlim[1]),
yaxt = "n", xaxt = "n",
...
)
xticks_pos <- seq(xlim[1], xlim[2], 1)
axis(side = 1, at = xticks_pos, labels = FALSE)
text(
x = seq(xlim[1], xlim[2], xinc),
y = par("usr")[3],
cex = style$cex.axis,
labels = seq(xlim[1], xlim[2], xinc),
srt = 0,
pos = 1,
offset = style$cex.axis,
xpd = TRUE
)
yticks_pos <- axTicks(2, usr = c(y.lim[1], ylim[2]))
axis(side = 2, at = yticks_pos, labels = NA)
text(
x = par("usr")[1],
y = yticks_pos,
labels = yticks_pos,
offset = style$cex.axis,
srt = 0,
pos = 2,
cex = style$cex.axis, xpd = TRUE
)
if (style$ylab.orientation == 0)
mtext(ylab, side = 2, line = 2, las = 0, cex = style$cex.lab)
if (style$ylab.orientation == 1)
mtext(ylab, side = 2, line = 2, las = 1, at = max(y.lim), cex = style$cex.lab)
mtext(xlab, side = 1, line = 2, las = 0, cex = style$cex.lab)
}
usr <- par("usr")
if(class(style$fill.bg) == "character") {
style$col.fill.bg <- style$fill.bg
style$fill.bg <- TRUE
}
if (isTRUE(style$fill.bg)){
type_phases <- unique(design$values)
col <- rep(style$col.fill.bg, length = length(type_phases))
for(i in seq_along(design$values)) {
x <- data[design$start[i]:design$stop[i], mvar]
y <- data[design$start[i]:design$stop[i], dvar]
xmin <- min(x, na.rm = TRUE)
xmax <- max(x, na.rm = TRUE) + 0.5
if (i == length(design$values)) xmax <- usr[2]
if (i > 1) xmin <- xmin - 0.5
if (i == 1) xmin <- usr[1]
.col <- col[which(type_phases == design$values[i])[1]]
rect(xmin, usr[3], xmax, usr[4], col = .col, border = NA)
}
}
if(class(style$grid) == "character") {
style$col.grid <- style$grid
style$grid <- TRUE
}
if (isTRUE(style$grid))
grid(NULL, NULL, col = style$col.grid, lty = style$lty.grid, lwd = style$lwd.grid)
if (!is.na(style$frame))
rect(usr[1],usr[3],usr[2],usr[4], col = NA, border = style$frame)
if (is.na(style$frame) && isTRUE(style$fill.bg))
rect(usr[1],usr[3],usr[2],usr[4], col = NA, border = style$col.fill.bg)
if (is.na(style$frame) && !isTRUE(style$fill.bg))
rect(usr[1],usr[3],usr[2],usr[4], col = NA, border = par("bg"))
if (style$fill == "" || is.na(style$fill)) style$fill <- FALSE
if(class(style$fill) == "character") {
style$col.fill <- style$fill
style$fill <- TRUE
}
if (isTRUE(style$fill)) {
for(i in 1:length(design$values)) {
x <- data[design$start[i]:design$stop[i], mvar]
y <- data[design$start[i]:design$stop[i], dvar]
for(i in 1:length(x)) {
x_values <- c(x[i], x[i+1], x[i+1], x[i])
y_values <- c(y.lim[1], y.lim[1], y[i+1], y[i])
polygon(x_values, y_values, col = style$col.fill, border = NA)
}
}
}
for(i in 1:length(design$values)) {
x <- data[design$start[i]:design$stop[i], mvar]
y <- data[design$start[i]:design$stop[i], dvar]
if (style$col.lines != "") {
lines(
x, y, type = "l", pch = style$pch, lty = style$lty, lwd = style$lwd,
col = style$col.lines, ...
)
}
if (style$col.dots != "") {
lines(
x, y, type = "p", pch = style$pch, lty = style$lty, lwd = style$lwd,
col = style$col.dots, ...
)
}
}
if (case == 1) title(main)
if (!is.null(marks)) {
marks.cex <- 1
marks.col <- "red"
marks.pch <- style$pch
if (any(names(marks) == "positions")) {
marks.pos <- marks[[which(names(marks) == "positions")]]
} else {stop("Positions of marks must be defined.")}
if (any(names(marks) == "cex")) {
marks.cex <- marks[[which(names(marks) == "cex")]]
}
if (any(names(marks) == "col")) {
marks.col <- marks[[which(names(marks) == "col")]]
}
if (any(names(marks) == "pch")) {
marks.pch <- marks[[which(names(marks) == "pch")]]
}
if (class(marks.pos) == "numeric") {
mks <- marks.pos
} else {
mks <- marks.pos[[case]]
}
marks.x <- data[data[,mvar] %in% mks,mvar]
marks.y <- data[data[,mvar] %in% mks,dvar]
points(x = marks.x, y = marks.y, pch = marks.pch, cex = marks.cex, col = marks.col)
}
if (!is.null(annotations)) {
annotations.cex <- 1
annotations.round <- 1
annotations.col <- "black"
annotations.pos <- 3
annotations.offset <- 0.5
if (any(names(annotations) == "cex")) {
annotations.cex <- annotations[[which(names(annotations) == "cex")]]
}
if (any(names(annotations) == "col")) {
annotations.col <- annotations[[which(names(annotations) == "col")]]
}
if (any(names(annotations) == "round")) {
annotations.round <- annotations[[which(names(annotations) == "round")]]
}
if (any(names(annotations) == "pos")) {
annotations.pos <- annotations[[which(names(annotations) == "pos")]]
}
if (any(names(annotations) == "offset")) {
annotations.offset <- annotations[[which(names(annotations) == "offset")]]
}
annotations.label <- round(data[,dvar], annotations.round)
text(
x = data[,mvar],
y = data[,dvar],
label = annotations.label,
col = annotations.col,
pos = annotations.pos,
offset = annotations.offset,
cex = annotations.cex,
...
)
}
if (!is.null(lines)) {
for(i_lines in seq_along(lines)) {
line <- lines[[i_lines]]
if (is.null(line[["lty"]])) line[["lty"]] <- "dashed"
if (is.null(line[["lwd"]])) line[["lwd"]] <- 2
if (is.null(line[["col"]])) line[["col"]] <- "black"
lty.line <- line[["lty"]]
lwd.line <- line[["lwd"]]
col.line <- line[["col"]]
if (line[["type"]] == "trend") {
for(i in 1:length(design$values)) {
x <- data[design$start[i]:design$stop[i], mvar]
y <- data[design$start[i]:design$stop[i], dvar]
reg <- lm(y~x)
lines(
x = c(min(x), max(x)),
y = c(
reg$coefficients[1] + min(x) * reg$coefficients[2],
reg$coefficients[1] + max(x) * reg$coefficients[2]
),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
}
if (line[["type"]] == "median") {
for(i in 1:length(design$values)) {
x <- data[design$start[i]:design$stop[i], mvar]
y <- data[design$start[i]:design$stop[i], dvar]
lines(
x = c(min(x), max(x)),
y = c(median(y, na.rm = TRUE), median(y, na.rm = TRUE)),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
}
if (line[["type"]] == "mean") {
if (is.null(line[["trim"]])) line[["trim"]] <- 0.1
lines.par <- line[["trim"]]
for(i in 1:length(design$values)) {
x <- data[design$start[i]:design$stop[i],mvar]
y <- data[design$start[i]:design$stop[i],dvar]
lines(
x = c(min(x), max(x)),
y = c(
mean(y, trim = lines.par, na.rm = TRUE),
mean(y, trim = lines.par, na.rm = TRUE)
),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
}
if (line[["type"]] == "trendA") {
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
reg <- lm(y~x)
lines(
x = c(min(x), maxMT),
y = c(
reg$coefficients[1] + min(x) * reg$coefficients[2],
reg$coefficients[1] + maxMT * reg$coefficients[2]
),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "trendA_bisplit") {
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
md1 <- c(median(y[1:floor(length(y)/2)], na.rm = FALSE),
median(x[1:floor(length(x)/2)], na.rm = FALSE))
md2 <- c(median(y[ceiling(length(y)/2+1):length(y)], na.rm = FALSE),
median(x[ceiling(length(x)/2+1):length(x)], na.rm = FALSE))
md <- rbind(md1, md2)
reg <- lm(md[,1]~md[,2])
lines(
x = c(min(x), maxMT),
y = c(
reg$coefficients[1] + min(x) * reg$coefficients[2],
reg$coefficients[1] + maxMT * reg$coefficients[2]
),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "trendA_trisplit") {
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
md1 <- c(
median(y[1:floor(length(y) / 3)], na.rm = FALSE),
median(x[1:floor(length(x) / 3)], na.rm = FALSE)
)
md2 <- c(
median(y[ceiling(length(y) / 3 * 2 + 1):length(y)], na.rm = FALSE),
median(x[ceiling(length(x) / 3 * 2 + 1):length(x)], na.rm = FALSE)
)
md <- rbind(md1, md2)
reg <- lm(md[,1] ~ md[,2])
lines(
x = c(min(x), maxMT),
y = c(
reg$coefficients[1] + min(x) * reg$coefficients[2],
reg$coefficients[1] + maxMT * reg$coefficients[2]
),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "loreg") {
if (is.null(line[["f"]])) line[["f"]] <- 0.5
lines.par <- line[["f"]]
reg <- lowess(data[,dvar] ~ data[,mvar], f = lines.par)
lines(reg, lty = lty.line, col = col.line, lwd = lwd.line)
}
if (line[["type"]] %in% c("maxA", "pnd")) {
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
lines(
x = c(min(x), maxMT),
y = c(max(y), max(y)),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "minA") {
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
lines(
x = c(min(x), maxMT),
y = c(min(y), min(y)),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "medianA") {
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
lines(
x = c(min(x), maxMT),
y = c(median(y, na.rm = TRUE), median(y, na.rm = TRUE)),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "meanA") {
if (is.null(line[["trim"]])) line[["trim"]] <- 0.1
lines.par <- line[["trim"]]
x <- data[design$start[1]:design$stop[1],mvar]
y <- data[design$start[1]:design$stop[1],dvar]
maxMT <- max(data[,mvar])
lines(
x = c(min(x), maxMT),
y = c(
mean(y, trim = lines.par, na.rm = TRUE),
mean(y, trim = lines.par, na.rm = TRUE)
),
lty = lty.line,
col = col.line,
lwd = lwd.line
)
}
if (line[["type"]] == "plm") {
pr <- plm(data_list[case])
y <- fitted(pr$full.model)
lines(data[[mvar]], y, lty = lty.line, col = col.line, lwd = lwd.line)
}
if (line[["type"]] == "plm.ar") {
if (is.null(line[["ar"]])) line[["ar"]] <-2
lines.par <- line[["ar"]]
pr <- plm(data_list[case], AR = lines.par)
y <- fitted(pr$full.model)
lines(data[[mvar]], y, lty = lty.line, col = col.line, lwd = lwd.line)
}
if (line[["type"]] == "movingMean") {
if (is.null(line[["lag"]])) line[["lag"]] <- 1
lines.par <- line[["lag"]]
y <- .moving_average(data[, dvar],lines.par, mean)
lines(data[, mvar], y, lty = lty.line, col = col.line, lwd = lwd.line)
}
if (line[["type"]] == "movingMedian") {
if (is.null(line[["lag"]])) line[["lag"]] <- 1
lines.par <- line[["lag"]]
y <- .moving_average(data[, dvar],lines.par, median)
lines(data[, mvar], y, lty = lty.line, col = col.line, lwd = lwd.line)
}
}
}
if (is.null(phase.names)) {
case_phase_names <- design$values
} else {
case_phase_names <- phase.names
}
for(i in 1:length(design$values)) {
mtext(
text = case_phase_names[i],
side = 3,
at = (data[design$stop[i], mvar] - data[design$start[i], mvar]) / 2 +
data[design$start[i], mvar],
cex = style$cex.text, ...
)
}
if (is.null(style$text.ABlag)) {
for(i in 1:(length(design$values) - 1)) {
abline(
v = data[design$stop[i] + 1, mvar] - 0.5,
lty = style$lty.seperators,
lwd = style$lwd.seperators,
col = style$col.seperators
)
}
}
if (!is.null(style$text.ABlag)) {
for(i in 1:(length(design$values) - 1)) {
tex <- paste(unlist(strsplit(style$text.ABlag[i], "")), collapse = "\n")
text(
x = data[design$stop[i] + 1, mvar] - 0.5,
y = (y.lim[2] - y.lim[1]) / 2 + y.lim[1],
labels = tex,
cex = 0.8, ...)
}
}
if (length(case.names) == N) {
args <- c(
list(text = case.names[case]),
style$names,
cex = style$cex.text,
at = min(xlim)
)
args <- args[!duplicated(names(args))]
do.call(mtext, args)
}
}
}
.prepare_arg_lines <- function(lines) {
types <- list(
"mean",
"median",
"pnd",
"maxA",
"minA",
"medianA",
"trend",
"trendA",
"plm",
"plm.ar",
"trendA_bisplit",
"trendA_trisplit",
"loreg",
"movingMean",
"movingMedian"
)
if (class(lines) != "list") {
lines <- lapply(lines, function(x) x)
}
if(!all(sapply(lines, is.list))) {
lines <- list(lines)
}
if (length(lines) == 1) {
tmp_args <- unlist(lines[[1]])
id <- which(tmp_args %in% names(types))
if (length(id) > 1) {
warning("More than one line type detected in one list element!")
for (i in 2:length(id)) {
lines <- c(lines, list(lines[[1]][id[i]]))
lines[[1]] <- lines[[1]][-id[i]]
}
}
tmp_args <- names(lines[[1]])
id <- which(tmp_args %in% names(types))
if (length(id) > 1) {
warning("More than one line type detected in one list element!")
for (i in 2:length(id)) {
lines <- c(lines, list(lines[[1]][id[i]]))
lines[[1]] <- lines[[1]][-id[i]]
}
}
}
for (i in seq_along(lines)) {
arg_names <- names(lines[[i]])
if (is.null(arg_names)) {
names(lines[[i]]) <- rep("", length(lines[[i]]))
arg_names <- names(lines[[i]])
}
if (any(arg_names == "mean")) {
id <- which(arg_names == "mean")
lines[[i]] <- c(lines[[i]], trim = as.numeric(unname(lines[[i]][id])))
lines[[i]][id] <- names(lines[[i]])[id]
names(lines[[i]])[id] <- "type"
}
if (any(arg_names == "loreg")) {
id <- which(arg_names == "loreg")
lines[[i]] <- c(lines[[i]], f = as.numeric(unname(lines[[i]][id])))
lines[[i]][id] <- names(lines[[i]])[id]
names(lines[[i]])[id] <- "type"
}
if (any(arg_names == "movingMedian")) {
id <- which(arg_names == "movingMedian")
lines[[i]] <- c(lines[[i]], lag = as.numeric(unname(lines[[i]][id])))
lines[[i]][id] <- names(lines[[i]])[id]
names(lines[[i]])[id] <- "type"
}
if (any(arg_names == "movingMean")) {
id <- which(arg_names == "movingMean")
lines[[i]] <- c(lines[[i]], lag = as.numeric(unname(lines[[i]][id])))
lines[[i]][id] <- names(lines[[i]])[id]
names(lines[[i]])[id] <- "type"
}
if (any(arg_names == "plm.ar")) {
id <- which(arg_names == "plm.ar")
lines[[i]] <- c(lines[[i]], ar = as.numeric(unname(lines[[i]][id])))
lines[[i]][id] <- names(lines[[i]])[id]
names(lines[[i]])[id] <- "type"
}
id <- which(arg_names == "")
if(length(id) > 1) {
stop("undefined lines argument(s)")
}
if(length(id) == 1) {
names(lines[[i]])[id] <- "type"
}
}
lines
} |
context("test-wait")
test_that("wait(): both pipes work with a promise as an argument", {
value <- runif(1)
pr <- promises::promise_resolve(value)
with_magrittr_pipe <-
pr %>% wait(0.1)
expect_identical(hold(with_magrittr_pipe), value)
with_promises_pipe <-
pr %...>% wait(0.1)
expect_identical(hold(with_promises_pipe), value)
})
test_that("wait() also works with a non-promise object", {
value <- runif(1)
pr <- wait(value, 0.1)
expect_is(pr, "promise")
expect_identical(hold(pr), value)
})
test_that("timeout() works with a non promise argument", {
value <- runif(1)
pr <- timeout(x = value, delay = 0.1)
expect_is(pr, "promise")
expect_error(hold(pr), regexp = "0\\.1")
})
test_that("timeout() returns the value of the promise when it is fulfilled before the delay expires", {
value <- runif(1)
pr <- timeout(wait(x = value, delay = 0.1), delay = 10)
expect_is(pr, "promise")
expect_identical(hold(pr), value)
})
test_that("timeout() returns a promise which is rejected when the delay expires", {
value <- runif(1)
pr <- timeout(wait(x = value, delay = 10), delay = 0.1)
expect_is(pr, "promise")
expect_error(hold(pr), regexp = "0\\.1")
}) |
predict_ic50s <- function(
protein_sequence,
peptide_length,
mhcnuggets_options,
peptides_path = create_temp_peptides_path()
) {
if (peptide_length > 15) {
stop(
"'peptide_length' must be 15 at most. \n",
"Actual value: ", peptide_length
)
}
n <- nchar(protein_sequence) - peptide_length + 1
peptides <- rep(NA, n)
for (i in seq_len(n)) {
peptides[i] <- substr(protein_sequence, i, i + peptide_length - 1)
}
testthat::expect_true(all(nchar(peptides) == peptide_length))
mhcnuggetsr::predict_ic50(
peptides = peptides,
mhcnuggets_options = mhcnuggets_options
)
} |
"userfs" <-
function(s) {
if (missing(s)) return (13)
f.res <- s
f.res
} |
table_import <-
function(file,sep=F,format_corrector=F,...){
x<-data.frame(1:2)
if(sep==F){sep=c(";",",","\t",":"," ") }
for(i in 1:length(sep)){
x<-read.table(file,sep=sep[i],...)
i<-i+1
if(ncol(x)>1){break}
}
if(ncol(x)==1){cat("specify separator")}
if(format_corrector){x<-format_corrector(x)}
return(x)
} |
taf.bootstrap <- function(software=TRUE, data=TRUE, clean=TRUE, force=FALSE,
taf=NULL, quiet=FALSE)
{
if (isTRUE(taf))
software <- data <- clean <- force <- TRUE
if (!dir.exists("bootstrap")) {
warning(
"'bootstrap' folder does not exists.\n",
"Are you sure you are in the correct working directory?"
)
return(invisible(NULL))
}
if (!quiet)
msg("Bootstrap procedure running...")
if (force)
clean(c("bootstrap/software", "bootstrap/library", "bootstrap/data"))
out <- list(SOFTWARE.bib = FALSE, DATA.bib = FALSE)
if (dir.exists("bootstrap/initial/config"))
{
if (clean)
clean("config")
warning("'bootstrap/initial/config' is deprecated.\n",
"Use DATA.bib entry instead.")
cp("bootstrap/initial/config", "bootstrap")
}
if (software && file.exists("bootstrap/SOFTWARE.bib"))
{
out[["SOFTWARE.bib"]] <-
process.bibfile(
"software",
clean = clean,
quiet = quiet
)
}
if (data && file.exists("bootstrap/DATA.bib"))
{
out[["DATA.bib"]] <-
process.bibfile(
"data",
clean = clean,
quiet = quiet
)
}
rmdir(c("bootstrap/data", "bootstrap/library", "bootstrap/software"), recursive = TRUE)
rmdir("bootstrap/library:", recursive = TRUE)
if (!quiet)
msg("Bootstrap procedure done")
invisible(out)
} |
dist.condi <- function(ind1, ind2, cs, dat, type = NULL, rob = FALSE, R = 499) {
d <- sum( cs>0 )
x1 <- dat[, ind1]
x2 <- dat[, ind2 ]
if ( d == 0 ) {
mod <- energy::dcov.test(x1, x2, R = R)
dof <- 1
stat <- mod$statistic
pvalue <- log( mod$p.value )
} else{
z <- dat[, cs]
mod <- energy::pdcor.test(x1, x2, z, R)
stat <- mod$statistic
dof <- NCOL(z)
pvalue <- log( mod$p.value )
}
result <- c(stat, pvalue, dof)
names(result) <- c('test', 'logged.p-value', 'df')
result
} |
d_f_j1_a0_abq_g <-
function (a0, a2, b0, b2, q0, q2, r0, tij, t0, geno_a, geno_b,
geno_q)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e4^2
.e8 <- .e7 + 2 * (.e6 * .e3)
.e9 <- sqrt(.e8)
.e10 <- 2 * .e3
.e11 <- .e4 + .e9
.e12 <- .e11/.e10
.e13 <- r0 - .e12
.e14 <- tij - t0
.e15 <- .e10 + 2 * (.e9/.e13)
.e16 <- .e4/.e9
.e18 <- exp(2 * (.e9 * .e14))
.e20 <- .e15 * .e18 - .e10
.e21 <- .e3 * .e13
.e22 <- .e16 + 1
.e23 <- 2 * .e16
.e24 <- 0.5 * geno_a
.e25 <- .e22 * .e9
.e27 <- .e25/.e21 + .e23
.e28 <- .e27/.e13
.e31 <- .e15 * .e4 * .e14/.e9
.e32 <- 1 - .e24
.e33 <- .e6/.e9
.e34 <- .e28 + 2 * .e31
.e35 <- 2 * .e21
.e36 <- 0.5 * .e33
.e41 <- .e32 * .e4/.e9
.e42 <- .e12 + 2 * (.e9/.e20)
.e43 <- .e3/.e9
.e44 <- 0.5 * .e16
.e46 <- .e23 - 2 * (.e34 * .e18 * .e9/.e20)
.e47 <- .e8 * .e9
.e48 <- .e15 * .e6
.e49 <- .e15 * .e3
.e50 <- .e22/.e10
.e52 <- .e4/.e8
.e53 <- .e33 - .e11/.e3
.e54 <- .e36 - .e12
.e55 <- .e50 + .e46/.e20
.e56 <- .e22/.e9
.e57 <- .e21^2
.e59 <- .e41 + 1 - .e24
.e61 <- .e48 * .e14/.e9
.e63 <- .e49 * .e14/.e9
.e65 <- .e4 * .e6/.e47
.e66 <- 0.5 + .e44
.e67 <- 2 * .e43
.e72 <- .e59 * .e9/.e35 + .e41
.e76 <- .e66 * .e9/.e35 + .e44
.e82 <- 0.5 - 0.5 * (.e7/.e8)
.e83 <- 1 - (.e32 * .e7/.e8 + .e24)
.e85 <- 2 * ((.e54 * .e9/.e35 + .e36)/.e13)
.e86 <- 2 * ((.e43 + 1/(2 * .e13))/.e13)
.e87 <- 2 * ((1/.e13 + .e67)/.e13)
.e88 <- 2 + 2 * ((.e53 * .e9/.e35 + .e33)/.e13)
.e90 <- .e28 + .e22 * .e3 * .e9/.e57
.e93 <- (.e61 + 1 + .e85) * .e18 - 1
.e94 <- .e56 - .e52
.e99 <- .e31 + 2 * (.e76/.e13)
.e101 <- (.e88 + 2 * .e61) * .e18 - 2
.e102 <- .e4 * .e3
.e104 <- 2 * (.e72/.e13) + 2 * (.e32 * .e15 * .e4 * .e14/.e9)
.e105 <- .e86 + 2 * .e63
.e106 <- .e87 + 4 * .e63
.e107 <- .e34 * .e6
.e108 <- .e34 * .e3
.e118 <- .e41 - .e104 * .e18 * .e9/.e20
.e125 <- .e48/.e8
.e126 <- .e49/.e8
.e127 <- .e102/.e47
.e128 <- .e33 - .e101 * .e9/.e20
.e130 <- .e43 - .e105 * .e18 * .e9/.e20
.e132 <- 0.5 * .e56 - 0.5 * .e52
.e133 <- .e44 - .e99 * .e18 * .e9/.e20
.e134 <- .e36 - .e93 * .e9/.e20
.e135 <- 2 * (.e82/.e9)
.e136 <- 2 * (.e83/.e9)
.e137 <- 2 * .e65
.e138 <- 2 * (.e3 * .e9)
.e139 <- .e67 - .e106 * .e18 * .e9/.e20
c(a0 = -(0.5 * ((.e83/.e138 + (.e136 - (.e104 * .e46 + 2 *
((((.e90 * .e59/2 + (.e94 * .e32 * .e4 + 1 - .e24)/.e13)/.e3 +
.e136)/.e13 + (2 * (.e34 * .e32 * .e4) + 2 * (.e83 *
.e15 + 2 * (.e72 * .e4/.e13))) * .e14/.e9) * .e9 +
.e34 * .e118)) * .e18/.e20)/.e20 - (.e59/.e10 + 2 *
(.e118/.e20)) * .e55/.e42) * .e32/.e42)), a2 = -(0.5 *
(geno_a * (.e82/.e138 + (.e135 - (.e99 * .e46 + 2 * ((((.e90 *
.e66/2 + (.e132 * .e4 + 0.5)/.e13)/.e3 + .e135)/.e13 +
(.e34 * .e4 + 2 * (.e82 * .e15 + 2 * (.e76 * .e4/.e13))) *
.e14/.e9) * .e9 + .e34 * .e133)) * .e18/.e20)/.e20 -
.e55 * (.e66/.e10 + 2 * (.e133/.e20))/.e42) * .e32/.e42)),
b0 = 0.5 * ((((.e106 * .e46 + 2 * ((((.e28 + (.e25/.e57 -
4 * .e52) * .e3)/.e9 + (2 * .e56 - 2 * .e52)/.e13)/.e13 +
(2 * ((.e87 - 2 * .e126) * .e4) + 4 * .e108) * .e14/.e9) *
.e9 + .e34 * .e139)) * .e18/.e20 + 4 * .e127)/.e20 +
.e55 * (1/.e9 + 2 * (.e139/.e20))/.e42 + .e4/.e47) *
.e32 * (1 - 0.5 * geno_b) * .e5/.e42), b2 = 0.5 *
(geno_b * (((.e105 * .e46 + 2 * ((((.e90/2 - 2 *
(.e102/.e8))/.e9 + .e94/.e13)/.e13 + (2 * .e108 +
2 * ((.e86 - .e126) * .e4)) * .e14/.e9) * .e9 +
.e34 * .e130)) * .e18/.e20 + 2 * .e127)/.e20 +
.e55 * (1/(2 * .e9) + 2 * (.e130/.e20))/.e42 +
.e4/(2 * .e47)) * .e32 * .e5/.e42), q0 = 0.5 *
((((.e101 * .e46 + 2 * (((((.e27 * .e53/2 + .e94 *
.e6)/.e21 - (.e22 * (r0 - (.e53/2 + .e12)) *
.e9/.e57 + .e137))/.e13 + (2 * .e107 + 2 * ((.e88 -
.e125) * .e4)) * .e14/.e9) * .e9 + .e34 * .e128) *
.e18))/.e20 + .e137)/.e20 + .e55 * (.e53/.e10 +
2 * (.e128/.e20))/.e42 + (.e22/.e3 + .e65)/.e10) *
.e32 * (1 - 0.5 * geno_q)/.e42), q2 = 0.5 * (geno_q *
(((.e93 * .e46 + 2 * (((((.e27 * .e54/2 + .e132 *
.e6)/.e21 - (.e22 * (0.5 * .e13 - .e54/2) * .e9/.e57 +
.e65))/.e13 + (.e107 + 2 * ((1 + .e85 - 0.5 *
.e125) * .e4)) * .e14/.e9) * .e9 + .e34 * .e134) *
.e18))/.e20 + .e65)/.e20 + .e55 * (.e54/.e10 +
2 * (.e134/.e20))/.e42 + (.e50 + 0.5 * .e65)/.e10) *
.e32/.e42))
}
d_f_j1_a2_abq_g <-
function (a0, a2, b0, b2, q0, q2, r0, tij, t0, geno_a, geno_b,
geno_q)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e4^2
.e8 <- .e7 + 2 * (.e6 * .e3)
.e9 <- sqrt(.e8)
.e10 <- 2 * .e3
.e11 <- .e4 + .e9
.e12 <- .e11/.e10
.e13 <- r0 - .e12
.e14 <- tij - t0
.e15 <- .e10 + 2 * (.e9/.e13)
.e16 <- .e4/.e9
.e18 <- exp(2 * (.e9 * .e14))
.e20 <- .e15 * .e18 - .e10
.e21 <- .e3 * .e13
.e22 <- .e16 + 1
.e23 <- 2 * .e21
.e24 <- .e22 * .e9
.e25 <- .e6/.e9
.e27 <- .e24/.e23 + .e16
.e30 <- .e15 * .e4 * .e14/.e9
.e31 <- .e27/.e13
.e32 <- .e31 + .e30
.e33 <- 0.5 * .e25
.e34 <- .e3/.e9
.e35 <- 0.5 * .e16
.e39 <- .e12 + 2 * (.e9/.e20)
.e40 <- .e16 - 2 * (.e32 * .e18 * .e9/.e20)
.e41 <- .e8 * .e9
.e42 <- .e15 * .e6
.e43 <- .e15 * .e3
.e45 <- .e25 - .e11/.e3
.e46 <- .e33 - .e12
.e47 <- 2 * .e13
.e48 <- 4 * .e3
.e50 <- .e42 * .e14/.e9
.e52 <- .e43 * .e14/.e9
.e53 <- .e4 * .e6
.e54 <- .e4/.e8
.e55 <- 0.5 + .e35
.e56 <- 2 * .e34
.e58 <- .e40/.e20 + .e22/.e48
.e59 <- .e22/.e9
.e60 <- .e23^2
.e66 <- .e55 * .e9/.e23 + .e35
.e68 <- .e53/.e41
.e70 <- 0.5 - 0.5 * (.e7/.e8)
.e72 <- 2 * ((.e46 * .e9/.e23 + .e33)/.e13)
.e73 <- 2 * ((.e34 + 1/.e47)/.e13)
.e74 <- 2 * ((1/.e13 + .e56)/.e13)
.e75 <- 2 + 2 * ((.e45 * .e9/.e23 + .e25)/.e13)
.e78 <- (.e50 + 1 + .e72) * .e18 - 1
.e79 <- .e30 + 2 * (.e66/.e13)
.e81 <- (.e75 + 2 * .e50) * .e18 - 2
.e82 <- .e4 * .e3
.e83 <- .e73 + 2 * .e52
.e84 <- .e74 + 4 * .e52
.e85 <- .e32 * .e6
.e86 <- .e32 * .e3
.e89 <- .e31 + 2 * (.e22 * .e3 * .e9/.e60)
.e95 <- .e22/.e48^2
.e96 <- .e59 - .e54
.e98 <- .e8 * .e3 * .e9
.e99 <- .e70/.e9
.e106 <- .e42/.e8
.e107 <- .e43/.e8
.e108 <- .e82/.e41
.e109 <- .e25 - .e81 * .e9/.e20
.e110 <- .e34 - .e83 * .e18 * .e9/.e20
.e112 <- 0.5 * .e59 - 0.5 * .e54
.e113 <- 0.5 * .e68
.e114 <- .e35 - .e79 * .e18 * .e9/.e20
.e115 <- .e33 - .e78 * .e9/.e20
.e116 <- 2 * .e54
.e117 <- .e56 - .e84 * .e18 * .e9/.e20
c(a2 = -(0.5 * (geno_a^2 * ((.e99 - (.e79 * .e40 + 2 * ((((.e89 *
.e55/2 + (.e112 * .e4 + 0.5)/.e47)/.e3 + .e99)/.e13 +
(((.e27 + 2 * .e66)/.e13 + .e30) * .e4 + .e70 * .e15) *
.e14/.e9) * .e9 + .e32 * .e114)) * .e18/.e20)/.e20 +
.e70/(4 * (.e3 * .e9)) - .e58 * (.e55/.e10 + 2 * (.e114/.e20))/.e39)/.e39)),
b0 = 0.5 * (geno_a * (((.e40 * .e84 + 2 * ((((.e31 +
(2 * (.e24/.e60) - .e116) * .e3)/.e9 + (2 * .e59 -
.e116)/.e47)/.e13 + ((.e74 - 2 * .e107) * .e4 + 4 *
.e86) * .e14/.e9) * .e9 + .e32 * .e117)) * .e18/.e20 +
2 * .e108)/.e20 + .e58 * (1/.e9 + 2 * (.e117/.e20))/.e39 +
.e4/(2 * .e41)) * (1 - 0.5 * geno_b) * .e5/.e39),
b2 = 0.5 * (geno_a * geno_b * (((.e40 * .e83 + 2 * ((((.e89/2 -
.e82/.e8)/.e9 + .e96/.e47)/.e13 + ((.e73 - .e107) *
.e4 + 2 * .e86) * .e14/.e9) * .e9 + .e32 * .e110)) *
.e18/.e20 + .e108)/.e20 + .e58 * (1/(2 * .e9) + 2 *
(.e110/.e20))/.e39 + .e4/(4 * .e41)) * .e5/.e39),
q0 = 0.5 * (geno_a * (((.e81 * .e40 + 2 * (((((.e27 *
.e45/2 + .e96 * .e6/2)/.e21 - (.e68 + 2 * (.e22 *
(r0 - (.e45/2 + .e12)) * .e9/.e60)))/.e13 + ((.e75 -
.e106) * .e4 + 2 * .e85) * .e14/.e9) * .e9 + .e32 *
.e109) * .e18))/.e20 + .e68)/.e20 + .e58 * (.e45/.e10 +
2 * (.e109/.e20))/.e39 + .e53/(4 * .e98) + 4 * .e95) *
(1 - 0.5 * geno_q)/.e39), q2 = 0.5 * (geno_a * geno_q *
(((.e78 * .e40 + 2 * (((((.e27 * .e46/2 + .e112 *
.e6/2)/.e21 - (.e113 + 2 * (.e22 * (0.5 * .e13 -
.e46/2) * .e9/.e60)))/.e13 + (.e85 + (1 + .e72 -
0.5 * .e106) * .e4) * .e14/.e9) * .e9 + .e32 *
.e115) * .e18))/.e20 + .e113)/.e20 + .e58 * (.e46/.e10 +
2 * (.e115/.e20))/.e39 + .e53/(8 * .e98) + 2 *
.e95)/.e39))
}
d_f_j1_b0_bq_g <-
function (a0, a2, b0, b2, q0, q2, r0, tij, t0, geno_a, geno_b,
geno_q)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e6 * .e3
.e9 <- .e4^2 + 2 * .e7
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e15 <- tij - t0
.e16 <- .e11 + 2 * (.e10/.e14)
.e18 <- exp(2 * (.e10 * .e15))
.e20 <- .e16 * .e18 - .e11
.e21 <- .e3/.e10
.e22 <- 4 * .e21
.e23 <- .e16 * .e3
.e24 <- .e6/.e10
.e26 <- .e23 * .e15/.e10
.e27 <- 4 * .e26
.e29 <- (2/.e14 + .e22)/.e14 + .e27
.e30 <- 0.5 * .e24
.e31 <- 0.5 * geno_q
.e33 <- 2 * (.e3 * .e14)
.e34 <- 1 - .e31
.e38 <- .e13 + 2 * (.e10/.e20)
.e40 <- .e22 - 2 * (.e29 * .e18 * .e10/.e20)
.e41 <- 0.5 * geno_b
.e42 <- .e9 * .e10
.e45 <- .e16 * .e6 * .e15/.e10
.e47 <- .e24 - .e12/.e3
.e48 <- .e30 - .e13
.e49 <- 1 - .e41
.e50 <- 2 * .e21
.e51 <- 1/.e10
.e52 <- 2 * .e14
.e58 <- .e40/.e20 + .e51
.e59 <- .e3^2
.e61 <- 2 * ((.e48 * .e10/.e33 + .e30)/.e14)
.e62 <- 2 * ((.e21 + 1/.e52)/.e14)
.e63 <- 2 * ((1/.e14 + .e50)/.e14)
.e64 <- 2 + 2 * ((.e47 * .e10/.e33 + .e24)/.e14)
.e65 <- .e22 + 4/.e14
.e67 <- (.e45 + 1 + .e61) * .e18 - 1
.e73 <- (.e64 + 2 * .e45) * .e18 - 2
.e75 <- 0.5 - 0.5 * (.e7/.e9)
.e76 <- 1 - (.e34 * .e6 * .e3/.e9 + .e31)
.e77 <- .e62 + 2 * .e26
.e78 <- .e63 + .e27
.e91 <- .e23/.e9
.e92 <- .e6/.e42
.e93 <- .e24 - .e73 * .e10/.e20
.e94 <- .e3/.e42
.e95 <- .e21 - .e77 * .e18 * .e10/.e20
.e96 <- .e59/.e42
.e97 <- .e59/.e9
.e98 <- .e30 - .e67 * .e10/.e20
.e99 <- .e50 - .e78 * .e18 * .e10/.e20
.e100 <- 4 * (.e75/.e10)
.e101 <- 4 * (.e76/.e10)
c(b0 = -(0.5 * ((.e58 * (1 - (.e49 * (.e51 + 2 * (.e99/.e20)) *
.e6/.e38 + .e41)) - (((.e78 * .e40 + 2 * (.e29 * .e99 +
(.e65/.e14 - 8 * .e97)/.e14 + (4 * .e29 + 4 * (.e63 -
2 * .e91)) * .e3 * .e15)) * .e18/.e20 + 8 * .e96)/.e20 +
2 * .e94) * .e49 * .e6) * .e49/.e38)), b2 = -(0.5 * (geno_b *
(.e58 * (0.5 - (1/(2 * .e10) + 2 * (.e95/.e20)) * .e6/.e38) -
(((.e77 * .e40 + 2 * (.e29 * .e95 + (.e65/.e52 -
4 * .e97)/.e14 + (2 * .e29 + 4 * (.e62 - .e91)) *
.e3 * .e15)) * .e18/.e20 + 4 * .e96)/.e20 + .e94) *
.e6) * .e49/.e38)), q0 = -(0.5 * (((.e101 - (.e73 *
.e34 * .e40 + 2 * ((((.e47 * .e34 * .e65/.e33 + .e101)/.e14 +
(2 * (.e29 * .e34 * .e6) + 4 * (.e76 * .e16 + .e34 *
.e64 * .e3)) * .e15/.e10) * .e10 + .e29 * .e93 *
.e34) * .e18))/.e20)/.e20 - ((.e47/.e11 + 2 * (.e93/.e20)) *
.e58/.e38 + .e92) * .e34) * .e49 * .e5/.e38)), q2 = -(0.5 *
(geno_q * ((.e100 - (.e67 * .e40 + 2 * ((((.e29 * .e6 +
4 * (.e75 * .e16 + (1 + .e61) * .e3)) * .e15/.e10 +
(.e48 * .e65/.e33 + .e100)/.e14) * .e10 + .e29 *
.e98) * .e18))/.e20)/.e20 - ((.e48/.e11 + 2 * (.e98/.e20)) *
.e58/.e38 + 0.5 * .e92)) * .e49 * .e5/.e38)))
}
d_f_j1_b2_bq_g <-
function (a0, a2, b0, b2, q0, q2, r0, tij, t0, geno_a, geno_b,
geno_q)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e6 * .e3
.e9 <- .e4^2 + 2 * .e7
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e15 <- tij - t0
.e16 <- .e11 + 2 * (.e10/.e14)
.e18 <- exp(2 * (.e10 * .e15))
.e20 <- .e16 * .e18 - .e11
.e21 <- .e3/.e10
.e22 <- .e6/.e10
.e23 <- 2 * .e21
.e24 <- .e16 * .e3
.e27 <- 2 * (.e24 * .e15/.e10)
.e29 <- (1/.e14 + .e23)/.e14 + .e27
.e30 <- 0.5 * .e22
.e31 <- 0.5 * geno_q
.e33 <- 2 * (.e3 * .e14)
.e34 <- 1 - .e31
.e40 <- .e16 * .e6 * .e15/.e10
.e41 <- .e13 + 2 * (.e10/.e20)
.e43 <- .e22 - .e12/.e3
.e44 <- .e30 - .e13
.e46 <- .e23 - 2 * (.e29 * .e18 * .e10/.e20)
.e47 <- 2 * .e14
.e50 <- .e9 * .e10
.e53 <- 2 * ((.e44 * .e10/.e33 + .e30)/.e14)
.e54 <- 2 * ((.e21 + 1/.e47)/.e14)
.e55 <- 2 + 2 * ((.e43 * .e10/.e33 + .e22)/.e14)
.e57 <- (.e40 + 1 + .e53) * .e18 - 1
.e63 <- .e46/.e20 + 0.5/.e10
.e65 <- (.e55 + 2 * .e40) * .e18 - 2
.e67 <- 0.5 - 0.5 * (.e7/.e9)
.e68 <- 1 - (.e34 * .e6 * .e3/.e9 + .e31)
.e69 <- .e54 + .e27
.e70 <- .e23 + 2/.e14
.e80 <- .e6/.e50
.e81 <- .e22 - .e65 * .e10/.e20
.e82 <- .e21 - .e69 * .e18 * .e10/.e20
.e83 <- .e3^2
.e84 <- .e30 - .e57 * .e10/.e20
.e85 <- 2 * (.e67/.e10)
.e86 <- 2 * (.e68/.e10)
c(b2 = -(0.5 * (geno_b^2 * (.e63 * (0.5 - (1/(2 * .e10) +
2 * (.e82/.e20)) * .e6/.e41) - (((.e69 * .e46 + 2 * (.e29 *
.e82 + (.e70/.e47 - 2 * (.e83/.e9))/.e14 + (2 * .e29 +
2 * (.e54 - .e24/.e9)) * .e3 * .e15)) * .e18/.e20 + 2 *
(.e83/.e50))/.e20 + 0.5 * (.e3/.e50)) * .e6)/.e41)),
q0 = -(0.5 * (geno_b * ((.e86 - (.e65 * .e34 * .e46 +
2 * ((((.e43 * .e34 * .e70/.e33 + .e86)/.e14 + (2 *
(.e29 * .e34 * .e6) + 2 * (.e68 * .e16 + .e34 *
.e55 * .e3)) * .e15/.e10) * .e10 + .e29 * .e81 *
.e34) * .e18))/.e20)/.e20 - ((.e43/.e11 + 2 *
(.e81/.e20)) * .e63/.e41 + 0.5 * .e80) * .e34) *
.e5/.e41)), q2 = -(0.5 * (geno_b * geno_q * ((.e85 -
(.e57 * .e46 + 2 * ((((.e29 * .e6 + 2 * (.e67 * .e16 +
(1 + .e53) * .e3)) * .e15/.e10 + (.e44 * .e70/.e33 +
.e85)/.e14) * .e10 + .e29 * .e84) * .e18))/.e20)/.e20 -
((.e44/.e11 + 2 * (.e84/.e20)) * .e63/.e41 + 0.25 *
.e80)) * .e5/.e41)))
}
d_f_j1_q0_qb_g <-
function (a0, a2, b0, b2, q0, q2, r0, tij, t0, geno_a, geno_b,
geno_q)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e6 * .e3
.e9 <- .e4^2 + 2 * .e7
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e15 <- tij - t0
.e16 <- .e11 + 2 * (.e10/.e14)
.e18 <- exp(2 * (.e10 * .e15))
.e19 <- .e6/.e10
.e21 <- .e16 * .e18 - .e11
.e22 <- .e11^2
.e24 <- 2 * (.e3 * .e10)
.e26 <- .e6/.e24
.e27 <- 2 * (.e12/.e22)
.e28 <- 2 * .e19
.e29 <- .e16 * .e6
.e30 <- .e26 - .e27
.e32 <- .e29 * .e15/.e10
.e36 <- 2 * (.e30 * .e10/.e14) + .e28
.e37 <- 2 * .e32
.e40 <- .e36/.e14 + 2 + .e37
.e41 <- 0.5 * .e19
.e42 <- .e3/.e10
.e44 <- .e40 * .e18 - 2
.e45 <- .e12/.e3
.e47 <- 2 * (.e3 * .e14)
.e50 <- .e24^2
.e51 <- .e13 + 2 * (.e10/.e21)
.e53 <- .e28 - 2 * (.e44 * .e10/.e21)
.e54 <- .e19 - .e45
.e55 <- .e41 - .e13
.e56 <- 2 * .e42
.e59 <- .e16 * .e3 * .e15/.e10
.e60 <- .e7/.e9
.e63 <- .e54 * .e10/.e47 + .e19
.e66 <- .e55 * .e10/.e47 + .e41
.e67 <- .e42 + 1/(2 * .e14)
.e69 <- 1/.e14 + .e56
.e75 <- .e53/.e21 + .e26 - .e27
.e76 <- .e7/.e50
.e77 <- .e7/.e10
.e79 <- .e5^4/(.e9 * .e10)
.e81 <- 1 - 0.5 * geno_q
.e83 <- 2 * (.e66/.e14)
.e84 <- 2 + 2 * (.e63/.e14)
.e86 <- (.e32 + 1 + .e83) * .e18 - 1
.e90 <- (.e84 + .e37) * .e18 - 2
.e91 <- 1 - .e60
.e92 <- 2 - 2 * .e60
.e94 <- 2 * (.e67/.e14) + 2 * .e59
.e96 <- 2 * (.e69/.e14) + 4 * .e59
.e99 <- .e40 * .e3
.e116 <- (2 * .e76 + 2/.e22) * .e3
.e117 <- .e29/.e9
.e118 <- (4 * .e76 + 4/.e22) * .e3
.e119 <- .e19 - .e90 * .e10/.e21
.e120 <- .e42 - .e94 * .e18 * .e10/.e21
.e121 <- .e41 - .e86 * .e10/.e21
.e122 <- 1/.e11
.e123 <- 1/.e3
.e124 <- 2 * ((.e77 + .e10) * .e6/.e50)
.e125 <- 2 * ((.e19 - 2 * .e45)/.e22)
.e126 <- 2 * ((0.5 * .e77 + 0.5 * .e10) * .e6/.e50)
.e127 <- 2 * ((.e41 - .e45)/.e22)
.e128 <- 2 * (.e91/.e10)
.e129 <- 2 * (.e92/.e10)
.e130 <- 2 * .e79
.e131 <- .e56 - .e96 * .e18 * .e10/.e21
.e132 <- 2 * .e10
c(q0 = 0.5 * ((((.e90 * .e53 + 2 * ((((.e54 * .e36/.e11 +
2 * (.e63 * .e30 - (.e124 + .e125) * .e10))/.e14 - .e130)/.e14 +
(2 * .e40 + 2 * (.e84 - .e117)) * .e6 * .e15/.e10) *
.e18 * .e10 + .e44 * .e119))/.e21 + .e130)/.e21 + (.e54/.e11 +
2 * (.e119/.e21)) * .e75/.e51 + .e124 + .e125) * .e81^2/.e51),
q2 = 0.5 * (geno_q * (((.e86 * .e53 + 2 * ((((.e55 *
.e36/.e11 + 2 * (.e66 * .e30 - (.e126 + .e127) *
.e10))/.e14 - .e79)/.e14 + (.e40 + 2 * (1 + .e83 -
0.5 * .e117)) * .e6 * .e15/.e10) * .e18 * .e10 +
.e44 * .e121))/.e21 + .e79)/.e21 + (.e55/.e11 + 2 *
(.e121/.e21)) * .e75/.e51 + .e126 + .e127) * .e81/.e51),
b0 = -(0.5 * (((.e123 - .e118)/.e10 + (.e129 - (.e96 *
.e53 * .e18 + 2 * ((((.e36/.e10 + 2 * (.e30 * .e69 +
.e123 - .e118))/.e14 + .e129)/.e14 + (2 * (.e92 *
.e16 + 2 * (.e69 * .e6/.e14)) + 4 * .e99) * .e15/.e10) *
.e18 * .e10 + .e44 * .e131))/.e21)/.e21 - .e75 *
(1/.e10 + 2 * (.e131/.e21))/.e51) * (1 - 0.5 * geno_b) *
.e81 * .e5/.e51)), b2 = -(0.5 * (geno_b * ((.e122 -
.e116)/.e10 + (.e128 - (.e94 * .e53 * .e18 + 2 *
((((.e36/.e132 + 2 * (.e30 * .e67 + .e122 - .e116))/.e14 +
.e128)/.e14 + (2 * .e99 + 2 * (.e91 * .e16 +
2 * (.e67 * .e6/.e14))) * .e15/.e10) * .e18 *
.e10 + .e44 * .e120))/.e21)/.e21 - .e75 * (1/.e132 +
2 * (.e120/.e21))/.e51) * .e81 * .e5/.e51)))
}
d_f_j1_q2_qb_g <-
function (a0, a2, b0, b2, q0, q2, r0, tij, t0, geno_a, geno_b,
geno_q)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e6 * .e3
.e9 <- .e4^2 + 2 * .e7
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e15 <- tij - t0
.e16 <- .e11 + 2 * (.e10/.e14)
.e18 <- exp(2 * (.e10 * .e15))
.e19 <- .e6/.e10
.e21 <- .e16 * .e18 - .e11
.e22 <- .e11^2
.e24 <- 2 * (.e3 * .e10)
.e27 <- .e6/.e24 - 2 * (.e12/.e22)
.e28 <- 0.5 * .e19
.e31 <- .e27 * .e10/.e14 + .e19
.e34 <- .e16 * .e6 * .e15/.e10
.e35 <- .e3/.e10
.e38 <- .e31/.e14 + .e34 + 1
.e40 <- .e38 * .e18 - 1
.e41 <- .e28 - .e13
.e42 <- 2 * .e35
.e45 <- .e24^2
.e48 <- .e16 * .e3 * .e15/.e10
.e49 <- .e13 + 2 * (.e10/.e21)
.e50 <- .e7/.e9
.e51 <- .e19 - 2 * (.e40 * .e10/.e21)
.e54 <- .e41 * .e10/(2 * (.e3 * .e14)) + .e28
.e55 <- .e35 + 1/(2 * .e14)
.e57 <- 1/.e14 + .e42
.e58 <- (2 * (.e7/.e45) + 2/.e22) * .e3
.e61 <- (.e34 + 1 + 2 * (.e54/.e14)) * .e18 - 1
.e63 <- .e51/.e21 + 0.5 * .e27
.e66 <- 1 - .e50
.e67 <- 2 - 2 * .e50
.e69 <- 2 * (.e55/.e14) + 2 * .e48
.e71 <- 2 * (.e57/.e14) + 4 * .e48
.e72 <- .e38 * .e3
.e79 <- .e66/.e10
.e80 <- .e67/.e10
.e89 <- .e35 - .e69 * .e18 * .e10/.e21
.e90 <- .e28 - .e61 * .e10/.e21
.e91 <- 0.5 * (.e5^4/(.e9 * .e10))
.e92 <- 1/.e11
.e93 <- 1/.e3
.e95 <- 2 * ((0.5 * (.e7/.e10) + 0.5 * .e10) * .e6/.e45) +
2 * ((.e28 - .e12/.e3)/.e22)
.e96 <- 2 * .e58
.e97 <- .e42 - .e71 * .e18 * .e10/.e21
.e98 <- 2 * .e10
c(q2 = 0.5 * (geno_q^2 * (((.e61 * .e51 + 2 * ((((.e31 *
.e41/.e11 + .e54 * .e27 - .e95 * .e10)/.e14 - .e91)/.e14 +
((.e31 + 2 * .e54)/.e14 + (.e15/.e10 - 0.5/.e9) * .e16 *
.e6 + 2) * .e6 * .e15/.e10) * .e18 * .e10 + .e40 *
.e90))/.e21 + .e91)/.e21 + .e63 * (.e41/.e11 + 2 * (.e90/.e21))/.e49 +
0.5 * .e95)/.e49), b0 = -(0.5 * (geno_q * ((.e80 - (.e51 *
.e71 * .e18 + 2 * ((((.e31/.e10 + .e27 * .e57 + .e93 -
.e96)/.e14 + .e80)/.e14 + (.e67 * .e16 + 2 * (.e57 *
.e6/.e14) + 4 * .e72) * .e15/.e10) * .e18 * .e10 + .e40 *
.e97))/.e21)/.e21 + 0.5 * ((.e93 - .e96)/.e10) - .e63 *
(1/.e10 + 2 * (.e97/.e21))/.e49) * (1 - 0.5 * geno_b) *
.e5/.e49)), b2 = -(0.5 * (geno_b * geno_q * ((.e79 -
(.e51 * .e69 * .e18 + 2 * ((((.e31/.e98 + .e27 * .e55 +
.e92 - .e58)/.e14 + .e79)/.e14 + (.e66 * .e16 + 2 *
.e72 + 2 * (.e55 * .e6/.e14)) * .e15/.e10) * .e18 *
.e10 + .e40 * .e89))/.e21)/.e21 + 0.5 * ((.e92 -
.e58)/.e10) - .e63 * (1/.e98 + 2 * (.e89/.e21))/.e49) *
.e5/.e49)))
}
d_f_j2_a0_abqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e1 <- a0 + geno_a * (a2 - a0)/2
.e4 <- geno_q * (q2 - q0)/2 + q0
.e5 <- .e1^2
.e6 <- b0 + geno_b * (b2 - b0)/2
.e7 <- .e6^2
.e8 <- .e7 * .e4
.e9 <- .e5 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e4
.e12 <- .e1 + .e10
.e15 <- geno_f * (f2 - f0)/2
.e16 <- .e12/.e11
.e17 <- f0 + .e15
.e18 <- r0 - .e16
.e19 <- tij - t0
.e20 <- .e17 - f1
.e21 <- .e11 + 2 * (.e10/.e18)
.e23 <- exp(2 * (.e10 * .e19))
.e24 <- .e1/.e10
.e25 <- .e21 * .e23
.e26 <- .e17 - m0
.e27 <- .e5 * .e20
.e28 <- .e1 * .e20
.e29 <- .e28/.e10
.e31 <- 2 * (.e26 * .e10)
.e34 <- 2 * (.e27/.e10) - .e31
.e35 <- .e24 + 1
.e37 <- .e4 * .e18
.e38 <- exp(-(t0 * .e10))
.e39 <- exp(tij * .e10)
.e41 <- .e29 + f0 + .e15
.e42 <- .e11 - .e25
.e43 <- .e5/.e9
.e44 <- .e25 - .e11
.e45 <- 0.5 * geno_a
.e46 <- 2 * .e24
.e51 <- 2 * (.e34 * .e38 * .e39/.e12)
.e52 <- 2 * (.e29 - .e17)
.e53 <- .e51 - .e52
.e54 <- .e21 * .e1
.e55 <- 1 - .e45
.e59 <- .e53 * .e4 - .e41 * .e21 * .e23
.e60 <- .e59/.e42
.e61 <- .e35 * .e10
.e62 <- .e7/.e10
.e64 <- .e61/.e37 + .e46
.e66 <- .e54 * .e19/.e10
.e67 <- .e64/.e18
.e68 <- .e67 + 2 * .e66
.e69 <- 2 * .e37
.e70 <- 0.5 * .e24
.e71 <- .e16 + 2 * (.e10/.e44)
.e72 <- 4 * .e43
.e73 <- t0 * .e34
.e74 <- 0.5 * .e62
.e77 <- 0.5 * .e73 + f0 + .e15
.e78 <- 8 - .e72
.e79 <- yij - .e60
.e81 <- .e55 * .e1/.e10
.e83 <- 2 * (.e77 - m0)
.e84 <- 2 - 2 * .e43
.e86 <- .e78 * .e20/2
.e87 <- 1 - .e43
.e88 <- 2 * .e26
.e89 <- .e86 - .e83
.e90 <- .e21 * .e7
.e91 <- .e4/.e10
.e92 <- .e60 - .e41
.e93 <- .e27/.e9
.e98 <- 2 * (.e89 * .e1/.e10 - .e35 * .e34/.e12) + 2 * (tij *
.e34 * .e1/.e10)
.e99 <- 2 * .e93
.e103 <- .e9 * .e10
.e104 <- .e87 * .e4
.e105 <- .e84 * .e21
.e107 <- .e90 * .e19/.e10
.e108 <- 0.5 + .e70
.e110 <- .e46 - 2 * (.e68 * .e23 * .e10/.e44)
.e111 <- .e99 + .e88
.e113 <- .e105 * .e23/2
.e114 <- 0.5 * geno_f
.e115 <- 2 * .e104
.e116 <- .e21 * .e4
.e117 <- .e113 + .e115
.e119 <- .e81 + 1 - .e45
.e121 <- .e62 - .e12/.e4
.e122 <- .e74 - .e16
.e123 <- .e35/.e11
.e124 <- .e123 + .e110/.e44
.e126 <- .e116 * .e19/.e10
.e127 <- .e1/.e9
.e128 <- 0.5 * .e43
.e129 <- .e28/.e9
.e133 <- .e68 * .e92 * .e23 + .e98 * .e38 * .e39 * .e4/.e12 -
.e117 * .e20/.e10
.e134 <- 1 - .e114
.e138 <- 2 * ((.e122 * .e10/.e69 + .e74)/.e18)
.e139 <- 2 * .e91
.e140 <- 2 * .e10
.e141 <- 2 + 2 * ((.e121 * .e10/.e69 + .e62)/.e18)
.e142 <- .e35/.e10
.e143 <- .e37^2
.e144 <- .e55 * .e21
.e149 <- .e107 + 1 + .e138
.e150 <- .e41 - .e60
.e152 <- 0.5 - .e128
.e153 <- 1 - (.e55 * .e5/.e9 + .e45)
.e156 <- 2 * (.e5/.e10) - .e140
.e157 <- .e141 + 2 * .e107
.e161 <- .e119 * .e10/.e69 + .e81
.e164 <- 2 * ((.e108 * .e10/.e69 + .e70)/.e18)
.e165 <- 2 * ((.e91 + 1/(2 * .e18))/.e18)
.e166 <- 2 * ((1/.e18 + .e139)/.e18)
.e168 <- .e144 * .e1
.e169 <- 2 * (.e161/.e18)
.e171 <- .e133/.e42 + 0.5 * (.e124 * .e79/.e71)
.e172 <- .e66 + .e164
.e173 <- .e165 + 2 * .e126
.e174 <- .e166 + 4 * .e126
.e175 <- .e149 * .e23
.e178 <- .e157 * .e23
.e180 <- .e1 * .e7/.e103
.e181 <- .e4^2
.e182 <- .e169 + 2 * (.e168 * .e19/.e10)
.e184 <- .e134 * .e1/.e10
.e187 <- 2 * .e129
.e188 <- tij - (1/.e12 + t0)
.e189 <- .e67 + .e35 * .e4 * .e10/.e143
.e193 <- .e142 - .e127
.e195 <- .e34/.e9
.e198 <- .e54 * .e7 * .e20/.e103
.e201 <- .e54 * .e20 * .e4/.e103
.e202 <- 0.5 * geno_q
.e203 <- 2 - .e43
.e205 <- 2 * ((.e34 * .e188 - .e111) * .e38 * .e39/.e12) +
.e187
.e207 <- 2 * ((1 - .e128) * .e20) + m0
.e208 <- .e35/.e12
.e209 <- .e9^2
.e211 <- 0.5 * .e127
.e212 <- 1 - .e202
.e213 <- 2 * (.e203 * .e20)
.e214 <- .e92 * .e19
.e216 <- .e175 - 1
.e217 <- .e35 * .e111
.e218 <- .e152 * .e20
.e219 <- .e152/.e10
.e221 <- .e153 * .e20
.e222 <- .e153/.e10
.e223 <- .e184 + 1
.e224 <- .e111/.e10
.e225 <- .e21 * .e5
.e226 <- .e90/.e9
.e227 <- .e116/.e9
.e228 <- .e178 - 2
.e229 <- .e1 * .e4
.e231 <- 0.5 * .e142 - .e211
.e233 <- 0.5 * (tij * .e1/.e10) - .e108/.e12
.e234 <- 0.5 * t0
.e235 <- 0.5 * tij
.e236 <- 1 - .e175
.e237 <- 2 - .e178
.e241 <- 2 * tij - (2 * t0 + 2/.e12)
.e243 <- t0 * .e111/.e10
.e247 <- tij * .e55 * .e1/.e10 - .e119/.e12
.e253 <- ((.e129 + 2 * (((.e235 - (.e234 + 0.5/.e12)) * .e34 -
0.5 * .e111) * .e38 * .e39/.e12)) * .e7 * .e4/.e10 +
0.5 * .e53 - ((.e149 * .e41 - 0.5 * .e198) * .e23 + .e59 *
.e236/.e42))/.e42
.e268 <- ((2 * ((.e233 * .e34 + (.e207 - .e77) * .e1/.e10) *
.e38 * .e39/.e12) - 2 * (.e218/.e10)) * .e4 - (.e172 *
.e150 + .e152 * .e21 * .e20/.e10) * .e23)/.e42
.e269 <- ((2 * ((.e55 * (.e213 - (.e88 + .e73)) * .e1/.e10 +
.e34 * .e247) * .e38 * .e39/.e12) - 2 * (.e221/.e10)) *
.e4 - (.e150 * .e182 + .e153 * .e21 * .e20/.e10) * .e23)/.e42
.e270 <- ((2 * ((.e34 * .e241 - 2 * .e111) * .e38 * .e39/.e12) +
4 * .e129) * .e181/.e10 - (.e150 * .e174 - 2 * .e201) *
.e23)/.e42
.e271 <- (.e205 * .e7 * .e4/.e10 + .e51 - ((.e41 * .e157 -
.e198) * .e23 + .e59 * .e237/.e42 + .e52))/.e42
.e272 <- (.e205 * .e181/.e10 - (.e150 * .e173 - .e201) *
.e23)/.e42
.e274 <- (.e156 * .e38 * .e39/.e12 - 2 * (.e70 - 0.5)) *
.e4 - .e108 * .e21 * .e23
.e280 <- .e71 * .e42
.e281 <- .e81 - .e182 * .e23 * .e10/.e44
.e289 <- (2 - 4 * (.e1 * .e38 * .e39/.e12)) * .e4 + .e25
.e294 <- (2 * (.e134 * .e156 * .e38 * .e39/.e12) - 2 * (.e184 +
.e114 - 1)) * .e4 - (.e223 - .e114) * .e21 * .e23
.e298 <- .e78/2
.e299 <- .e62 - .e228 * .e10/.e44
.e300 <- .e91 - .e173 * .e23 * .e10/.e44
.e301 <- 0.5 * .e89
.e302 <- .e70 - .e172 * .e23 * .e10/.e44
.e303 <- .e74 - .e216 * .e10/.e44
.e304 <- 2 * .e219
.e305 <- 2 * .e222
.e306 <- .e207 - .e17
.e307 <- 2 * .e180
.e308 <- 2 * .e127
.e309 <- .e139 - .e174 * .e23 * .e10/.e44
.e310 <- ((.e189 * .e119/2 + (.e193 * .e55 * .e1 + 1 - .e45)/.e18)/.e4 +
.e305)/.e18
.e311 <- ((.e189 * .e108/2 + (.e231 * .e1 + 0.5)/.e18)/.e4 +
.e304)/.e18
.e312 <- ((.e189/2 - 2 * (.e229/.e9))/.e10 + .e193/.e18)/.e18
.e313 <- ((.e64 * .e121/2 + .e193 * .e7)/.e37 - (.e35 * (r0 -
(.e121/2 + .e16)) * .e10/.e143 + .e307))/.e18
.e314 <- ((.e64 * .e122/2 + .e231 * .e7)/.e37 - (.e35 * (0.5 *
.e18 - .e122/2) * .e10/.e143 + .e180))/.e18
.e315 <- ((.e67 + (.e61/.e143 - 4 * .e127) * .e4)/.e10 +
(2 * .e142 - .e308)/.e18)/.e18
.e318 <- .e68 * .e7
.e319 <- .e68 * .e4
.e322 <- (.e119/.e11 + 2 * (.e281/.e44)) * .e79/.e71 + .e269
.e323 <- .e253 + (.e122/.e11 + 2 * (.e303/.e44)) * .e79/.e71
.e326 <- (.e121/.e11 + 2 * (.e299/.e44)) * .e79/.e71 + .e271
.e329 <- (.e108/.e11 + 2 * (.e302/.e44)) * .e79/.e71 + .e268
.e331 <- .e117 * .e7/.e9
.e332 <- .e270 + (1/.e10 + 2 * (.e309/.e44)) * .e79/.e71
.e333 <- .e272 + (1/.e140 + 2 * (.e300/.e44)) * .e79/.e71
.e335 <- .e144 + (.e169 - .e168/.e9) * .e1
.e336 <- (1 + .e138 - 0.5 * .e226) * .e1
.e338 <- (.e164 - 0.5 * (.e54/.e9)) * .e1 + 0.5 * .e21
.e339 <- (.e165 - .e227) * .e1
.e340 <- (.e166 - 2 * .e227) * .e1
.e343 <- .e225 * .e7/.e209
.e345 <- .e225 * .e4/.e209
.e346 <- (.e141 - .e226) * .e1
.e347 <- .e12 * .e10
.e348 <- .e129 + 2 * .e214
.e349 <- .e229/.e103
.e351 <- 0.5 * .e195
.e353 <- 2 * ((((.e298 - .e72) * .e20 - .e83)/.e9 - .e243) *
.e1 - ((.e208 + .e127) * .e34 + .e217)/.e12) + 2 * (tij *
(.e224 + .e195) * .e1)
.e354 <- 2 * .e208
.e355 <- .e213 - .e88
.e356 <- 2 * (.e4 * .e10)
.e358 <- t0 * .e98 * .e1
c(a0 = (((((.e310 + 2 * (.e335 * .e19/.e10)) * .e92 + .e133 *
.e182/.e42 + .e68 * (.e269 + (2 * (.e92 * .e55 * .e1 *
.e19) - .e221)/.e10)) * .e23 + (.e55 * (2 * (tij * ((((2 +
2 * .e203) * .e20 - .e88)/.e10 - .e195) * .e5 - .e31)) -
.e358)/.e10 + .e98 * .e247 + 2 * ((.e86 - ((((.e298 +
4 * .e87) * .e20 - .e83)/.e9 + t0 * .e355/.e10) * .e5 +
.e83)) * .e55/.e10 - ((.e222 - .e119 * .e35/.e12) * .e34 +
.e35 * .e55 * .e355 * .e1/.e10)/.e12)) * .e38 * .e39 *
.e4/.e12 - (0.5 * ((.e55 * (2 * (.e84 * .e19/.e10) -
4 * (.e87/.e9)) * .e21 * .e1 + 2 * (.e161 * .e84/.e18)) *
.e23) - (.e113 + 6 * .e104) * .e55 * .e1/.e9) * .e20/.e10)/.e42 +
0.5 * (((.e153/.e356 + (.e305 - (.e182 * .e110 + 2 *
((.e310 + (2 * (.e68 * .e55 * .e1) + 2 * .e335) *
.e19/.e10) * .e10 + .e68 * .e281)) * .e23/.e44)/.e44) *
.e79 - .e322 * .e124)/.e71)) * .e79 - .e171 * .e322) *
.e55/.e71, a2 = geno_a * (((((.e311 + 2 * (.e338 * .e19/.e10)) *
.e92 + ((.e92 * .e1 * .e19 - .e218)/.e10 + .e268) * .e68 +
.e133 * .e172/.e42) * .e23 + (.e233 * .e98 + (2 * (tij *
((.e306/.e10 - .e351) * .e5 + 0.5 * .e34)) - 0.5 * .e358)/.e10 +
2 * ((.e301 - ((.e301 + 2 * (.e87 * .e20))/.e9 + t0 *
.e306/.e10) * .e5)/.e10 - ((.e219 - .e35 * .e108/.e12) *
.e34 + .e35 * .e306 * .e1/.e10)/.e12)) * .e38 * .e39 *
.e4/.e12 - (0.5 * ((.e172 * .e84 - 2 * (.e87 * .e21 *
.e1/.e9)) * .e23) - (0.5 * .e117 + .e115) * .e1/.e9) *
.e20/.e10)/.e42 + 0.5 * (((.e152/.e356 + (.e304 - (.e172 *
.e110 + 2 * ((.e311 + (.e68 * .e1 + 2 * .e338) * .e19/.e10) *
.e10 + .e68 * .e302)) * .e23/.e44)/.e44) * .e79 - .e329 *
.e124)/.e71)) * .e79 - .e171 * .e329) * .e55/.e71, b0 = (((((.e315 +
2 * (.e340 * .e19/.e10)) * .e92 + .e133 * .e174/.e42 +
.e68 * (.e270 + (.e187 + 4 * .e214) * .e4/.e10)) * .e23 +
((.e98 * .e241 - (2 * (((2 * .e89 - 8 * .e93)/.e9 - 2 *
.e243) * .e1 - ((.e354 + .e308) * .e34 + 2 * .e217)/.e12) +
2 * (tij * (2 * .e224 + 2 * .e195) * .e1))) * .e38 *
.e39 * .e181/.e12 - (0.5 * ((.e84 * .e174 + 8 * .e345) *
.e23) - (2 * .e117 - 8 * (.e5 * .e4/.e9)) * .e4/.e9) *
.e20)/.e10)/.e42 - 0.5 * (((((.e174 * .e110 + 2 *
((.e315 + (2 * .e340 + 4 * .e319) * .e19/.e10) * .e10 +
.e68 * .e309)) * .e23/.e44 + 4 * .e349)/.e44 + .e1/.e103) *
.e79 + .e332 * .e124)/.e71)) * .e79 - .e171 * .e332) *
.e55 * (1 - 0.5 * geno_b) * .e6/.e71, b2 = geno_b * (((((.e312 +
2 * (.e339 * .e19/.e10)) * .e92 + .e133 * .e173/.e42 +
.e68 * (.e272 + .e348 * .e4/.e10)) * .e23 + ((.e98 *
.e188 - .e353) * .e38 * .e39 * .e181/.e12 - (0.5 * ((.e84 *
.e173 + 4 * .e345) * .e23) - (.e113 + (2 * .e87 - .e72) *
.e4) * .e4/.e9) * .e20)/.e10)/.e42 - 0.5 * (((((.e173 *
.e110 + 2 * ((.e312 + (2 * .e319 + 2 * .e339) * .e19/.e10) *
.e10 + .e68 * .e300)) * .e23/.e44 + 2 * .e349)/.e44 +
.e1/(2 * .e103)) * .e79 + .e333 * .e124)/.e71)) * .e79 -
.e171 * .e333) * .e55 * .e6/.e71, q0 = ((((((.e313 +
2 * (.e346 * .e19/.e10)) * .e92 + .e68 * (.e271 + .e348 *
.e7/.e10)) * .e23 - (.e133 * .e237/.e42 + (0.5 * ((.e84 *
.e157 + 4 * .e343) * .e23) + 2 * ((2 * (.e8/.e9) - 1) *
.e5/.e9 + 1) - .e331) * .e20/.e10)) * .e212 + ((.e98 *
.e19 - .e353) * .e212 * .e7 * .e4/.e10 + (1 - (.e212 *
.e7 * .e4/.e347 + .e202)) * .e98) * .e38 * .e39/.e12)/.e42 -
0.5 * (((((.e228 * .e110 + 2 * (((.e313 + (2 * .e318 +
2 * .e346) * .e19/.e10) * .e10 + .e68 * .e299) *
.e23))/.e44 + .e307)/.e44 + (.e35/.e4 + .e180)/.e11) *
.e79 + .e326 * .e124) * .e212/.e71)) * .e79 - .e171 *
.e326 * .e212) * .e55/.e71, q2 = geno_q * (((((.e314 +
2 * (.e336 * .e19/.e10)) * .e92 + ((.e214 + 0.5 * .e129) *
.e7/.e10 + .e253) * .e68) * .e23 + (((.e235 - .e234) *
.e98 - (2 * (((.e301 - .e99)/.e9 - 0.5 * .e243) * .e1 -
((0.5 * .e208 + .e211) * .e34 + 0.5 * .e217)/.e12) +
2 * (tij * (0.5 * .e224 + .e351) * .e1))) * .e7 * .e4/.e10 +
(0.5 - 0.5 * (.e8/.e347)) * .e98) * .e38 * .e39/.e12 -
(.e133 * .e236/.e42 + (0.5 * ((.e149 * .e84 + 2 * .e343) *
.e23) + 2 * (.e5 * .e7 * .e4/.e209 + 0.5 * .e87) -
0.5 * .e331) * .e20/.e10))/.e42 - 0.5 * (((((.e216 *
.e110 + 2 * (((.e314 + (.e318 + 2 * .e336) * .e19/.e10) *
.e10 + .e68 * .e303) * .e23))/.e44 + .e180)/.e44 + (.e123 +
0.5 * .e180)/.e11) * .e79 + .e323 * .e124)/.e71)) * .e79 -
.e171 * .e323) * .e55/.e71, f0 = ((.e68 * (.e294/.e42 +
.e114 - .e223) * .e23 + (2 * ((0.5 * (.e134 * .e78) -
2 * (0.5 * (t0 * .e134 * .e156) + 1 - .e114)) * .e1/.e10 -
.e35 * .e134 * .e156/.e12) + 2 * (tij * .e134 * .e156 *
.e1/.e10)) * .e38 * .e39 * .e4/.e12 - (.e117 * .e134/.e10 +
0.5 * (.e124 * .e294/.e71))) * .e79 - .e171 * .e294) *
.e55/.e280, f2 = geno_f * (((.e274/.e42 - .e108) * .e68 *
.e23 + (2 * ((0.25 * .e78 - 2 * (0.25 * (t0 * .e156) +
0.5)) * .e1/.e10 - 0.5 * (.e35 * .e156/.e12)) + tij *
.e156 * .e1/.e10) * .e38 * .e39 * .e4/.e12 - (0.5 * (.e274 *
.e124/.e71) + 0.5 * (.e117/.e10))) * .e79 - .e171 * .e274) *
.e55/.e280, f1 = ((((.e68 * (.e289/.e42 + 1) * .e1 +
.e105/2) * .e23 + .e115)/.e10 - ((2 * ((0.5 * .e78 -
(.e354 + 2 * (t0 * .e1/.e10)) * .e1)/.e10) + 4 * (tij *
.e5/.e9)) * .e38 * .e39 * .e4/.e12 + 0.5 * (.e124 * .e289/(.e71 *
.e10))) * .e1) * .e79 - .e171 * .e289 * .e1/.e10) * .e55/.e280)
}
d_f_j2_a2_abqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e1 <- a0 + geno_a * (a2 - a0)/2
.e3 <- geno_q * (q2 - q0)/2
.e4 <- .e3 + q0
.e5 <- .e1^2
.e6 <- b0 + geno_b * (b2 - b0)/2
.e7 <- .e6^2
.e8 <- .e7 * .e4
.e9 <- .e5 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e4
.e12 <- .e1 + .e10
.e15 <- geno_f * (f2 - f0)/2
.e16 <- .e12/.e11
.e17 <- f0 + .e15
.e18 <- r0 - .e16
.e19 <- tij - t0
.e20 <- .e17 - f1
.e21 <- .e11 + 2 * (.e10/.e18)
.e23 <- exp(2 * (.e10 * .e19))
.e24 <- .e1/.e10
.e25 <- .e21 * .e23
.e26 <- .e5 * .e20
.e27 <- .e17 - m0
.e28 <- .e1 * .e20
.e29 <- .e28/.e10
.e33 <- 2 * (.e26/.e10) - 2 * (.e27 * .e10)
.e34 <- .e24 + 1
.e36 <- exp(-(t0 * .e10))
.e37 <- exp(tij * .e10)
.e38 <- .e4 * .e18
.e39 <- 2 * .e38
.e40 <- .e11 - .e25
.e42 <- .e29 + f0 + .e15
.e43 <- .e25 - .e11
.e44 <- .e5/.e9
.e49 <- 2 * (.e33 * .e36 * .e37/.e12)
.e50 <- 2 * (.e29 - .e17)
.e51 <- .e7/.e10
.e52 <- .e21 * .e1
.e53 <- .e49 - .e50
.e57 <- .e53 * .e4 - .e42 * .e21 * .e23
.e58 <- .e34 * .e10
.e59 <- .e57/.e40
.e61 <- .e58/.e39 + .e24
.e63 <- .e52 * .e19/.e10
.e64 <- .e61/.e18
.e65 <- .e64 + .e63
.e66 <- 0.5 * .e24
.e67 <- 0.5 * .e51
.e68 <- .e16 + 2 * (.e10/.e43)
.e69 <- 2 * .e44
.e70 <- 2 * .e12
.e71 <- yij - .e59
.e74 <- 0.5 * (t0 * .e33) + f0 + .e15
.e75 <- 4 - .e69
.e76 <- .e21 * .e7
.e77 <- .e4/.e10
.e78 <- .e26/.e9
.e79 <- .e34 * .e33
.e83 <- .e75 * .e20/2 + m0 - .e74
.e85 <- .e76 * .e19/.e10
.e86 <- 0.5 + .e66
.e87 <- 1 - .e44
.e89 <- 2 * .e78 + 2 * .e27
.e90 <- .e59 - .e42
.e91 <- .e9 * .e10
.e92 <- .e21 * .e4
.e93 <- 0.5 * geno_f
.e102 <- .e25/2 + .e3 + q0
.e103 <- .e24 - 2 * (.e65 * .e23 * .e10/.e43)
.e105 <- 2 * (.e83 * .e1/.e10 - .e79/.e70) + tij * .e33 *
.e1/.e10
.e107 <- .e51 - .e12/.e4
.e108 <- .e67 - .e16
.e110 <- .e92 * .e19/.e10
.e111 <- 0.5 * .e44
.e112 <- 4 * .e4
.e113 <- 2 * .e18
.e114 <- .e102 * .e87
.e116 <- .e103/.e43 + .e34/.e112
.e117 <- .e28/.e9
.e120 <- 1 - .e93
.e122 <- 2 * ((.e108 * .e10/.e39 + .e67)/.e18)
.e123 <- 2 * .e77
.e124 <- 2 * .e10
.e125 <- 2 + 2 * ((.e107 * .e10/.e39 + .e51)/.e18)
.e129 <- .e65 * .e90 * .e23 + .e105 * .e36 * .e37 * .e4/.e12 -
.e114 * .e20/.e10
.e131 <- .e85 + 1 + .e122
.e132 <- .e1/.e9
.e134 <- 0.5 - .e111
.e137 <- 2 * (.e5/.e10) - .e124
.e138 <- .e125 + 2 * .e85
.e142 <- .e86 * .e10/.e39 + .e66
.e144 <- 2 * ((.e77 + 1/.e113)/.e18)
.e145 <- 2 * ((1/.e18 + .e123)/.e18)
.e147 <- .e34/.e10
.e148 <- .e39^2
.e149 <- 2 * (.e142/.e18)
.e150 <- .e131 * .e23
.e151 <- .e63 + .e149
.e152 <- .e42 - .e59
.e153 <- 0.5 * geno_q
.e154 <- .e144 + 2 * .e110
.e155 <- .e145 + 4 * .e110
.e157 <- .e129/.e40 + 0.5 * (.e116 * .e71/.e68)
.e158 <- .e138 * .e23
.e159 <- .e1 * .e7
.e160 <- .e4^2
.e162 <- .e120 * .e1/.e10
.e163 <- 1 - .e153
.e166 <- 2 * .e117
.e167 <- tij - (1/.e12 + t0)
.e174 <- .e52 * .e7 * .e20/.e91
.e177 <- .e52 * .e20 * .e4/.e91
.e178 <- .e159/.e91
.e180 <- 2 * ((.e33 * .e167 - .e89) * .e36 * .e37/.e12) +
.e166
.e182 <- 2 * ((1 - .e111) * .e20) + m0
.e183 <- .e33/.e9
.e184 <- .e70^2
.e185 <- .e90 * .e19
.e186 <- .e64 + 2 * (.e34 * .e4 * .e10/.e148)
.e187 <- .e151 * .e23
.e188 <- .e150 - 1
.e189 <- .e34 * .e89
.e190 <- .e79/.e184
.e191 <- .e147 - .e132
.e192 <- .e134 * .e20
.e194 <- .e162 + 1
.e195 <- .e89/.e10
.e197 <- .e33 * .e1/.e9
.e198 <- .e76/.e9
.e199 <- .e92/.e9
.e200 <- .e158 - 2
.e201 <- .e1 * .e4
.e203 <- 0.5 * .e147 - 0.5 * .e132
.e205 <- 0.5 * (tij * .e1/.e10) - .e86/.e12
.e206 <- 0.5 * t0
.e207 <- 0.5 * tij
.e208 <- 1 - .e150
.e209 <- 2 - .e158
.e214 <- 2 * tij - (2 * t0 + 2/.e12)
.e216 <- t0 * .e89/.e10
.e222 <- ((.e117 + 2 * (((.e207 - (.e206 + 0.5/.e12)) * .e33 -
0.5 * .e89) * .e36 * .e37/.e12)) * .e7 * .e4/.e10 + 0.5 *
.e53 - ((.e131 * .e42 - 0.5 * .e174) * .e23 + .e57 *
.e208/.e40))/.e40
.e233 <- ((2 * ((.e205 * .e33 + (.e182 - .e74) * .e1/.e10) *
.e36 * .e37/.e12) - 2 * (.e192/.e10)) * .e4 - (.e151 *
.e152 + .e134 * .e21 * .e20/.e10) * .e23)/.e40
.e234 <- ((2 * ((.e33 * .e214 - 2 * .e89) * .e36 * .e37/.e12) +
4 * .e117) * .e160/.e10 - (.e152 * .e155 - 2 * .e177) *
.e23)/.e40
.e235 <- (.e180 * .e7 * .e4/.e10 + .e49 - ((.e42 * .e138 -
.e174) * .e23 + .e57 * .e209/.e40 + .e50))/.e40
.e236 <- (.e180 * .e160/.e10 - (.e152 * .e154 - .e177) *
.e23)/.e40
.e238 <- (.e137 * .e36 * .e37/.e12 - 2 * (.e66 - 0.5)) *
.e4 - .e86 * .e21 * .e23
.e243 <- .e68 * .e40
.e244 <- .e134/.e10
.e252 <- (2 - 4 * (.e1 * .e36 * .e37/.e12)) * .e4 + .e25
.e257 <- (2 * (.e120 * .e137 * .e36 * .e37/.e12) - 2 * (.e162 +
.e93 - 1)) * .e4 - (.e194 - .e93) * .e21 * .e23
.e261 <- .e51 - .e200 * .e10/.e43
.e262 <- .e77 - .e154 * .e23 * .e10/.e43
.e263 <- 0.5 * .e83
.e264 <- 0.5 * .e178
.e265 <- .e66 - .e187 * .e10/.e43
.e266 <- .e67 - .e188 * .e10/.e43
.e267 <- 0.5 * .e75
.e268 <- .e182 - .e17
.e269 <- .e123 - .e155 * .e23 * .e10/.e43
.e270 <- ((.e186 * .e86/2 + (.e203 * .e1 + 0.5)/.e113)/.e4 +
.e244)/.e18
.e271 <- ((.e186/2 - .e201/.e9)/.e10 + .e191/.e113)/.e18
.e272 <- ((.e61 * .e107/2 + .e191 * .e7/2)/.e38 - (.e178 +
2 * (.e34 * (r0 - (.e107/2 + .e16)) * .e10/.e148)))/.e18
.e273 <- ((.e61 * .e108/2 + .e203 * .e7/2)/.e38 - (.e264 +
2 * (.e34 * (0.5 * .e18 - .e108/2) * .e10/.e148)))/.e18
.e274 <- ((.e64 + (2 * (.e58/.e148) - 2 * .e132) * .e4)/.e10 +
(2 * .e147 - 2 * .e132)/.e113)/.e18
.e276 <- .e65 * .e7
.e277 <- .e65 * .e4
.e278 <- .e222 + (.e108/.e11 + 2 * (.e266/.e43)) * .e71/.e68
.e284 <- (.e107/.e11 + 2 * (.e261/.e43)) * .e71/.e68 + .e235
.e287 <- (.e86/.e11 + 2 * (.e265/.e43)) * .e71/.e68 + .e233
.e288 <- .e234 + (1/.e10 + 2 * (.e269/.e43)) * .e71/.e68
.e289 <- .e236 + (1/.e124 + 2 * (.e262/.e43)) * .e71/.e68
.e290 <- .e34/.e112^2
.e292 <- .e9 * .e4 * .e10
.e293 <- (1 + .e122 - 0.5 * .e198) * .e1
.e294 <- (.e144 - .e199) * .e1
.e295 <- (.e145 - 2 * .e199) * .e1
.e297 <- (.e125 - .e198) * .e1
.e298 <- .e12 * .e10
.e299 <- .e117 + 2 * .e185
.e300 <- .e201/.e91
.e301 <- 0.5 * .e183
.e302 <- 0.5 * .e21
.e303 <- 1 - 3 * .e44
.e304 <- 2 * ((.e189 + .e197)/.e70 + 2 * .e190 - (((.e75/2 -
.e69) * .e20 + m0 - .e74)/.e9 - 0.5 * .e216) * .e1)
.e305 <- t0 * .e137
.e307 <- tij * (.e195 + .e183) * .e1
c(a2 = geno_a^2 * (((((.e270 + ((.e149 - 0.5 * (.e52/.e9)) *
.e1 + .e302) * .e19/.e10) * .e90 + ((.e90 * .e1 * .e19 -
.e192)/.e10 + .e233) * .e65 + .e129 * .e151/.e40) * .e23 +
(.e205 * .e105 + (tij * ((.e268/.e10 - .e301) * .e5 +
0.5 * .e33) - 0.5 * (t0 * .e105 * .e1))/.e10 + 2 *
((.e263 - (((.e87 * .e20 + .e263)/.e9 + 0.5 * (t0 *
.e268/.e10)) * .e5 + (.e34 * .e268 * .e1 + .e134 *
.e33)/.e70))/.e10 + 2 * (.e34 * .e86 * .e33/.e184))) *
.e36 * .e37 * .e4/.e12 - (0.5 * .e187 - 1.5 * (.e102 *
.e1/.e9)) * .e87 * .e20/.e10)/.e40 + 0.5 * ((((.e244 -
(.e151 * .e103 + 2 * ((.e270 + (((.e61 + 2 * .e142)/.e18 +
(.e19/.e10 - 0.5/.e9) * .e21 * .e1) * .e1 + .e302) *
.e19/.e10) * .e10 + .e65 * .e265)) * .e23/.e43)/.e43 +
.e134/(4 * (.e4 * .e10))) * .e71 - .e287 * .e116)/.e68)) *
.e71 - .e157 * .e287)/.e68, b0 = geno_a * (((((.e274 +
.e295 * .e19/.e10) * .e90 + .e129 * .e155/.e40 + .e65 *
(.e234 + (.e166 + 4 * .e185) * .e4/.e10)) * .e23 + ((.e105 *
.e214 + 2 * ((2 * .e189 + 2 * .e197)/.e70 + 4 * .e190 -
((2 * .e83 - 4 * .e78)/.e9 - .e216) * .e1) - tij * (2 *
.e195 + 2 * .e183) * .e1) * .e36 * .e37 * .e160/.e12 -
(0.5 * (.e87 * .e155 * .e23) - .e102 * (2 * .e87 - 4 *
.e44) * .e4/.e9) * .e20)/.e10)/.e40 - 0.5 * (((((.e103 *
.e155 + 2 * ((.e274 + (.e295 + 4 * .e277) * .e19/.e10) *
.e10 + .e65 * .e269)) * .e23/.e43 + 2 * .e300)/.e43 +
.e1/(2 * .e91)) * .e71 + .e288 * .e116)/.e68)) * .e71 -
.e157 * .e288) * (1 - 0.5 * geno_b) * .e6/.e68, b2 = geno_a *
geno_b * (((((.e271 + .e294 * .e19/.e10) * .e90 + .e129 *
.e154/.e40 + .e65 * (.e236 + .e299 * .e4/.e10)) * .e23 +
((.e105 * .e167 + .e304 - .e307) * .e36 * .e37 * .e160/.e12 -
(0.5 * (.e87 * .e154 * .e23) - .e102 * .e303 * .e4/.e9) *
.e20)/.e10)/.e40 - 0.5 * (((((.e103 * .e154 +
2 * ((.e271 + (.e294 + 2 * .e277) * .e19/.e10) * .e10 +
.e65 * .e262)) * .e23/.e43 + .e300)/.e43 + .e1/(4 *
.e91)) * .e71 + .e289 * .e116)/.e68)) * .e71 - .e157 *
.e289) * .e6/.e68, q0 = geno_a * ((((((.e272 + .e297 *
.e19/.e10) * .e90 + .e65 * (.e235 + .e299 * .e7/.e10)) *
.e23 - .e129 * .e209/.e40) * .e163 + ((.e105 * .e19 +
.e304 - .e307) * .e163 * .e7 * .e4/.e10 + (1 - (.e163 *
.e7 * .e4/.e298 + .e153)) * .e105) * .e36 * .e37/.e12 -
((0.5 * (.e163 * .e138 * .e23) + 1 - .e153) * .e87 -
.e102 * .e163 * .e303 * .e7/.e9) * .e20/.e10)/.e40 -
0.5 * (((((.e200 * .e103 + 2 * (((.e272 + (.e297 + 2 *
.e276) * .e19/.e10) * .e10 + .e65 * .e261) * .e23))/.e43 +
.e178)/.e43 + .e159/(4 * .e292) + 4 * .e290) * .e71 +
.e284 * .e116) * .e163/.e68)) * .e71 - .e157 * .e284 *
.e163)/.e68, q2 = geno_a * geno_q * (((((.e273 + .e293 *
.e19/.e10) * .e90 + ((.e185 + 0.5 * .e117) * .e7/.e10 +
.e222) * .e65) * .e23 + (((.e207 - .e206) * .e105 + 2 *
(.e190 + (0.5 * .e189 + 0.5 * .e197)/.e70 - ((.e263 -
.e78)/.e9 - 0.25 * .e216) * .e1) - tij * (0.5 * .e195 +
.e301) * .e1) * .e7 * .e4/.e10 + (0.5 - 0.5 * (.e8/.e298)) *
.e105) * .e36 * .e37/.e12 - (.e129 * .e208/.e40 + ((0.5 +
0.5 * .e150) * .e87 - .e102 * (0.5 * .e87 - .e44) * .e7/.e9) *
.e20/.e10))/.e40 - 0.5 * (((((.e188 * .e103 + 2 * (((.e273 +
(.e276 + .e293) * .e19/.e10) * .e10 + .e65 * .e266) *
.e23))/.e43 + .e264)/.e43 + .e159/(8 * .e292) + 2 * .e290) *
.e71 + .e278 * .e116)/.e68)) * .e71 - .e157 * .e278)/.e68,
f0 = geno_a * ((.e65 * (.e257/.e40 + .e93 - .e194) *
.e23 + (2 * (((.e267 - 0.5 * .e305) * .e120 + .e93 -
1) * .e1/.e10 - .e34 * .e120 * .e137/.e70) + tij *
.e120 * .e137 * .e1/.e10) * .e36 * .e37 * .e4/.e12 -
(.e114 * .e120/.e10 + 0.5 * (.e116 * .e257/.e68))) *
.e71 - .e157 * .e257)/.e243, f2 = geno_a * geno_f *
(((.e238/.e40 - .e86) * .e65 * .e23 + (0.5 * (tij *
.e137 * .e1/.e10) + 2 * ((0.5 * (.e267 - 1) -
0.25 * .e305) * .e1/.e10 - .e34 * .e137/(4 *
.e12))) * .e36 * .e37 * .e4/.e12 - (0.5 * (.e238 *
.e116/.e68) + 0.5 * (.e114/.e10))) * .e71 - .e157 *
.e238)/.e243, f1 = geno_a * (((.e65 * (.e252/.e40 +
1) * .e1 * .e23 + .e114)/.e10 - ((2 * ((.e267 - (.e34/.e12 +
t0 * .e1/.e10) * .e1)/.e10) + 2 * (tij * .e5/.e9)) *
.e36 * .e37 * .e4/.e12 + 0.5 * (.e116 * .e252/(.e68 *
.e10))) * .e1) * .e71 - .e157 * .e252 * .e1/.e10)/.e243)
}
d_f_j2_b0_bqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e6 <- b0 + geno_b * (b2 - b0)/2
.e7 <- .e6^2
.e8 <- .e7 * .e3
.e9 <- .e5 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e15 <- geno_f * (f2 - f0)/2
.e16 <- f0 + .e15
.e17 <- .e12/.e11
.e18 <- r0 - .e17
.e19 <- tij - t0
.e20 <- .e16 - f1
.e21 <- 2 * (.e10/.e18)
.e22 <- .e11 + .e21
.e24 <- exp(2 * (.e10 * .e19))
.e25 <- .e5 * .e20
.e26 <- .e4 * .e20
.e27 <- .e22 * .e24
.e28 <- .e16 - m0
.e29 <- .e26/.e10
.e33 <- 2 * (.e25/.e10) - 2 * (.e28 * .e10)
.e35 <- exp(-(t0 * .e10))
.e36 <- exp(tij * .e10)
.e37 <- .e3/.e10
.e38 <- .e11 - .e27
.e39 <- .e27 - .e11
.e41 <- .e29 + f0 + .e15
.e42 <- 4 * .e37
.e43 <- .e22 * .e3
.e44 <- .e7/.e10
.e45 <- 2 * .e10
.e47 <- .e43 * .e19/.e10
.e52 <- 2 * (.e33 * .e35 * .e36/.e12)
.e53 <- 2 * (.e29 - .e16)
.e54 <- .e52 - .e53
.e58 <- .e54 * .e3 - .e41 * .e22 * .e24
.e59 <- 4 * .e47
.e60 <- .e45^2
.e61 <- .e58/.e38
.e63 <- (2/.e18 + .e42)/.e18 + .e59
.e64 <- 0.5 * .e44
.e65 <- .e26/.e9
.e67 <- 2 * (.e3 * .e18)
.e68 <- .e17 + 2 * (.e10/.e39)
.e69 <- .e22 * .e4
.e70 <- .e3^2
.e71 <- yij - .e61
.e72 <- .e33/.e12
.e73 <- .e60 * .e10
.e75 <- 2 * .e72
.e76 <- 2 * (.e25/.e9)
.e77 <- 2 * .e28
.e79 <- .e69 * .e20 * .e3
.e86 <- 0.5 * geno_f
.e90 <- 4 * (tij * .e33) - 2 * (.e75 + 4 * (0.5 * (t0 * .e33) +
4 * (.e25/.e60) + f0 + .e15 - m0))
.e91 <- .e9 * .e10
.e94 <- .e22 * .e7 * .e19/.e10
.e95 <- 0.5 * geno_q
.e96 <- .e76 + .e77
.e97 <- .e61 - .e41
.e98 <- 4 * .e65
.e103 <- .e42 - 2 * (.e63 * .e24 * .e10/.e39)
.e106 <- .e90 * .e35 * .e36/.e12
.e108 <- .e44 - .e12/.e3
.e109 <- .e64 - .e17
.e110 <- 1/.e10
.e112 <- .e97 * .e63 + 8 * (.e79/.e73)
.e113 <- 1 - .e95
.e115 <- .e103/.e39 + .e110
.e116 <- .e106 + .e98
.e117 <- 1 - .e86
.e120 <- 2 * ((.e108 * .e10/.e67 + .e44)/.e18)
.e121 <- 2 * ((.e109 * .e10/.e67 + .e64)/.e18)
.e122 <- 2 * .e37
.e124 <- .e112 * .e24 + .e116 * .e70/.e10
.e125 <- 2 * .e18
.e126 <- 2 + .e120
.e127 <- .e5/.e10
.e129 <- .e94 + 1 + .e121
.e130 <- .e37 + 1/.e125
.e132 <- 1/.e18 + .e122
.e134 <- .e126 + 2 * .e94
.e137 <- 2 * (.e130/.e18)
.e138 <- 2 * (.e132/.e18)
.e139 <- .e124/.e38
.e142 <- 0.5 * (.e115 * .e71/.e68)
.e143 <- .e139 + .e142
.e144 <- .e129 * .e24
.e145 <- .e117 * .e4
.e146 <- .e134 * .e24
.e149 <- .e137 + 2 * .e47
.e150 <- .e138 + .e59
.e151 <- .e42 + 4/.e18
.e152 <- tij - (1/.e12 + t0)
.e153 <- .e145/.e10
.e155 <- 0.5 * (.e4/.e10)
.e157 <- 1 - 0.5 * geno_b
.e161 <- .e113 * .e7
.e164 <- .e69 * .e7 * .e20/.e91
.e165 <- .e79/.e91
.e166 <- .e41 - .e61
.e167 <- .e127 - .e10
.e169 <- 2 * ((.e33 * .e152 - .e96) * .e35 * .e36/.e12) +
2 * .e65
.e171 <- 2 * .e127 - .e45
.e175 <- .e12 * .e10
.e177 <- 0.5 - 0.5 * (.e8/.e9)
.e178 <- 1 - (.e161 * .e3/.e9 + .e95)
.e179 <- .e144 - 1
.e180 <- .e73^2
.e181 <- .e117 * .e171
.e182 <- .e153 + 1
.e183 <- .e43/.e9
.e184 <- .e60/.e10
.e186 <- .e146 - 2
.e187 <- .e25/.e45^4
.e188 <- .e70/.e9
.e189 <- 0.5 * .e96
.e193 <- 0.5 * tij - (0.5 * t0 + 0.5/.e12)
.e194 <- 0.5 + .e155
.e195 <- 1 - .e144
.e196 <- 2 - .e146
.e197 <- 2 * .e96
.e201 <- 2 * tij - (2 * t0 + 2/.e12)
.e203 <- t0 * .e96/.e10
.e204 <- tij * .e96
.e209 <- ((.e65 + 2 * ((.e193 * .e33 - .e189) * .e35 * .e36/.e12)) *
.e7 * .e3/.e10 + 0.5 * .e54 - ((.e129 * .e41 - 0.5 *
.e164) * .e24 + .e58 * .e195/.e38))/.e38
.e217 <- ((2 * ((.e33 * .e201 - .e197) * .e35 * .e36/.e12) +
.e98) * .e70/.e10 - (.e166 * .e150 - 2 * .e165) * .e24)/.e38
.e218 <- (.e169 * .e7 * .e3/.e10 + .e52 - ((.e41 * .e134 -
.e164) * .e24 + .e58 * .e196/.e38 + .e53))/.e38
.e219 <- (.e169 * .e70/.e10 - (.e166 * .e149 - .e165) * .e24)/.e38
.e222 <- .e68 * .e38
.e235 <- (1 + .e121) * .e3
.e237 <- (2 - 4 * (.e4 * .e35 * .e36/.e12)) * .e3 + .e27
.e239 <- (2 * (.e167 * .e35 * .e36/.e12) - 2 * (.e155 - 0.5)) *
.e3 - .e194 * .e22 * .e24
.e244 <- (2 * (.e181 * .e35 * .e36/.e12) - 2 * (.e153 + .e86 -
1)) * .e3 - (.e182 - .e86) * .e22 * .e24
.e248 <- .e44 - .e186 * .e10/.e39
.e249 <- .e37 - .e149 * .e24 * .e10/.e39
.e250 <- .e64 - .e179 * .e10/.e39
.e251 <- .e122 - .e150 * .e24 * .e10/.e39
.e252 <- 4 * (.e177/.e10)
.e253 <- 4 * (.e178/.e10)
.e256 <- .e112 * .e7 * .e19/.e10
.e258 <- .e112 * .e19/.e10
.e262 <- ((.e90 * .e152 - 4 * .e204)/.e10 + 2 * (2 * ((.e72 +
.e76 + .e77)/.e175) + 4 * (0.5 * .e203 + 32 * .e187))) *
.e35 * .e36/.e12 - (.e106 + 12 * .e65)/.e9
.e263 <- .e209 + (.e109/.e11 + 2 * (.e250/.e39)) * .e71/.e68
.e264 <- (.e108 * .e113 * .e151/.e67 + .e253)/.e18
.e267 <- (.e108/.e11 + 2 * (.e248/.e39)) * .e71/.e68 + .e218
.e268 <- (.e109 * .e151/.e67 + .e252)/.e18
.e269 <- .e217 + (.e110 + 2 * (.e251/.e39)) * .e71/.e68
.e270 <- .e219 + (1/.e45 + 2 * (.e249/.e39)) * .e71/.e68
.e271 <- (.e184 + 8 * .e10) * .e22
.e272 <- (.e151/.e125 - 4 * .e188)/.e18
.e273 <- (.e151/.e18 - 8 * .e188)/.e18
.e275 <- .e177 * .e22 + .e235
.e277 <- .e178 * .e22 + .e113 * .e126 * .e3
.e279 <- .e60 * .e18 * .e10
.e282 <- .e4 * .e7 * .e20/.e91
.e284 <- .e26 * .e3/.e91
.e285 <- .e5/.e60
.e286 <- .e3/.e91
.e287 <- .e70/.e91
.e288 <- .e3^3
.e289 <- .e137 - .e183
.e290 <- .e138 - 2 * .e183
.e291 <- 2 * .e116
c(b0 = (((((.e124 * .e150/.e38 + (.e217 + 2 * .e284) * .e63 +
.e97 * (.e273 + 4 * (.e290 * .e3 * .e19))/.e10 + (4 *
.e258 + 8 * ((2 * (.e132/.e279) - (16 * .e10 + 2 * .e184) *
.e22 * .e3/.e180) * .e4 * .e20)) * .e3) * .e24 + (((.e201 *
.e90 - 8 * .e204)/.e10 + 2 * (2 * ((.e75 + .e197)/.e175) +
4 * (64 * .e187 + .e203))) * .e35 * .e36/.e12 - (16 *
.e65 + .e291)/.e9) * .e288/.e10)/.e38 - 0.5 * (((((.e150 *
.e103 + 2 * (.e63 * .e251 + .e273 + (4 * .e63 + 4 * .e290) *
.e3 * .e19)) * .e24/.e39 + 8 * .e287)/.e39 + 2 * .e286) *
.e71 + .e269 * .e115)/.e68)) * .e7 + .e139 + .e142) *
.e71 - .e143 * .e269 * .e7) * .e157^2/.e68, b2 = geno_b *
(((((.e124 * .e149/.e38 + (.e219 + .e284) * .e63 + .e97 *
(.e272 + 4 * (.e289 * .e3 * .e19))/.e10 + (2 * .e258 +
8 * ((2 * (.e130/.e279) - .e271 * .e3/.e180) * .e4 *
.e20)) * .e3) * .e24 + .e262 * .e288/.e10)/.e38 -
0.5 * (((((.e149 * .e103 + 2 * (.e63 * .e249 + .e272 +
(2 * .e63 + 4 * .e289) * .e3 * .e19)) * .e24/.e39 +
4 * .e287)/.e39 + .e286) * .e71 + .e270 * .e115)/.e68)) *
.e7 + 0.5 * .e143) * .e71 - .e143 * .e270 * .e7) *
.e157/.e68, q0 = (((((.e262 * .e7 * .e3 + .e291) * .e3/.e10 -
.e124 * .e196/.e38) * .e113 + (((.e218 + .e282) * .e63 +
2 * .e256 + 8 * ((((.e120 + 4) * .e3 + .e21)/.e73 - .e271 *
.e7 * .e3/.e180) * .e4 * .e20)) * .e113 + (.e264 + 4 *
(.e277 * .e19/.e10)) * .e97) * .e24)/.e38 + 0.5 * ((((.e253 -
(.e186 * .e113 * .e103 + 2 * (((.e264 + (2 * (.e63 *
.e113 * .e7) + 4 * .e277) * .e19/.e10) * .e10 + .e63 *
.e248 * .e113) * .e24))/.e39)/.e39 - .e161/.e91) *
.e71 - .e267 * .e115 * .e113)/.e68)) * .e71 - .e143 *
.e267 * .e113) * .e157 * .e6/.e68, q2 = geno_q * (((((((.e193 *
.e90 - 2 * .e204)/.e10 + 2 * (2 * ((0.5 * .e72 + .e189)/.e175) +
4 * (0.25 * .e203 + 16 * .e187))) * .e35 * .e36/.e12 -
(0.5 * .e116 + .e98)/.e9) * .e7 * .e3 + .e106 + .e98) *
.e3/.e10 + (.e256 + (.e209 + 0.5 * .e282) * .e63 + (.e268 +
4 * (.e275 * .e19/.e10)) * .e97 + 8 * (((.e235 + 0.5 *
.e22)/.e73 - (0.5 * .e184 + 4 * .e10) * .e22 * .e7 *
.e3/.e180) * .e4 * .e20)) * .e24 - .e124 * .e195/.e38)/.e38 +
0.5 * ((((.e252 - (.e179 * .e103 + 2 * ((((.e63 * .e7 +
4 * .e275) * .e19/.e10 + .e268) * .e10 + .e63 * .e250) *
.e24))/.e39)/.e39 - 0.5 * (.e7/.e91)) * .e71 - .e263 *
.e115)/.e68)) * .e71 - .e143 * .e263) * .e157 * .e6/.e68,
f0 = ((((.e244/.e38 + .e86 - .e182) * .e63 + 8 * (.e117 *
.e22 * .e4 * .e3/.e73)) * .e24 + ((4 * (tij * .e117 *
.e171) - 2 * (2 * (.e181/.e12) + 4 * ((0.5 * (t0 *
.e171) + 4 * .e285) * .e117 + 1 - .e86))) * .e35 *
.e36/.e12 + 4 * (.e145/.e9)) * .e70/.e10 - 0.5 *
(.e244 * .e115/.e68)) * .e71 - .e143 * .e244) * .e157 *
.e6/.e222, f2 = geno_f * ((((.e239/.e38 - .e194) *
.e63 + 4 * (.e69 * .e3/.e73)) * .e24 + ((4 * (tij *
.e167) - 2 * (2 * (.e167/.e12) + 4 * (0.5 + 0.5 *
(t0 * .e167) + 2 * .e285))) * .e35 * .e36/.e12 +
2 * (.e4/.e9)) * .e70/.e10 - 0.5 * (.e239 * .e115/.e68)) *
.e71 - .e143 * .e239) * .e157 * .e6/.e222, f1 = ((((.e237/.e38 +
1) * .e63 - 8 * (.e43/.e60)) * .e24 + ((2 * (4 *
(4/.e60 + t0/.e10) + 4/.e175) - 8 * (tij/.e10)) *
.e4 * .e35 * .e36/.e12 - 4/.e9) * .e70 - 0.5 * (.e237 *
.e115/.e68)) * .e71 - .e143 * .e237) * .e157 * .e4 *
.e6/(.e222 * .e10))
}
d_f_j2_b2_bqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e6 <- b0 + geno_b * (b2 - b0)/2
.e7 <- .e6^2
.e8 <- .e7 * .e3
.e9 <- .e5 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e15 <- geno_f * (f2 - f0)/2
.e16 <- .e12/.e11
.e17 <- f0 + .e15
.e18 <- r0 - .e16
.e19 <- tij - t0
.e20 <- .e17 - f1
.e21 <- 2 * (.e10/.e18)
.e22 <- .e11 + .e21
.e24 <- exp(2 * (.e10 * .e19))
.e25 <- .e5 * .e20
.e26 <- .e22 * .e24
.e27 <- .e4 * .e20
.e28 <- .e17 - m0
.e29 <- .e27/.e10
.e33 <- 2 * (.e25/.e10) - 2 * (.e28 * .e10)
.e35 <- exp(-(t0 * .e10))
.e36 <- exp(tij * .e10)
.e37 <- .e3/.e10
.e38 <- .e26 - .e11
.e39 <- .e11 - .e26
.e41 <- .e29 + f0 + .e15
.e42 <- .e7/.e10
.e43 <- 2 * .e37
.e44 <- 2 * .e10
.e49 <- 2 * (.e33 * .e35 * .e36/.e12)
.e50 <- 2 * (.e29 - .e17)
.e51 <- .e22 * .e3
.e52 <- .e49 - .e50
.e55 <- 2 * (.e51 * .e19/.e10)
.e59 <- .e52 * .e3 - .e41 * .e22 * .e24
.e60 <- .e44^2
.e61 <- .e59/.e39
.e63 <- (1/.e18 + .e43)/.e18 + .e55
.e64 <- 0.5 * .e42
.e66 <- 2 * (.e3 * .e18)
.e67 <- .e16 + 2 * (.e10/.e38)
.e68 <- .e27/.e9
.e69 <- .e22 * .e4
.e70 <- 0.5 * geno_f
.e73 <- .e22 * .e7 * .e19/.e10
.e74 <- 0.5 * geno_q
.e75 <- yij - .e61
.e76 <- .e33/.e12
.e77 <- .e60 * .e10
.e78 <- 2 * .e68
.e79 <- .e3^2
.e83 <- .e42 - .e12/.e3
.e84 <- .e64 - .e16
.e86 <- 2 * (.e25/.e9)
.e87 <- 2 * .e28
.e89 <- 2 * (tij * .e33) - 2 * (.e76 + 2 * (0.5 * (t0 * .e33) +
4 * (.e25/.e60) + f0 + .e15 - m0))
.e90 <- 1 - .e74
.e94 <- .e61 - .e41
.e95 <- .e9 * .e10
.e97 <- .e69 * .e20 * .e3
.e99 <- .e86 + .e87
.e100 <- .e43 - 2 * (.e63 * .e24 * .e10/.e38)
.e103 <- .e89 * .e35 * .e36/.e12
.e104 <- 1 - .e70
.e107 <- 2 * ((.e83 * .e10/.e66 + .e42)/.e18)
.e108 <- 2 * ((.e84 * .e10/.e66 + .e64)/.e18)
.e110 <- .e94 * .e63 + 4 * (.e97/.e77)
.e112 <- .e100/.e38 + 0.5/.e10
.e113 <- 2 * .e18
.e114 <- 2 + .e107
.e115 <- .e103 + .e78
.e116 <- .e5/.e10
.e118 <- .e73 + 1 + .e108
.e119 <- .e37 + 1/.e113
.e121 <- .e114 + 2 * .e73
.e123 <- .e110 * .e24 + .e115 * .e79/.e10
.e125 <- 2 * (.e119/.e18)
.e126 <- .e118 * .e24
.e127 <- .e104 * .e4
.e128 <- .e121 * .e24
.e131 <- .e125 + .e55
.e132 <- tij - (1/.e12 + t0)
.e134 <- .e123/.e39 + 0.5 * (.e112 * .e75/.e67)
.e135 <- .e127/.e10
.e137 <- 0.5 * (.e4/.e10)
.e141 <- .e90 * .e7
.e144 <- .e69 * .e7 * .e20/.e95
.e145 <- .e116 - .e10
.e147 <- 2 * ((.e33 * .e132 - .e99) * .e35 * .e36/.e12) +
.e78
.e149 <- 2 * .e116 - .e44
.e150 <- .e43 + 2/.e18
.e155 <- 0.5 - 0.5 * (.e8/.e9)
.e156 <- 1 - (.e141 * .e3/.e9 + .e74)
.e157 <- .e126 - 1
.e158 <- .e104 * .e149
.e159 <- .e135 + 1
.e160 <- .e128 - 2
.e161 <- .e12 * .e10
.e162 <- 0.5 * .e99
.e166 <- 0.5 * tij - (0.5 * t0 + 0.5/.e12)
.e167 <- 0.5 + .e137
.e168 <- 1 - .e126
.e169 <- 2 - .e128
.e174 <- ((.e68 + 2 * ((.e166 * .e33 - .e162) * .e35 * .e36/.e12)) *
.e7 * .e3/.e10 + 0.5 * .e52 - ((.e118 * .e41 - 0.5 *
.e144) * .e24 + .e59 * .e168/.e39))/.e39
.e181 <- (.e147 * .e7 * .e3/.e10 + .e49 - ((.e41 * .e121 -
.e144) * .e24 + .e59 * .e169/.e39 + .e50))/.e39
.e182 <- (.e147 * .e79/.e10 - ((.e41 - .e61) * .e131 - .e97/.e95) *
.e24)/.e39
.e183 <- .e77^2
.e186 <- .e67 * .e39
.e199 <- (1 + .e108) * .e3
.e201 <- (2 - 4 * (.e4 * .e35 * .e36/.e12)) * .e3 + .e26
.e203 <- (2 * (.e145 * .e35 * .e36/.e12) - 2 * (.e137 - 0.5)) *
.e3 - .e167 * .e22 * .e24
.e208 <- (2 * (.e158 * .e35 * .e36/.e12) - 2 * (.e135 + .e70 -
1)) * .e3 - (.e159 - .e70) * .e22 * .e24
.e209 <- .e60/.e10
.e211 <- .e25/.e44^4
.e212 <- .e42 - .e160 * .e10/.e38
.e213 <- .e37 - .e131 * .e24 * .e10/.e38
.e214 <- .e64 - .e157 * .e10/.e38
.e215 <- 2 * (.e155/.e10)
.e216 <- 2 * (.e156/.e10)
.e218 <- t0 * .e99/.e10
.e219 <- tij * .e99
.e222 <- .e110 * .e7 * .e19/.e10
.e226 <- ((.e89 * .e132 - 2 * .e219)/.e10 + 2 * ((.e76 +
.e86 + .e87)/.e161 + 2 * (0.5 * .e218 + 32 * .e211))) *
.e35 * .e36/.e12 - (.e103 + 6 * .e68)/.e9
.e227 <- .e174 + (.e84/.e11 + 2 * (.e214/.e38)) * .e75/.e67
.e228 <- (.e83 * .e90 * .e150/.e66 + .e216)/.e18
.e231 <- (.e83/.e11 + 2 * (.e212/.e38)) * .e75/.e67 + .e181
.e232 <- (.e84 * .e150/.e66 + .e215)/.e18
.e233 <- .e182 + (1/.e44 + 2 * (.e213/.e38)) * .e75/.e67
.e234 <- (.e150/.e113 - 2 * (.e79/.e9))/.e18
.e235 <- (.e209 + 8 * .e10) * .e22
.e237 <- .e155 * .e22 + .e199
.e239 <- .e156 * .e22 + .e90 * .e114 * .e3
.e243 <- .e4 * .e7 * .e20/.e95
.e244 <- .e5/.e60
.e245 <- .e125 - .e51/.e9
c(b2 = geno_b^2 * (((((.e123 * .e131/.e39 + (.e182 + .e27 *
.e3/.e95) * .e63 + .e94 * (.e234 + 2 * (.e245 * .e3 *
.e19))/.e10 + (2 * (.e110 * .e19/.e10) + 4 * ((2 * (.e119/(.e60 *
.e18 * .e10)) - .e235 * .e3/.e183) * .e4 * .e20)) * .e3) *
.e24 + .e226 * .e3^3/.e10)/.e39 - 0.5 * (((((.e131 *
.e100 + 2 * (.e63 * .e213 + .e234 + (2 * .e63 + 2 * .e245) *
.e3 * .e19)) * .e24/.e38 + 2 * (.e79/.e95))/.e38 + 0.5 *
(.e3/.e95)) * .e75 + .e233 * .e112)/.e67)) * .e7 + 0.5 *
.e134) * .e75 - .e134 * .e233 * .e7)/.e67, q0 = geno_b *
(((((.e226 * .e7 * .e3 + 2 * .e115) * .e3/.e10 - .e123 *
.e169/.e39) * .e90 + (((.e181 + .e243) * .e63 + 2 *
.e222 + 4 * ((((.e107 + 4) * .e3 + .e21)/.e77 - .e235 *
.e7 * .e3/.e183) * .e4 * .e20)) * .e90 + (.e228 +
2 * (.e239 * .e19/.e10)) * .e94) * .e24)/.e39 + 0.5 *
((((.e216 - (.e160 * .e90 * .e100 + 2 * (((.e228 +
(2 * (.e63 * .e90 * .e7) + 2 * .e239) * .e19/.e10) *
.e10 + .e63 * .e212 * .e90) * .e24))/.e38)/.e38 -
0.5 * (.e141/.e95)) * .e75 - .e231 * .e112 *
.e90)/.e67)) * .e75 - .e134 * .e231 * .e90) *
.e6/.e67, q2 = geno_b * geno_q * (((((((.e166 * .e89 -
.e219)/.e10 + 2 * ((0.5 * .e76 + .e162)/.e161 + 2 * (0.25 *
.e218 + 16 * .e211))) * .e35 * .e36/.e12 - (0.5 * .e115 +
.e78)/.e9) * .e7 * .e3 + .e103 + .e78) * .e3/.e10 + (.e222 +
(.e174 + 0.5 * .e243) * .e63 + (.e232 + 2 * (.e237 *
.e19/.e10)) * .e94 + 4 * (((.e199 + 0.5 * .e22)/.e77 -
(0.5 * .e209 + 4 * .e10) * .e22 * .e7 * .e3/.e183) *
.e4 * .e20)) * .e24 - .e123 * .e168/.e39)/.e39 + 0.5 *
((((.e215 - (.e157 * .e100 + 2 * ((((.e63 * .e7 + 2 *
.e237) * .e19/.e10 + .e232) * .e10 + .e63 * .e214) *
.e24))/.e38)/.e38 - 0.25 * (.e7/.e95)) * .e75 - .e227 *
.e112)/.e67)) * .e75 - .e134 * .e227) * .e6/.e67,
f0 = geno_b * ((((.e208/.e39 + .e70 - .e159) * .e63 +
4 * (.e104 * .e22 * .e4 * .e3/.e77)) * .e24 + ((2 *
(tij * .e104 * .e149) - 2 * (.e158/.e12 + 2 * ((0.5 *
(t0 * .e149) + 4 * .e244) * .e104 + 1 - .e70))) *
.e35 * .e36/.e12 + 2 * (.e127/.e9)) * .e79/.e10 -
0.5 * (.e208 * .e112/.e67)) * .e75 - .e134 * .e208) *
.e6/.e186, f2 = geno_b * geno_f * ((((.e203/.e39 -
.e167) * .e63 + 2 * (.e69 * .e3/.e77)) * .e24 + ((2 *
(tij * .e145) - 2 * (.e145/.e12 + 2 * (0.5 + 0.5 *
(t0 * .e145) + 2 * .e244))) * .e35 * .e36/.e12 +
.e4/.e9) * .e79/.e10 - 0.5 * (.e203 * .e112/.e67)) *
.e75 - .e134 * .e203) * .e6/.e186, f1 = geno_b *
((((.e201/.e39 + 1) * .e63 - 4 * (.e51/.e60)) * .e24 +
((2 * (2 * (4/.e60 + t0/.e10) + 2/.e161) - 4 *
(tij/.e10)) * .e4 * .e35 * .e36/.e12 - 2/.e9) *
.e79 - 0.5 * (.e201 * .e112/.e67)) * .e75 -
.e134 * .e201) * .e4 * .e6/(.e186 * .e10))
}
d_f_j2_q0_qff1b_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e4^2
.e8 <- .e6 * .e3
.e9 <- .e7 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e16 <- geno_f * (f2 - f0)/2
.e17 <- r0 - .e13
.e18 <- f0 + .e16
.e19 <- tij - t0
.e20 <- .e11 + 2 * (.e10/.e17)
.e21 <- .e18 - f1
.e23 <- exp(2 * (.e10 * .e19))
.e24 <- .e6/.e10
.e25 <- .e7 * .e21
.e26 <- .e20 * .e23
.e27 <- .e11^2
.e29 <- 2 * (.e3 * .e10)
.e30 <- .e18 - m0
.e31 <- .e4 * .e21
.e33 <- .e6/.e29
.e34 <- 2 * (.e12/.e27)
.e35 <- .e31/.e10
.e39 <- 2 * (.e25/.e10) - 2 * (.e30 * .e10)
.e40 <- .e33 - .e34
.e41 <- 2 * .e24
.e42 <- .e20 * .e6
.e44 <- .e42 * .e19/.e10
.e46 <- exp(-(t0 * .e10))
.e47 <- exp(tij * .e10)
.e48 <- .e26 - .e11
.e52 <- 2 * (.e40 * .e10/.e17) + .e41
.e53 <- 2 * .e44
.e55 <- .e35 + f0 + .e16
.e56 <- .e11 - .e26
.e58 <- .e52/.e17 + 2
.e59 <- .e58 + .e53
.e60 <- 2 * .e10
.e65 <- 2 * (.e39 * .e46 * .e47/.e12)
.e66 <- 2 * (.e35 - .e18)
.e67 <- .e60^2
.e68 <- .e65 - .e66
.e72 <- .e68 * .e3 - .e55 * .e20 * .e23
.e73 <- 0.5 * .e24
.e74 <- .e59 * .e23
.e75 <- .e8/.e9
.e76 <- .e3/.e10
.e78 <- 2 * (.e3 * .e17)
.e79 <- .e12/.e3
.e80 <- .e72/.e56
.e81 <- .e13 + 2 * (.e10/.e48)
.e82 <- .e20 * .e4
.e83 <- .e9 * .e10
.e84 <- yij - .e80
.e85 <- .e67 * .e10
.e86 <- 1 - .e75
.e89 <- 2 * (.e25/.e9) + 2 * .e30
.e90 <- .e24 - .e79
.e91 <- .e73 - .e13
.e92 <- .e74 - 2
.e93 <- .e82 * .e6
.e94 <- 2 - .e74
.e95 <- .e93 * .e21
.e101 <- 0.5 * (t0 * .e39) + 4 * (.e25/.e67) + f0 + .e16 -
m0
.e102 <- .e29^2
.e103 <- .e40 * .e39
.e104 <- 2 * .e76
.e109 <- .e90 * .e10/.e78 + .e24
.e112 <- .e91 * .e10/.e78 + .e73
.e115 <- .e20 * .e3 * .e19/.e10
.e116 <- 0.5 * geno_f
.e118 <- .e41 - 2 * (.e92 * .e10/.e48)
.e125 <- 2 * (2 * (.e103 * .e3/.e12) + 2 * (.e101 * .e6/.e10))
.e126 <- 2 * (tij * .e39 * .e6/.e10)
.e127 <- .e76 + 1/(2 * .e17)
.e129 <- 1/.e17 + .e104
.e130 <- .e126 - .e125
.e136 <- 2 * (.e112/.e17)
.e137 <- 2 + 2 * (.e109/.e17)
.e139 <- 4 * (.e95/.e85) - .e59 * .e55
.e142 <- .e118/.e48 + .e33 - .e34
.e143 <- .e86 * .e4
.e144 <- .e31/.e9
.e145 <- 1 - .e116
.e150 <- .e44 + 1 + .e136
.e156 <- .e130 * .e46 * .e47 * .e3/.e12 + .e139 * .e23 -
(.e72 * .e94/.e56 + 2 * (.e143 * .e21/.e10 - .e18))
.e157 <- .e137 + .e53
.e158 <- .e7/.e10
.e159 <- .e8/.e102
.e160 <- .e8/.e10
.e161 <- .e5^4
.e164 <- 2 - 2 * .e75
.e166 <- 2 * (.e127/.e17) + 2 * .e115
.e168 <- 2 * (.e129/.e17) + 4 * .e115
.e169 <- .e150 * .e23
.e170 <- .e157 * .e23
.e171 <- .e161/.e83
.e174 <- tij - (1/.e12 + t0)
.e178 <- .e156/.e56 + 0.5 * (.e142 * .e84/.e81)
.e180 <- 1 - 0.5 * geno_q
.e181 <- .e59 * .e3
.e185 <- .e95/.e83
.e188 <- .e82 * .e21 * .e3/.e83
.e189 <- .e42/.e9
.e190 <- .e3^2
.e192 <- 2 * ((.e39 * .e174 - .e89) * .e46 * .e47/.e12) +
2 * .e144
.e196 <- .e145 * .e4/.e10
.e198 <- .e158 - .e10
.e199 <- .e160 + .e10
.e200 <- 0.5 * (.e4/.e10)
.e202 <- 0.5 * .e160 + 0.5 * .e10
.e203 <- 1/.e11
.e204 <- 1/.e3
.e205 <- 2 * ((.e24 - 2 * .e79)/.e27)
.e206 <- 2 * ((.e73 - .e79)/.e27)
.e208 <- 2 * .e158 - .e60
.e209 <- 2 * .e159
.e210 <- 2/.e27
.e211 <- 4 * .e159
.e212 <- 4/.e27
.e213 <- .e80 - .e55
.e214 <- .e169 - 1
.e215 <- .e85^2
.e218 <- .e40 * .e89
.e219 <- .e127 * .e6
.e226 <- (.e209 + .e210) * .e3
.e227 <- .e67/.e10
.e229 <- .e170 - 2
.e230 <- (.e211 + .e212) * .e3
.e231 <- .e25/.e60^4
.e235 <- 0.5 * tij - (0.5 * t0 + 0.5/.e12)
.e236 <- 1 - .e169
.e237 <- 1 + .e136
.e238 <- 2 - .e170
.e239 <- 2 * (.e199 * .e6/.e102)
.e240 <- 2 * (.e202 * .e6/.e102)
.e241 <- 2 * (.e86/.e10)
.e242 <- 2 * (.e129 * .e6/.e17)
.e243 <- 2 * (.e164/.e10)
.e244 <- 2 * .e171
.e248 <- 2 * tij - (2 * t0 + 2/.e12)
.e250 <- t0 * .e89/.e10
.e251 <- ((.e90 * .e52/.e11 + 2 * (.e109 * .e40 - (.e239 +
.e205) * .e10))/.e17 - .e244)/.e17
.e252 <- ((.e91 * .e52/.e11 + 2 * (.e112 * .e40 - (.e240 +
.e206) * .e10))/.e17 - .e171)/.e17
.e253 <- ((.e52/.e60 + 2 * (.e40 * .e127 + .e203 - .e226))/.e17 +
.e241)/.e17
.e254 <- ((.e52/.e10 + 2 * (.e40 * .e129 + .e204 - .e230))/.e17 +
.e243)/.e17
.e255 <- (.e150 * .e55 - 0.5 * .e185) * .e23
.e258 <- (.e55 * .e157 - .e185) * .e23
.e268 <- .e81 * .e56
.e272 <- (.e144 + 2 * ((.e235 * .e39 - 0.5 * .e89) * .e46 *
.e47/.e12)) * .e6 * .e3/.e10 + 0.5 * .e68
.e275 <- .e86 * .e20 + 2 * (.e219/.e17)
.e277 <- .e196 + 1 - .e116
.e279 <- .e94/.e56 + 0.5 * (.e142/.e81)
.e281 <- .e164 * .e20 + .e242
.e283 <- (2 * ((.e39 * .e248 - 2 * .e89) * .e46 * .e47/.e12) +
4 * .e144) * .e190/.e10
.e287 <- .e192 * .e6 * .e3/.e10 + .e65
.e289 <- .e192 * .e190/.e10
.e296 <- .e24 - .e229 * .e10/.e48
.e297 <- .e76 - .e166 * .e23 * .e10/.e48
.e299 <- .e73 - .e214 * .e10/.e48
.e300 <- 0.5 + .e200
.e301 <- .e237 - 0.5 * .e189
.e302 <- 2 * .e188
.e303 <- .e104 - .e168 * .e23 * .e10/.e48
.e304 <- .e137 - .e189
.e306 <- ((.e213 * .e166 + .e188) * .e23 + .e289)/.e56 +
(1/.e60 + 2 * (.e297/.e48)) * .e84/.e81
.e308 <- ((.e213 * .e168 + .e302) * .e23 + .e283)/.e56 +
(1/.e10 + 2 * (.e303/.e48)) * .e84/.e81
.e309 <- (.e251 + (2 * .e59 + 2 * .e304) * .e6 * .e19/.e10) *
.e23
.e310 <- (.e252 + (.e59 + 2 * .e301) * .e6 * .e19/.e10) *
.e23
.e311 <- .e253 + (2 * .e181 + 2 * .e275) * .e19/.e10
.e312 <- .e254 + (2 * .e281 + 4 * .e181) * .e19/.e10
.e315 <- (.e272 - (.e255 + .e72 * .e236/.e56))/.e56 + (.e91/.e11 +
2 * (.e299/.e48)) * .e84/.e81
.e320 <- (.e90/.e11 + 2 * (.e296/.e48)) * .e84/.e81 + (.e287 -
(.e258 + .e72 * .e238/.e56 + .e66))/.e56
.e323 <- .e181/.e83
.e324 <- .e59/.e83
.e326 <- (.e227 + 8 * .e10) * .e20 * .e6
.e331 <- .e218 * .e6/.e10
.e332 <- .e218 * .e3
.e333 <- .e40/(.e12 * .e10)
.e334 <- .e40/.e12
.e335 <- .e101/.e9
.e338 <- .e143/.e10
.e345 <- (2 - 3 * .e75) * .e4
.e347 <- (2 - 4 * (.e4 * .e46 * .e47/.e12)) * .e3 + .e26
.e349 <- (2 * (.e198 * .e46 * .e47/.e12) - 2 * (.e200 - 0.5)) *
.e3 - .e300 * .e20 * .e23
.e351 <- (2 * (.e145 * .e208 * .e46 * .e47/.e12) - 2 * (.e196 +
.e116 - 1)) * .e3 - .e277 * .e20 * .e23
.e354 <- .e89 * .e6 * .e3/.e10
.e355 <- .e89/.e10
.e356 <- .e39/.e9
.e359 <- .e139 * .e3 * .e19/.e10
.e361 <- .e139 * .e19/.e10
.e362 <- .e7/.e67
.e363 <- 0.5 * .e250
.e364 <- 2 * .e86
.e365 <- 32 * .e231
.e366 <- 4/.e67
c(q0 = ((((((.e324 + 4 * (.e137/.e85 - .e326/.e215)) * .e4 *
.e21 + 2 * .e361) * .e6 - (.e251 + 2 * (.e304 * .e6 *
.e19/.e10)) * .e55) * .e23 + (((.e130 * .e174 - 2 * (tij *
(.e355 + .e356) * .e6)) * .e6/.e10 - 2 * (2 * ((.e103 -
(((.e333 + 2 * (.e199/.e102)) * .e6 + .e205) * .e39 +
.e331) * .e3)/.e12) - 2 * ((.e335 + .e363 + .e365) *
.e161/.e10))) * .e3 + .e126 - .e125) * .e46 * .e47/.e12 +
2 * (.e345 * .e6 * .e21/.e83) - ((.e287 - (.e258 + .e66)) *
.e94 + .e156 * .e238 - (.e309 + .e94 * .e238/.e56) *
.e72)/.e56)/.e56 - 0.5 * (((((.e229 * .e118 + 2 * (.e309 *
.e10 + .e92 * .e296))/.e48 + .e244)/.e48 + .e239 + .e205) *
.e84 + .e320 * .e142)/.e81)) * .e84 - .e320 * .e178) *
.e180^2/.e81, q2 = geno_q * ((((((.e235 * .e130 - 2 *
(tij * (0.5 * .e355 + 0.5 * .e356) * .e6)) * .e6/.e10 -
2 * (2 * ((0.5 * .e103 - (((0.5 * .e333 + 2 * (.e202/.e102)) *
.e6 + .e206) * .e39 + 0.5 * .e331) * .e3)/.e12) -
2 * ((0.25 * .e250 + 0.5 * .e335 + 16 * .e231) *
.e161/.e10))) * .e3 + 0.5 * .e130) * .e46 * .e47/.e12 +
(((0.5 * .e324 + 4 * (.e237/.e85 - (0.5 * .e227 + 4 *
.e10) * .e20 * .e6/.e215)) * .e4 * .e21 + .e361) *
.e6 - (.e252 + 2 * (.e301 * .e6 * .e19/.e10)) * .e55) *
.e23 + 2 * ((0.5 + 0.5 * .e86 - .e75) * .e4 * .e6 *
.e21/.e83) - ((.e272 - .e255) * .e94 + .e156 * .e236 -
(.e310 + .e236 * .e94/.e56) * .e72)/.e56)/.e56 - 0.5 *
(((((.e214 * .e118 + 2 * (.e310 * .e10 + .e92 * .e299))/.e48 +
.e171)/.e48 + .e240 + .e206) * .e84 + .e315 * .e142)/.e81)) *
.e84 - .e315 * .e178) * .e180/.e81, f0 = (((2 * (tij *
.e145 * .e208 * .e6/.e10) - 2 * (2 * (((0.5 * (t0 * .e208) +
4 * .e362) * .e145 + 1 - .e116) * .e6/.e10) + 2 * (.e40 *
.e145 * .e208 * .e3/.e12))) * .e46 * .e47 * .e3/.e12 +
(4 * (.e145 * .e20 * .e4 * .e6/.e85) - .e277 * .e59) *
.e23 - (.e279 * .e351 + 2 * ((.e338 - 1) * .e145))) *
.e84 - .e178 * .e351) * .e180/.e268, f2 = geno_f * (((2 *
(.e93/.e85) - .e59 * .e300) * .e23 + (2 * (tij * .e198 *
.e6/.e10) - 2 * (2 * (.e198 * .e40 * .e3/.e12) + 2 *
((0.5 + 0.5 * (t0 * .e198) + 2 * .e362) * .e6/.e10))) *
.e46 * .e47 * .e3/.e12 + 1 - (.e279 * .e349 + .e338)) *
.e84 - .e178 * .e349) * .e180/.e268, f1 = (((2 * ((2 *
((.e366 + t0/.e10) * .e6) + 4 * (.e40 * .e3/.e12))/.e10) -
4 * (tij * .e6/.e9)) * .e4 * .e46 * .e47 * .e3/.e12 +
(.e364 - (.e279 * .e347 + (.e20 * (.e366 - 2 * (.e19/.e10)) *
.e6 - .e58) * .e23))/.e10) * .e84 - .e178 * .e347/.e10) *
.e180 * .e4/.e268, b0 = (((((.e130 * .e248 * .e3 + 2 *
(tij * (.e164 * .e39 - 2 * .e354)) - 2 * (2 * (((.e204 -
(2 * .e334 + .e211 + .e212) * .e3) * .e39 - 2 * .e332) *
.e3/.e12) + 2 * (.e101 * .e164 - (64 * .e231 + .e250) *
.e6 * .e3))) * .e46 * .e47/.e12 + 2 * ((2 + .e364 - 4 *
.e75) * .e4 * .e21/.e9)) * .e3/.e10 + ((2 * .e323 + 4 *
((.e242 + 2 * .e20)/.e85 - (16 * .e10 + 2 * .e227) *
.e20 * .e6 * .e3/.e215)) * .e4 * .e21 + 4 * .e359 -
(.e254 + 2 * (.e281 * .e19/.e10)) * .e55) * .e23 - ((.e283 -
(.e55 * .e168 - .e302) * .e23) * .e94 - ((.e312 - .e94 *
.e168/.e56) * .e72 + .e156 * .e168) * .e23)/.e56)/.e56 +
0.5 * ((((.e204 - .e230)/.e10 + (.e243 - (.e168 * .e118 *
.e23 + 2 * (.e312 * .e23 * .e10 + .e92 * .e303))/.e48)/.e48) *
.e84 - .e308 * .e142)/.e81)) * .e84 - .e308 * .e178) *
(1 - 0.5 * geno_b) * .e180 * .e5/.e81, b2 = geno_b *
(((((.e323 + 4 * (((2 * .e219 + .e60)/.e17 + .e11)/.e85 -
.e326 * .e3/.e215)) * .e4 * .e21 + 2 * .e359 - (.e253 +
2 * (.e275 * .e19/.e10)) * .e55) * .e23 + ((.e130 *
.e3 * .e174 + 2 * (tij * (.e86 * .e39 - .e354)) -
2 * (2 * (((.e203 - (.e334 + .e209 + .e210) * .e3) *
.e39 - .e332) * .e3/.e12) + 2 * (.e101 * .e86 -
(.e363 + .e365) * .e6 * .e3))) * .e46 * .e47/.e12 +
2 * (.e345 * .e21/.e9)) * .e3/.e10 - ((.e289 - (.e55 *
.e166 - .e188) * .e23) * .e94 - ((.e311 - .e94 *
.e166/.e56) * .e72 + .e156 * .e166) * .e23)/.e56)/.e56 +
0.5 * ((((.e203 - .e226)/.e10 + (.e241 - (.e166 *
.e118 * .e23 + 2 * (.e311 * .e23 * .e10 + .e92 *
.e297))/.e48)/.e48) * .e84 - .e306 * .e142)/.e81)) *
.e84 - .e306 * .e178) * .e180 * .e5/.e81)
}
d_f_j2_q2_qff1b_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e4^2
.e8 <- .e6 * .e3
.e9 <- .e7 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e17 <- geno_f * (f2 - f0)/2
.e18 <- f0 + .e17
.e19 <- tij - t0
.e20 <- .e11 + 2 * (.e10/.e14)
.e22 <- exp(2 * (.e10 * .e19))
.e23 <- .e18 - f1
.e24 <- .e20 * .e22
.e25 <- .e7 * .e23
.e26 <- .e6/.e10
.e27 <- .e11^2
.e29 <- 2 * (.e3 * .e10)
.e30 <- .e4 * .e23
.e31 <- .e18 - m0
.e34 <- .e6/.e29 - 2 * (.e12/.e27)
.e35 <- .e30/.e10
.e39 <- 2 * (.e25/.e10) - 2 * (.e31 * .e10)
.e41 <- .e24 - .e11
.e42 <- exp(-(t0 * .e10))
.e43 <- exp(tij * .e10)
.e44 <- .e20 * .e6
.e47 <- .e34 * .e10/.e14 + .e26
.e49 <- .e44 * .e19/.e10
.e51 <- .e35 + f0 + .e17
.e52 <- .e11 - .e24
.e55 <- .e47/.e14 + .e49 + 1
.e56 <- 2 * .e10
.e57 <- 0.5 * .e26
.e63 <- 2 * (.e39 * .e42 * .e43/.e12) - 2 * (.e35 - .e18)
.e64 <- .e56^2
.e68 <- .e63 * .e3 - .e51 * .e20 * .e22
.e69 <- .e3/.e10
.e70 <- .e55 * .e22
.e71 <- .e68/.e52
.e72 <- .e13 + 2 * (.e10/.e41)
.e73 <- .e57 - .e13
.e74 <- yij - .e71
.e75 <- .e8/.e9
.e76 <- 2 * .e69
.e77 <- .e70 - 1
.e80 <- .e73 * .e10/(2 * (.e3 * .e14)) + .e57
.e83 <- .e20 * .e3 * .e19/.e10
.e85 <- 0.5 * geno_f
.e86 <- 1 - .e70
.e88 <- 2 * (.e25/.e9) + 2 * .e31
.e90 <- 2 * (.e24/.e64)
.e92 <- .e3/.e9 + .e90
.e93 <- .e69 + 1/(2 * .e14)
.e95 <- 1/.e14 + .e76
.e98 <- .e92 * .e6
.e99 <- .e29^2
.e101 <- .e26 - 2 * (.e77 * .e10/.e41)
.e106 <- 0.5 * (t0 * .e39) + 4 * (.e25/.e64) + f0 + .e17 -
m0
.e108 <- .e9 * .e10
.e109 <- .e98 - 1
.e110 <- 2 * (.e80/.e14)
.e116 <- .e101/.e41 + 0.5 * .e34
.e117 <- .e30/.e9
.e122 <- tij * .e39 * .e6/.e10 - 2 * (.e34 * .e39 * .e3/.e12 +
.e106 * .e6/.e10)
.e124 <- .e49 + 1 + .e110
.e125 <- 1 - .e85
.e127 <- .e42 * .e43 * .e3
.e128 <- .e109 * .e4
.e131 <- .e7/.e10
.e133 <- 2 * (.e93/.e14)
.e134 <- 2 * (.e95/.e14)
.e135 <- 2 * (.e8/.e99)
.e136 <- 2/.e27
.e145 <- .e128 * .e23/.e10 + .e127 * .e122/.e12 + f0 + .e17 -
(.e55 * .e51 * .e22 + .e68 * .e86/.e52)
.e146 <- .e20 * .e4
.e147 <- 1 - .e75
.e148 <- 2 - 2 * .e75
.e149 <- .e133 + 2 * .e83
.e150 <- .e134 + 4 * .e83
.e151 <- .e135 + .e136
.e152 <- .e124 * .e22
.e153 <- .e151 * .e3
.e154 <- .e3^2
.e156 <- .e145/.e52 + 0.5 * (.e116 * .e74/.e72)
.e159 <- .e146 * .e23 * .e3/.e108
.e160 <- .e5^4
.e165 <- .e125 * .e4/.e10
.e167 <- .e131 - .e10
.e168 <- .e19/.e10
.e169 <- 0.5 * (.e4/.e10)
.e170 <- 1/.e11
.e171 <- 1/.e3
.e173 <- 2 * ((0.5 * (.e8/.e10) + 0.5 * .e10) * .e6/.e99) +
2 * ((.e57 - .e12/.e3)/.e27)
.e175 <- 2 * .e131 - .e56
.e176 <- .e55 * .e3
.e177 <- .e71 - .e51
.e178 <- .e152 - 1
.e179 <- .e147/.e10
.e180 <- .e148/.e10
.e182 <- 0.5 * (.e160/.e108)
.e186 <- 0.5 * tij - (0.5 * t0 + 0.5/.e12)
.e187 <- 1 - .e152
.e190 <- 2 * .e153
.e191 <- 2 * .e117
.e195 <- 2 * tij - (2 * t0 + 2/.e12)
.e196 <- tij - (1/.e12 + t0)
.e197 <- ((.e47 * .e73/.e11 + .e80 * .e34 - .e173 * .e10)/.e14 -
.e182)/.e14
.e198 <- ((.e47/.e56 + .e34 * .e93 + .e170 - .e153)/.e14 +
.e179)/.e14
.e199 <- ((.e47/.e10 + .e34 * .e95 + .e171 - .e190)/.e14 +
.e180)/.e14
.e200 <- (.e124 * .e51 - 0.5 * (.e146 * .e6 * .e23/.e108)) *
.e22
.e213 <- .e72 * .e52
.e217 <- (.e117 + 2 * ((.e186 * .e39 - 0.5 * .e88) * .e42 *
.e43/.e12)) * .e6 * .e3/.e10 + 0.5 * .e63
.e218 <- .e51 * .e19
.e219 <- .e34 * .e88
.e223 <- .e86/.e52 + 0.5 * (.e116/.e72)
.e224 <- .e147 * .e20
.e226 <- .e165 + 1 - .e85
.e230 <- .e148 * .e20 + 2 * (.e95 * .e6/.e14)
.e232 <- (2 * ((.e39 * .e195 - 2 * .e88) * .e42 * .e43/.e12) +
4 * .e117) * .e154/.e10
.e234 <- (2 * ((.e39 * .e196 - .e88) * .e42 * .e43/.e12) +
.e191) * .e154/.e10
.e242 <- .e25/.e56^4
.e243 <- .e69 - .e149 * .e22 * .e10/.e41
.e244 <- .e57 - .e178 * .e10/.e41
.e245 <- 0.5 + .e169
.e246 <- 2 * (.e93 * .e6/.e14)
.e247 <- 2 * .e159
.e248 <- .e76 - .e150 * .e22 * .e10/.e41
.e250 <- t0 * .e88/.e10
.e251 <- (.e197 + ((.e47 + 2 * .e80)/.e14 + (.e168 - 0.5/.e9) *
.e20 * .e6 + 2) * .e6 * .e19/.e10) * .e22
.e253 <- ((.e177 * .e149 + .e159) * .e22 + .e234)/.e52 +
(1/.e56 + 2 * (.e243/.e41)) * .e74/.e72
.e255 <- ((.e177 * .e150 + .e247) * .e22 + .e232)/.e52 +
(1/.e10 + 2 * (.e248/.e41)) * .e74/.e72
.e256 <- .e198 + (.e224 + 2 * .e176 + .e246) * .e19/.e10
.e257 <- .e199 + (.e230 + 4 * .e176) * .e19/.e10
.e260 <- (.e217 - (.e200 + .e68 * .e187/.e52))/.e52 + (.e73/.e11 +
2 * (.e244/.e41)) * .e74/.e72
.e267 <- .e219 * .e3
.e268 <- .e34/.e12
.e278 <- (2 - 4 * (.e4 * .e42 * .e43/.e12)) * .e3 + .e24
.e280 <- (2 * (.e167 * .e42 * .e43/.e12) - 2 * (.e169 - 0.5)) *
.e3 - .e245 * .e20 * .e22
.e282 <- (2 * (.e125 * .e175 * .e42 * .e43/.e12) - 2 * (.e165 +
.e85 - 1)) * .e3 - .e226 * .e20 * .e22
.e285 <- .e88 * .e6 * .e3/.e10
.e286 <- .e7/.e64
.e287 <- .e154/.e9^2
.e288 <- 4/.e64
c(q2 = geno_q^2 * (((((.e186 * .e6 * .e3/.e10 + 0.5) * .e122 -
(2 * ((.e34 * (0.5 - 0.5 * (.e8/(.e12 * .e10))) * .e39 -
(.e173 * .e39 + 0.5 * (.e219 * .e6/.e10)) * .e3)/.e12 -
(0.25 * .e250 + 0.5 * (.e106/.e9) + 16 * .e242) *
.e160/.e10) + tij * (0.5 * (.e88/.e10) + 0.5 *
(.e39/.e9)) * .e160/.e10) * .e3) * .e42 * .e43/.e12 +
((0.5 - (.e75 + 0.5 * .e109))/.e9 + 2 * (((.e168 - .e288) *
.e20 * .e6 + 1 + .e110) * .e22/.e64)) * .e4 * .e6 *
.e23/.e10 - (((.e197 + (1 + .e110 - 0.5 * (.e44/.e9)) *
.e6 * .e19/.e10) * .e51 + .e55 * (.e218 - 0.5 * .e117) *
.e6/.e10) * .e22 + (.e145 * .e187 + (.e217 - .e200) *
.e86 - (.e251 + .e86 * .e187/.e52) * .e68)/.e52))/.e52 -
0.5 * (((((.e178 * .e101 + 2 * (.e251 * .e10 + .e77 *
.e244))/.e41 + .e182)/.e41 + 0.5 * .e173) * .e74 +
.e260 * .e116)/.e72)) * .e74 - .e156 * .e260)/.e72,
f0 = geno_q * ((.e109 * .e125 * .e4/.e10 + 1 + .e127 *
(tij * .e125 * .e175 * .e6/.e10 - 2 * (((0.5 * (t0 *
.e175) + 4 * .e286) * .e125 + 1 - .e85) * .e6/.e10 +
.e34 * .e125 * .e175 * .e3/.e12))/.e12 - (.e55 *
.e226 * .e22 + .e223 * .e282 + .e85)) * .e74 - .e156 *
.e282)/.e213, f2 = geno_f * geno_q * ((0.5 * (.e128/.e10 +
1) + .e127 * (tij * .e167 * .e6/.e10 - 2 * (.e167 *
.e34 * .e3/.e12 + (0.5 + 0.5 * (t0 * .e167) + 2 *
.e286) * .e6/.e10))/.e12 - (.e55 * .e245 * .e22 +
.e223 * .e280)) * .e74 - .e156 * .e280)/.e213, f1 = geno_q *
(((2 * (((.e288 + t0/.e10) * .e6 + 2 * (.e34 * .e3/.e12))/.e10) -
2 * (tij * .e6/.e9)) * .e4 * .e42 * .e43 * .e3/.e12 -
(.e223 * .e278 + .e98 - (.e70 + 1))/.e10) * .e74 -
.e156 * .e278/.e10) * .e4/.e213, b0 = geno_q *
((((((2 * ((.e20 * (4 * .e168 - 16/.e64) * .e3 +
.e134) * .e22/.e64) - 4 * .e287) * .e6 + 2 *
.e92 - 2 * (.e109 * .e3/.e9)) * .e4 * .e23 +
(.e195 * .e3 * .e122 + tij * (.e148 * .e39 -
2 * .e285) - 2 * ((((.e171 - (2 * .e268 + 2 *
.e151) * .e3) * .e39 - 2 * .e267)/.e12 - (64 *
.e242 + .e250) * .e6) * .e3 + .e106 * .e148)) *
.e42 * .e43 * .e3/.e12)/.e10 - (((.e199 + .e230 *
.e19/.e10) * .e51 + .e55 * (4 * .e218 - .e191) *
.e3/.e10) * .e22 + ((.e232 - (.e51 * .e150 -
.e247) * .e22) * .e86 - ((.e257 - .e86 * .e150/.e52) *
.e68 + .e145 * .e150) * .e22)/.e52))/.e52 + 0.5 *
((((.e180 - (.e101 * .e150 * .e22 + 2 * (.e257 *
.e22 * .e10 + .e77 * .e248))/.e41)/.e41 + 0.5 *
((.e171 - .e190)/.e10)) * .e74 - .e255 * .e116)/.e72)) *
.e74 - .e255 * .e156) * (1 - 0.5 * geno_b) *
.e5/.e72, b2 = geno_b * geno_q * ((((((2 - .e98) *
.e3/.e9 + (2 * (((2 * .e168 - 8/.e64) * .e20 * .e3 +
.e133) * .e22/.e64) - 2 * .e287) * .e6 + .e90) *
.e4 * .e23 + (.e3 * .e196 * .e122 + tij * (.e147 *
.e39 - .e285) - 2 * ((((.e170 - (.e268 + .e135 +
.e136) * .e3) * .e39 - .e267)/.e12 - (0.5 * .e250 +
32 * .e242) * .e6) * .e3 + .e106 * .e147)) * .e42 *
.e43 * .e3/.e12)/.e10 - (((.e198 + (.e224 + .e246) *
.e19/.e10) * .e51 + .e55 * (2 * .e218 - .e117) *
.e3/.e10) * .e22 + ((.e234 - (.e51 * .e149 - .e159) *
.e22) * .e86 - ((.e256 - .e86 * .e149/.e52) * .e68 +
.e145 * .e149) * .e22)/.e52))/.e52 + 0.5 * ((((.e179 -
(.e101 * .e149 * .e22 + 2 * (.e256 * .e22 * .e10 +
.e77 * .e243))/.e41)/.e41 + 0.5 * ((.e170 - .e153)/.e10)) *
.e74 - .e253 * .e116)/.e72)) * .e74 - .e253 * .e156) *
.e5/.e72)
}
d_f_j2_f0_ff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e7 <- sqrt(.e5 + 2 * ((b0 + geno_b * (b2 - b0)/2)^2 * .e3))
.e8 <- 2 * .e3
.e9 <- .e4 + .e7
.e10 <- .e9/.e8
.e11 <- .e8 + 2 * (.e7/(r0 - .e10))
.e13 <- exp(2 * (.e7 * (tij - t0)))
.e14 <- .e4/.e7
.e15 <- 0.5 * geno_f
.e16 <- .e11 * .e13
.e18 <- 1 - .e15
.e19 <- exp(-(t0 * .e7))
.e20 <- exp(tij * .e7)
.e23 <- 2 * (.e5/.e7) - 2 * .e7
.e26 <- .e23 * .e19 * .e20/.e9
.e27 <- (.e10 + 2 * (.e7/(.e16 - .e8))) * (.e8 - .e16)^2
.e31 <- (2 * .e26 - 2 * (.e14 - 1)) * .e3 - (.e14 + 1) *
.e11 * .e13
.e33 <- .e18 * .e4/.e7
.e34 <- 0.5 * .e14
c(f0 = -(((2 * (.e18 * .e23 * .e19 * .e20/.e9) - 2 * (.e33 +
.e15 - 1)) * .e3 - (.e33 + 1 - .e15) * .e11 * .e13) *
.e31 * .e18/.e27), f2 = -(geno_f * ((.e26 - 2 * (.e34 -
0.5)) * .e3 - (0.5 + .e34) * .e11 * .e13) * .e31 * .e18/.e27),
f1 = .e31 * ((4 * (.e4 * .e19 * .e20/.e9) - 2) * .e3 -
.e16) * .e18 * .e4/(.e27 * .e7))
}
d_f_j2_f2_ff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e7 <- sqrt(.e5 + 2 * ((b0 + geno_b * (b2 - b0)/2)^2 * .e3))
.e8 <- 2 * .e3
.e9 <- .e4 + .e7
.e10 <- .e9/.e8
.e11 <- .e8 + 2 * (.e7/(r0 - .e10))
.e13 <- exp(2 * (.e7 * (tij - t0)))
.e14 <- .e4/.e7
.e15 <- .e11 * .e13
.e17 <- exp(-(t0 * .e7))
.e18 <- exp(tij * .e7)
.e21 <- (2 * (.e5/.e7) - 2 * .e7) * .e17 * .e18/.e9
.e23 <- (.e21 + 1 - .e14) * .e3 - 0.5 * ((.e14 + 1) * .e11 *
.e13)
.e24 <- (.e10 + 2 * (.e7/(.e15 - .e8))) * (.e8 - .e15)^2
.e25 <- 0.5 * .e14
c(f2 = -(geno_f^2 * ((.e21 - 2 * (.e25 - 0.5)) * .e3 - (0.5 +
.e25) * .e11 * .e13) * .e23/.e24), f1 = geno_f * .e23 *
((4 * (.e4 * .e17 * .e18/.e9) - 2) * .e3 - .e15) * .e4/(.e24 *
.e7))
}
d_f_j2_f1_f1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, m0, r0, tij, yij,
t0, geno_a, geno_b, geno_q, geno_f)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e6 <- .e5 + 2 * ((b0 + geno_b * (b2 - b0)/2)^2 * .e3)
.e7 <- sqrt(.e6)
.e8 <- 2 * .e3
.e9 <- .e4 + .e7
.e10 <- .e9/.e8
.e11 <- (.e8 + 2 * (.e7/(r0 - .e10))) * exp(2 * (.e7 * (tij -
t0)))
.e16 <- 4 * (.e4 * exp(-(t0 * .e7)) * exp(tij * .e7)/.e9)
((2 - .e16) * .e3 + .e11) * ((.e16 - 2) * .e3 - .e11) * .e5/((.e10 +
2 * (.e7/(.e11 - .e8))) * (.e8 - .e11)^2 * .e6^1)
}
deriv_mu_int_a0_abqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_a * (a2 - a0)/2
.e4 <- a0 + .e3
.e7 <- geno_q * (q2 - q0)/2 + q0
.e8 <- .e4^2
.e9 <- b0 + geno_b * (b2 - b0)/2
.e10 <- .e9^2
.e11 <- .e10 * .e7
.e12 <- .e8 + 2 * .e11
.e13 <- sqrt(.e12)
.e14 <- 2 * .e7
.e15 <- .e4 + .e13
.e16 <- .e15/.e14
.e17 <- r0 - .e16
.e20 <- geno_f * (f2 - f0)/2
.e21 <- f0 + .e20
.e22 <- 2 * (.e13/.e17)
.e23 <- .e4/.e13
.e24 <- .e14 + .e22
.e25 <- .e21 - f1
.e26 <- tij - t0
.e27 <- .e7 * .e17
.e28 <- .e23 + 1
.e29 <- .e21 - m0
.e30 <- .e8 * .e25
.e32 <- exp(2 * (.e13 * .e26))
.e35 <- 0.5 * geno_a
.e37 <- 2 * (.e30/.e13) - 2 * (.e29 * .e13)
.e38 <- 2 * .e13
.e40 <- .e28 * .e13/.e27
.e41 <- 2 * .e23
.e42 <- .e40 + .e41
.e43 <- 1 - .e35
.e45 <- .e14 - .e24 * .e32
.e46 <- t0 * .e13
.e47 <- .e42/.e17
.e48 <- .e8/.e12
.e49 <- .e38^2
.e50 <- .e10/.e13
.e51 <- .e24 * .e4
.e53 <- exp(-.e46)
.e54 <- 2 * .e27
.e56 <- .e51 * .e26/.e13
.e57 <- t0 * .e24
.e59 <- .e57 * .e4/.e13
.e60 <- .e47 - 2 * .e59
.e61 <- 2 * .e56
.e62 <- .e47 + .e61
.e63 <- 4 * .e48
.e64 <- t0 * .e37
.e65 <- 8 - .e63
.e66 <- .e43 * .e4
.e67 <- 0.5 * .e64
.e71 <- 2 * (.e67 + f0 + .e20 - m0)
.e73 <- .e66/.e13
.e74 <- 0.5 * .e23
.e75 <- exp(-(2 * .e46))
.e77 <- .e65 * .e25/2
.e79 <- .e27/.e38 + 0.5
.e81 <- .e7/.e45 - 0.5
.e83 <- .e77 - .e71
.e84 <- exp(-(tij * .e13))
.e85 <- 0.5 * .e50
.e86 <- .e43 * .e8
.e89 <- .e83 * .e4/.e13 - .e28 * .e37/.e15
.e90 <- .e7/.e13
.e91 <- .e62 * .e32
.e93 <- .e86/.e12 + .e35
.e94 <- .e45^2
.e95 <- .e24 * .e49
.e97 <- (-.e22)^2
.e98 <- 2 * .e29
.e99 <- 1 - .e93
.e100 <- .e97 * .e17
.e102 <- .e73 + 1 - .e35
.e103 <- 0.5 + .e74
.e104 <- .e30/.e12
.e105 <- 2 * .e104
.e106 <- t0 * .e79
.e107 <- tij * .e81
.e109 <- .e50 - .e15/.e7
.e110 <- .e85 - .e16
.e111 <- .e42 * .e7
.e112 <- .e12 * .e13
.e114 <- .e24 * .e15^2 * .e75
.e115 <- .e106 * .e4
.e117 <- .e107 * .e4/.e13
.e124 <- .e111/.e100 + .e115/.e13
.e128 <- 2 * (.e60 * .e13) + 4 * (.e51/.e13)
.e130 <- 4 * .e89 - 2 * (.e60 * .e37/.e24)
.e131 <- .e117 - .e91 * .e7/.e94
.e132 <- .e4 * .e10
.e133 <- .e105 + .e98
.e134 <- .e4 * .e7
.e135 <- .e25^2
.e136 <- 0.5 * .e48
.e137 <- .e53^2
.e139 <- .e124 * .e53 + .e84 * .e131
.e140 <- 2 * .e90
.e142 <- (-(4 * (.e12/.e17)))^2
.e145 <- .e102 * .e13/.e54 + .e73
.e148 <- .e103 * .e13/.e54 + .e74
.e149 <- .e90 + 1/(2 * .e17)
.e151 <- 1/.e17 + .e140
.e152 <- .e24 * .e10
.e153 <- .e24 * .e7
.e154 <- 32 * .e37
.e155 <- .e142 * .e17
.e156 <- (2 * (.e45 * .e13))^2
.e158 <- .e79 * .e53 + .e81 * .e84
.e161 <- .e109 * .e13/.e54 + .e50
.e164 <- .e110 * .e13/.e54 + .e85
.e165 <- 0.5 * geno_q
.e168 <- .e99 * .e4
.e169 <- .e128 * .e37
.e170 <- .e45 * .e4
.e172 <- 2 * (.e164/.e17)
.e173 <- 2 + 2 * (.e161/.e17)
.e177 <- (32 * .e89 - 64 * (.e169 * .e13/.e95)) * .e4 + .e154
.e178 <- .e132/.e112
.e179 <- .e170/.e13
.e182 <- 2 * (.e8/.e13) - .e38
.e184 <- t0 * .e49/.e13
.e188 <- .e168 * .e135/.e49
.e191 <- 2 * (.e42 * .e13) + 4 * .e4
.e193 <- 2 * .e179 - 2 * (.e91 * .e13)
.e195 <- .e152 * .e26/.e13
.e197 <- .e153 * .e26/.e13
.e198 <- .e132/.e12
.e199 <- .e134/.e112
.e200 <- .e134/.e12
.e201 <- 0.5 - .e136
.e202 <- 0.5 * geno_f
.e203 <- 1 - .e165
.e205 <- .e43 * .e24
.e207 <- 2 * (.e149/.e17)
.e208 <- 2 * (.e151/.e17)
.e209 <- 64 * .e188
.e210 <- .e139 * .e37
.e216 <- (2 * (.e37 * .e53 * .e7/.e15))^2
.e217 <- .e24 * .e75
.e218 <- 1 - .e202
.e220 <- 2 * (.e43 * .e37 * .e130 * .e137 * .e7/.e114) +
.e209
.e221 <- .e158 * .e177
.e223 <- .e17/.e38 + 1/.e45
.e225 <- .e221 - 32 * (.e210 * .e4)
.e226 <- .e99/.e49
.e227 <- .e152/.e12
.e228 <- .e153/.e12
.e229 <- 1 - .e48
.e230 <- 1 + .e172
.e234 <- .e191/.e155 + .e193/.e156
.e236 <- .e95 * .e15 * .e75
.e237 <- 2 * (.e145/.e17)
.e238 <- 2 * (.e148/.e17)
.e239 <- 2 * .e12
.e240 <- (.e4 * .e25/.e38)^2
.e242 <- .e109/2 + .e16
.e243 <- .e110/2
.e245 <- .e205 * .e4
.e249 <- 2 * ((1 - .e136) * .e25) + m0 - .e21
.e250 <- 2 * ((2 - .e48) * .e25)
.e251 <- .e99/.e13
.e252 <- .e250 - .e98
.e254 <- 8 - 2 * .e184
.e255 <- .e62 * .e10
.e256 <- .e62 * .e7
.e257 <- .e145 * .e28
.e258 <- .e148 * .e28
.e259 <- (.e195 + 1 + .e172) * .e32
.e261 <- .e28 * (.e50 - (r0 - .e242) * .e13/.e27)
.e263 <- .e28 * .e149 - .e200
.e264 <- .e28 * (.e85 - (0.5 * .e17 - .e243) * .e13/.e27)
.e266 <- .e28 * .e151 - 2 * .e200
.e271 <- .e86/.e12^2
.e273 <- .e216/.e217 + 32 * (.e240 * .e7)
.e275 <- .e37 * .e4/.e12
.e276 <- .e37/.e15
.e277 <- .e56 + .e238
.e278 <- (.e173 + 2 * .e195) * .e32
.e279 <- 0.5 * .e198
.e280 <- .e237 + 2 * (.e245 * .e26/.e13)
.e281 <- .e207 + 2 * .e197
.e282 <- 2 * (.e201/.e13)
.e283 <- 2 * .e251
.e284 <- .e208 + 4 * .e197
.e285 <- 2 * .e178
.e286 <- 2 * .e199
.e287 <- 4 * .e199
.e289 <- t0 * .e133/.e13
.e290 <- .e100^2
.e291 <- .e155^2
.e292 <- .e91 + .e42 * .e45/.e38
.e294 <- .e114^2
.e295 <- .e277 * .e32
.e296 <- .e217^2
.e297 <- .e229 * .e43
.e298 <- .e280 * .e32
.e299 <- .e281 * .e32
.e300 <- .e284 * .e32
.e301 <- .e45 * .e10
.e302 <- .e45 * .e7
.e303 <- .e24 * (4 - .e184)
.e304 <- .e24 * .e254
.e305 <- .e65/2
.e306 <- .e27/.e12
.e308 <- 0.5 * .e83
.e309 <- 1 - .e259
.e310 <- .e230 - 0.5 * .e227
.e311 <- 2 - .e278
.e312 <- .e207 - .e228
.e313 <- .e208 - 2 * .e228
.e314 <- .e173 - .e227
.e316 <- 32 * (.e89 * .e4) + .e154
.e317 <- 8 * .e226
.e319 <- t0 * .e124 * .e53
.e321 <- tij * .e84 * .e131
.e322 <- ((.e42 * .e109/2 + .e261 - .e198)/.e27 - .e285)/.e17
.e323 <- ((.e42 * .e110/2 + .e264 - .e279)/.e27 - .e178)/.e17
.e325 <- (.e257 + .e42 * .e102/2 + 1 - .e93)/.e27 + .e283
.e326 <- (.e263/.e7 + .e42/.e38)/.e17
.e327 <- (.e266/.e7 + .e42/.e13)/.e17
.e329 <- (.e42 * .e103/2 + .e258 + 0.5 - .e136)/.e27 + .e282
.e330 <- t0 * .e130
.e331 <- t0 * .e4
.e332 <- .e325/.e17
.e333 <- (.e326 - .e286)/.e17
.e334 <- (.e327 - .e287)/.e17
.e335 <- .e329/.e17
.e336 <- .e60 * .e133
.e338 <- .e62 * .e43 * .e4
.e339 <- .e62 * .e4
.e343 <- ((.e276 + .e105 + .e98) * .e28 + .e275)/.e15 + (((.e63 -
.e305) * .e25 + .e71)/.e12 + .e289) * .e4
.e347 <- .e201 * .e24 + 2 * (.e148 * .e4/.e17)
.e349 <- .e297 * .e24 + 2 * (.e145 * .e4/.e17)
.e352 <- .e43 * .e252 * .e4/.e13
.e353 <- .e43 * .e45
.e354 <- .e310 * .e4
.e355 <- .e312 * .e4
.e357 <- .e249 * .e4/.e13
.e358 <- .e313 * .e4
.e359 <- .e133 * .e130
.e360 <- .e302/.e12
.e361 <- .e38^3
.e362 <- .e314 * .e4
.e363 <- .e15 * .e13
.e364 <- 0.5 * .e133
.e366 <- 2 * .e271 - .e317
.e367 <- 2 * .e133
.e368 <- 4 * .e226
.e369 <- t0 * .e43
.e370 <- t0 * .e15
.e371 <- .e331/.e13
.e372 <- .e322 + (2 * .e255 + 2 * .e362) * .e26/.e13
.e373 <- .e323 + (.e255 + 2 * .e354) * .e26/.e13
.e374 <- .e335 + (.e339 + 2 * .e347) * .e26/.e13
.e375 <- .e139 * .e133
.e377 <- (.e257 + 1 - .e93)/.e27 + .e283
.e379 <- (.e258 + 0.5 - .e136)/.e27 + .e282
.e383 <- (.e261 - .e198)/.e27 - .e285
.e385 <- .e263/.e27 - .e286
.e387 <- (.e264 - .e279)/.e27 - .e178
.e389 <- .e266/.e27 - .e287
.e394 <- .e168 * .e25
.e395 <- .e353 * .e4
.e398 <- .e205 * .e254 * .e4 + 2 * (.e145 * .e49/.e17)
.e400 <- .e203 * .e10 * .e7
.e402 <- .e230 * .e49 + .e303 * .e10
.e407 <- (16 - 4 * .e184) * .e24 * .e7 + 2 * (.e151 * .e49/.e17)
.e412 <- (2 * .e338 + 2 * .e349) * .e26/.e13
.e414 <- (2 * .e256 + 2 * .e355) * .e26/.e13
.e415 <- .e299/.e94
.e416 <- .e366 * .e4
.e417 <- .e300/.e94
.e419 <- (2 * .e358 + 4 * .e256) * .e26/.e13
.e420 <- .e301/.e12
.e422 <- .e303 * .e4 + 2 * (.e148 * .e49/.e17)
.e424 <- .e304 * .e10 + .e49 * .e173
.e426 <- .e304 * .e7 + 2 * (.e149 * .e49/.e17)
.e428 <- .e306 + 1/.e38
.e429 <- 0.5 - .e11/.e239
.e431 <- 1/.e13 + 2 * .e306
.e432 <- 2 * .e64
.e433 <- 32 - 64 * (.e128 * .e4 * .e13/.e95)
.e434 <- .e319 + .e321
.e435 <- .e369 * .e4
.e436 <- .e332 + .e412
.e437 <- .e333 + .e414
.e438 <- .e334 + .e419
.e439 <- .e139 * .e43
.e441 <- .e375 * .e7/.e13
.e444 <- .e60 * .e43
.e446 <- .e336 * .e10/.e13
.e448 <- .e336 * .e7/.e13
.e449 <- .e60 * .e4
.e451 <- .e60 * .e10/.e13
.e453 <- .e60 * .e7/.e13
.e454 <- .e255/.e13
.e455 <- .e256/.e13
.e460 <- .e225 * .e53 * .e25 * .e7/.e236 + .e234 * .e273
.e464 <- (.e28 * (0.5 * .e276 + .e364) + 0.5 * .e275)/.e15 +
((.e105 - .e308)/.e12 + 0.5 * .e289) * .e4
.e466 <- (.e28 * (2 * .e276 + .e367) + 2 * .e275)/.e15 +
((8 * .e104 - 2 * .e83)/.e12 + 2 * .e289) * .e4
.e468 <- .e42 * .e10/.e13
.e469 <- .e111/.e13
.e475 <- .e102/.e15 + .e435/.e13
.e477 <- .e102/2 + .e66 * .e7 * .e17/.e12
.e481 <- (.e271 - .e368) * .e4 * .e10 * .e135/.e49
.e483 <- .e295 * .e7/.e94
.e486 <- (.e77 - ((((.e305 + 4 * .e229) * .e25 - .e71)/.e12 +
t0 * .e252/.e13) * .e8 + .e71)) * .e43/.e13 - ((.e352 -
.e102 * .e37/.e15) * .e28 + .e99 * .e37/.e13)/.e15
.e492 <- .e28/.e14
.e495 <- .e428/.e38
.e496 <- .e79 * .e43
.e498 <- .e79 * .e10/.e12
.e499 <- .e79/.e12
.e500 <- .e81 * .e43
.e501 <- .e81/.e12
.e504 <- .e223 * .e220 * .e7/.e38
.e507 <- (0.25 * .e65 - 2 * (0.25 * (t0 * .e182) + 0.5)) *
.e4/.e13 - 0.5 * (.e28 * .e182/.e15)
.e508 <- (0.5 - .e309 * .e7/.e45)/.e45
.e510 <- .e429 * .e17 - .e243
.e511 <- .e201 * .e43
.e514 <- (0.5 * (.e218 * .e65) - 2 * (0.5 * (t0 * .e218 *
.e182) + 1 - .e202)) * .e4/.e13 - .e28 * .e218 * .e182/.e15
.e516 <- (.e308 - ((.e308 + 2 * (.e229 * .e25))/.e12 + t0 *
.e249/.e13) * .e8)/.e13 - ((.e357 - .e103 * .e37/.e15) *
.e28 + .e201 * .e37/.e13)/.e15
.e518 <- (0.5 * .e99 - (.e297/.e12 + .e368) * .e8) * .e135/.e49
.e520 <- .e103/.e15 + 0.5 * .e371
.e522 <- .e103/2 + .e134 * .e17/.e239
.e524 <- (1 - ((.e43 * (1 + 2 * .e229)/.e12 + .e317) * .e8 +
.e35)) * .e135/.e49
.e527 <- .e99 * .e218 * .e4 * .e25
.e529 <- .e394 * .e26/.e49
.e531 <- .e395/.e12 + .e298
.e534 <- .e43/.e112
.e535 <- .e218 * .e182
.e542 <- .e431/.e38
.e543 <- (2 - 2 * .e370) * .e24
.e544 <- .e128 * (.e133 + .e432)
.e546 <- .e298 * .e7/.e94
.e550 <- .e299 + .e360
.e551 <- .e220 * .e4
.e552 <- .e220/.e12
.e555 <- .e416 * .e10 * .e135/.e49
.e556 <- .e300 + 2 * .e360
.e558 <- .e359 * .e10/.e13
.e560 <- .e359 * .e7/.e13
.e562 <- .e133 * .e10/.e13
.e564 <- .e133 * .e7/.e13
.e568 <- .e37 * .e182 * .e137 * .e7/.e114
.e569 <- .e37 * .e130
.e571 <- .e301/.e13
.e572 <- .e302/.e13
.e573 <- .e114 * .e13
.e578 <- .e8 * .e10 * .e135 * .e7/(.e361 * .e13)
.e579 <- .e30/.e49
.e581 <- .e8 * .e135/.e361
.e583 <- .e10 * .e17
.e585 <- .e7^2
.e586 <- .e17 * .e13
.e587 <- 0.5 - 0.5 * (.e11/.e363)
.e589 <- 0.5 * .e65 - (2 * (.e28/.e15) + 2 * .e371) * .e4
.e591 <- 0.5 * .e319 + 0.5 * .e321
.e592 <- 1 - (.e203 * .e311 * .e7/.e45 + .e165)
.e593 <- 1 - (.e400/.e363 + .e165)
.e595 <- 1/.e15 + t0
.e597 <- 2 - (.e420 + .e278)
.e598 <- 2 * (.e7 * .e13)
.e599 <- 2 * (t0 * (.e205 + (.e237 - .e245/.e12) * .e4)/.e13)
.e600 <- 2 * (t0 * ((.e238 - 0.5 * (.e51/.e12)) * .e4 + 0.5 *
.e24)/.e13)
.e601 <- 2 * (t0 * .e310 * .e4/.e13)
.e602 <- 2 * (t0 * .e312 * .e4/.e13)
.e603 <- 2 * (t0 * .e313 * .e4/.e13)
.e604 <- 2 * (t0 * .e314 * .e4/.e13)
.e607 <- 2 * t0 + 2/.e15
.e609 <- 4 * .e343 - 2 * .e330
.e611 <- 4 * .e271 - 16 * .e226
.e612 <- 8 * .e188
.e613 <- r0 - (.e242 + .e11 * .e17/.e12)
.e616 <- t0 * .e225 * .e10/.e13
.e617 <- .e106 * .e10
.e619 <- .e57 * .e10/.e13
.e621 <- .e57 * .e7/.e13
.e623 <- t0 * .e8/.e13
.e624 <- .e107 * .e10
.e625 <- .e107/.e13
c(a0 = (((.e99/.e598 + 8 * .e524) * .e7 - .e251) * .e26 -
0.5 * (((.e332 + .e292 * .e280/.e45 + .e412) * .e32 +
(.e377 * .e45 - .e42 * .e531)/.e38)/.e45)) * .e43 +
(((.e298/.e94 - (.e102/.e14 + .e66 * .e17/.e12)/.e38) *
.e220 + .e223 * .e43 * (2 * (((.e43 * (.e250 - (.e98 +
.e432)) * .e130 * .e4/.e13 + .e37 * (4 * .e486 -
2 * ((((.e325 - 2 * (.e60 * .e145/.e24))/.e17 - .e599) *
.e37 + .e444 * .e252 * .e4/.e13)/.e24)))/.e114 -
((2 * .e102 - 2 * (.e435 * .e15/.e13)) * .e24 + 2 *
(.e145 * .e15/.e17)) * .e37 * .e130 * .e15 *
.e75/.e294) * .e137 * .e7) + 64 * .e524 - .e551/.e12)) *
.e7/.e38 - ((((.e546 - .e107 * .e43 * .e4/.e13) *
.e84 - (.e477/2 + .e106 * .e43 * .e4) * .e53/.e13) *
.e177 + .e158 * (32 * (.e486 * .e4 + .e89 * .e43) +
32 * .e352 - (.e398 * .e316 + 64 * (((.e43 * .e128 *
.e252 * .e4/.e13 + (2 * ((.e332 - .e599) * .e13 +
.e444 * .e4/.e13) + 4 * (.e349/.e13)) * .e37) * .e4 +
.e43 * (1 - 2 * .e623) * .e128 * .e37) * .e13 + (.e73 -
2 * (.e398 * .e13/.e95)) * .e128 * .e37 * .e4))/.e95) -
(.e225 * .e475 + 32 * (((((.e377/.e100 - .e42 * (8 *
(.e145 * .e13/.e17) - .e97 * .e102/.e14)/.e290) *
.e7 + t0 * (.e496 - (.e477/.e38 + .e496 * .e4/.e12) *
.e4)/.e13) * .e53 + .e84 * (tij * ((.e546 - .e500 *
.e4/.e12) * .e4 + .e500)/.e13 - (.e436 + 2 *
(.e62 * .e280 * .e32/.e45)) * .e32 * .e7/.e94) -
(.e139 * .e398/.e95 + .e66 * .e434/.e13)) * .e37 +
.e439 * .e252 * .e4/.e13) * .e4 + .e439 * .e37))) *
.e53 * .e25 * .e7/.e236 + ((2 * (.e377 * .e13 + .e42 *
.e43 * .e4/.e13) + 4 * .e43)/.e155 + (2 * ((.e353 -
.e531 * .e4)/.e13) - (2 * ((.e436 * .e13 + .e338/.e13) *
.e32) + 8 * ((.e395/.e13 - .e298 * .e13) * .e193 *
.e45 * .e13/.e156)))/.e156 - .e191 * (32 * ((.e102 *
.e12/.e54 + 2 * .e66) * .e12/.e17) - .e142 * .e102/.e14)/.e291) *
.e273 + .e234 * ((.e209 + 8 * ((.e352 - .e475 * .e37) *
.e37 * .e137 * .e7/.e114)) * .e7 - (.e237 - 2 * (.e369 *
.e24 * .e4/.e13)) * .e216 * .e75/.e296)) * .e43) *
.e7, a2 = geno_a * ((((.e295/.e94 - (.e103/.e14 +
.e4 * .e17/.e239)/.e38) * .e220 + .e223 * (2 * (((.e249 *
.e130 * .e4/.e13 + .e37 * (4 * .e516 - (2 * ((((.e329 -
2 * (.e60 * .e148/.e24))/.e17 - .e600) * .e37 + .e60 *
.e249 * .e4/.e13)/.e24) + .e330 * .e4/.e13)))/.e114 -
((2 * .e103 - .e331 * .e15/.e13) * .e24 + 2 * (.e148 *
.e15/.e17)) * .e37 * .e130 * .e15 * .e75/.e294) *
.e43 * .e137 * .e7) + 64 * .e518 - .e551/.e239)) * .e7/.e38 -
((((.e483 - 0.5 * .e117) * .e84 - (.e522/2 + 0.5 * .e115) *
.e53/.e13) * .e177 + .e158 * (32 * (.e516 * .e4 +
0.5 * .e89) + 32 * .e357 - (.e422 * .e316 + 64 *
((((2 * ((.e335 - .e600) * .e13 + 0.5 * (.e449/.e13)) +
4 * (.e347/.e13)) * .e37 + .e128 * .e249 * .e4/.e13) *
.e4 + (0.5 - .e623) * .e128 * .e37) * .e13 +
(.e74 - 2 * (.e422 * .e13/.e95)) * .e128 * .e37 *
.e4))/.e95) - (.e225 * .e520 + 32 * (((((.e379/.e100 -
.e42 * (8 * (.e148 * .e13/.e17) - .e97 * .e103/.e14)/.e290) *
.e7 + t0 * (0.5 * .e79 - (.e522/.e38 + 0.5 * (.e79 *
.e4/.e12)) * .e4)/.e13) * .e53 + .e84 * (tij * ((.e483 -
0.5 * (.e81 * .e4/.e12)) * .e4 + 0.5 * .e81)/.e13 -
(.e374 + 2 * (.e62 * .e277 * .e32/.e45)) * .e32 *
.e7/.e94) - (.e139 * .e422/.e95 + .e591 * .e4/.e13)) *
.e37 + .e139 * .e249 * .e4/.e13) * .e4 + 0.5 * .e210))) *
.e53 * .e25 * .e7/.e236 + .e234 * ((64 * ((0.5 -
.e8/.e239) * .e4 * .e135/.e49) + 8 * ((.e357 - .e520 *
.e37) * .e37 * .e137 * .e7/.e114)) * .e7 - (.e238 -
.e59) * .e216 * .e75/.e296) + ((2 * ((0.5 * .e45 -
(.e295 + 0.5 * (.e170/.e12)) * .e4)/.e13) - (2 *
((.e374 * .e13 + 0.5 * (.e339/.e13)) * .e32) + 8 *
((0.5 * .e179 - .e295 * .e13) * .e193 * .e45 * .e13/.e156)))/.e156 +
(2 + 2 * (.e379 * .e13 + 0.5 * (.e42 * .e4/.e13)))/.e155 -
.e191 * (32 * ((.e12 * .e103/.e54 + a0 + .e3) * .e12/.e17) -
.e142 * .e103/.e14)/.e291) * .e273) * .e43) *
.e7 + ((.e511/.e598 + 8 * .e518) * .e7 - .e511/.e13) *
.e26 - 0.5 * (((.e374 + .e292 * .e277/.e45) * .e32 +
(.e379 * .e45 - (.e295 + .e170/.e239) * .e42)/.e38) *
.e43/.e45)), b0 = ((((.e417 - .e542) * .e220 + .e223 *
(2 * (((((4 * .e466 - 4 * .e330) * .e7/.e13 - 2 * ((((.e327 -
(2 * (.e60 * .e151/.e24) + .e287))/.e17 - .e603) *
.e37 - 2 * .e448)/.e24)) * .e37 - 2 * .e560)/.e114 -
(.e24 * (4 - 4 * .e370) * .e7/.e13 + 2 * (.e151 *
.e15/.e17)) * .e37 * .e130 * .e15 * .e75/.e294) *
.e43 * .e137) + 64 * (.e611 * .e4 * .e135/.e49) -
2 * .e552) * .e7) * .e7/.e38 + (.e534 + 8 * (.e611 *
.e135 * .e7/.e49)) * .e4 * .e26 - (((((.e417 - 2 * .e625) *
.e84 - (.e431/2 + 2 * .e106) * .e53/.e13) * .e177 - .e225 *
.e607/.e13) * .e7 + .e158 * ((32 * (.e466 * .e7/.e13) -
64 * ((((2 * ((.e334 - .e603) * .e13 + 2 * .e453) + 4 *
(.e358/.e13)) * .e37 - .e128 * (.e367 + 4 * .e64) *
.e7/.e13) * .e13 + .e169 * (.e140 - 2 * (.e407 *
.e13/.e95)))/.e95)) * .e4 - (.e407 * .e316/.e95 +
64 * .e564)) - 32 * (((((.e389/.e100 - (.e42 * (8 * (.e151 *
.e13/.e17) - .e97/.e13)/.e290 + t0 * (.e542 + 2 * .e499) *
.e4/.e13)) * .e53 + .e84 * (tij * (.e417 - 2 * .e501) *
.e4/.e13 - (.e438 + 2 * (.e62 * .e284 * .e32/.e45)) *
.e32/.e94) - (2 * .e319 + 2 * .e321)/.e13) * .e7 - .e139 *
.e407/.e95) * .e37 - 2 * .e441) * .e4)) * .e53 * .e25 *
.e7/.e236 + .e273 * (2 * ((.e389 * .e13 + 2 * .e469)/.e155) -
((2 * ((.e438 * .e13 + 2 * .e455) * .e32) + 2 * (.e556 *
.e4/.e13) + 8 * (.e193 * (2 * .e572 - .e300 * .e13) *
.e45 * .e13/.e156))/.e156 + .e191 * (32 * ((.e12/.e586 +
4 * .e7) * .e12/.e17) - .e142/.e13)/.e291)) - .e234 *
((.e208 - 4 * .e621) * .e216 * .e75/.e296 + (256 * .e581 +
8 * ((.e37 * .e607 + .e367) * .e37 * .e137 * .e7/.e114)) *
.e585/.e13)) * .e43) * .e7 - 0.5 * (((.e334 + .e292 *
.e284/.e45 + .e419) * .e32 + (.e389 * .e45 - .e42 * .e556)/.e38) *
.e43/.e45)) * (1 - 0.5 * geno_b) * .e9, b2 = geno_b *
((((.e415 - .e495) * .e220 + .e223 * (2 * ((((.e609 *
.e7/.e13 - 2 * ((((.e326 - (2 * (.e60 * .e149/.e24) +
.e286))/.e17 - .e602) * .e37 - .e448)/.e24)) * .e37 -
.e560)/.e114 - (.e543 * .e7/.e13 + 2 * (.e149 * .e15/.e17)) *
.e37 * .e130 * .e15 * .e75/.e294) * .e43 * .e137) +
64 * (.e416 * .e135/.e49) - .e552) * .e7) * .e7/.e38 +
(0.5 * .e534 + 8 * (.e366 * .e135 * .e7/.e49)) *
.e4 * .e26 - (((((.e415 - .e625) * .e84 - (.e428/2 +
.e106) * .e53/.e13) * .e177 - .e225 * .e595/.e13) *
.e7 + .e158 * ((32 * (.e343 * .e7/.e13) - 64 * ((((2 *
((.e333 - .e602) * .e13 + .e453) + 4 * (.e355/.e13)) *
.e37 - .e544 * .e7/.e13) * .e13 + (.e90 - 2 * (.e426 *
.e13/.e95)) * .e128 * .e37)/.e95)) * .e4 - (.e426 *
.e316/.e95 + 32 * .e564)) - 32 * (((((.e385/.e100 -
(.e42 * (8 * (.e149 * .e13/.e17) - .e97/.e38)/.e290 +
t0 * (.e495 + .e499) * .e4/.e13)) * .e53 + .e84 *
(tij * (.e415 - .e501) * .e4/.e13 - (.e437 + 2 *
(.e62 * .e281 * .e32/.e45)) * .e32/.e94) - .e434/.e13) *
.e7 - .e139 * .e426/.e95) * .e37 - .e441) * .e4)) *
.e53 * .e25 * .e7/.e236 + .e273 * (2 * ((.e385 *
.e13 + .e469)/.e155) - ((2 * ((.e437 * .e13 + .e455) *
.e32) + 2 * (.e550 * .e4/.e13) + 8 * ((.e572 - .e299 *
.e13) * .e193 * .e45 * .e13/.e156))/.e156 + .e191 *
(32 * ((.e12/(2 * .e586) + .e14) * .e12/.e17) - .e142/.e38)/.e291)) -
((128 * .e581 + 8 * ((.e595 * .e37 + .e105 + .e98) *
.e37 * .e137 * .e7/.e114)) * .e585/.e13 + (.e207 -
2 * .e621) * .e216 * .e75/.e296) * .e234) * .e43) *
.e7 - 0.5 * (((.e333 + .e292 * .e281/.e45 + .e414) *
.e32 + (.e385 * .e45 - .e42 * .e550)/.e38) * .e43/.e45)) *
.e9, q0 = (((.e492 + .e178) * .e43 + (8 * .e555 - (.e28/.e7 +
.e178) * .e43/.e14) * .e7 + .e612) * .e26 + .e504 - (.e460 +
0.5 * ((.e372 * .e32 + (.e383 * .e45 + .e42 * .e597)/.e38 -
.e292 * .e311/.e45)/.e45)) * .e43) * .e203 + (((.e223 *
(2 * (((((.e609 * .e10/.e13 - 2 * (((.e322 - (.e60 *
.e173/.e24 + .e604)) * .e37 - .e446)/.e24)) * .e37 -
.e558) * .e7 + .e569)/.e114 - (.e543 * .e10/.e13 +
.e173 * .e15) * .e37 * .e130 * .e15 * .e75 * .e7/.e294) *
.e43 * .e137) + 64 * .e555) - ((.e109/.e14 + .e583/.e12)/.e38 +
.e311/.e94) * .e220) * .e203 * .e7 + .e223 * (1 - (.e400/.e12 +
.e165)) * .e220)/.e38 - ((((.e158 * ((32 * (.e343 * .e10/.e13) -
64 * ((((2 * ((.e322 - .e604) * .e13 + .e451) + 4 * (.e362/.e13)) *
.e37 - .e544 * .e10/.e13) * .e13 + (.e50 - 2 * (.e424 *
.e13/.e95)) * .e128 * .e37)/.e95)) * .e4 - (.e424 *
.e316/.e95 + 32 * .e562)) - .e616) * .e203 + (((.e613/2 -
.e617) * .e53 - .e624 * .e84) * .e203/.e13 + .e592 *
.e84/.e45) * .e177 - 32 * ((((((.e383 * .e7 + .e40 +
.e41)/.e100 + t0 * (.e613/.e38 - .e498) * .e4/.e13 -
.e42 * (8 * (.e161 * .e13/.e17) - .e97 * .e109/.e14) *
.e7/.e290) * .e53 - (.e139 * .e424/.e95 + .e10 *
.e434/.e13)) * .e203 + .e84 * (tij * (.e592/.e45 - .e81 *
.e203 * .e10/.e12) * .e4/.e13 - ((.e372 - 2 * (.e62 *
.e311/.e45)) * .e7 + .e47 + .e61) * .e203 * .e32/.e94)) *
.e37 - .e139 * .e203 * .e133 * .e10/.e13) * .e4)) * .e7 +
.e225 * .e593) * .e53 * .e25/.e236 + (.e203 * (32 * (.e240 -
4 * .e578) - .e216 * (.e173 - 2 * .e619) * .e75/.e296) +
8 * ((.e593 * .e37 - .e203 * (.e133 + .e64) * .e10 *
.e7/.e13) * .e37 * .e137 * .e7/.e114)) * .e234 +
((2 * (.e597 * .e4/.e13) - (2 * ((.e372 * .e13 + .e454) *
.e32) + 8 * ((.e311 * .e13 + .e571) * .e193 * .e45 *
.e13/.e156)))/.e156 + 2 * ((.e383 * .e13 + .e468)/.e155) -
.e191 * (32 * ((.e12 * .e109/.e54 + 2 * .e10) * .e12/.e17) -
.e142 * .e109/.e14)/.e291) * .e273 * .e203) *
.e43) * .e7, q2 = geno_q * ((((.e223 * (2 * ((((((4 *
.e464 - .e330) * .e10/.e13 - 2 * (((.e323 - (.e60 * .e230/.e24 +
.e601)) * .e37 - 0.5 * .e446)/.e24)) * .e37 - 0.5 * .e558) *
.e7 + 0.5 * .e569)/.e114 - ((1 - .e370) * .e24 * .e10/.e13 +
.e230 * .e15) * .e37 * .e130 * .e15 * .e75 * .e7/.e294) *
.e43 * .e137) + 64 * .e481) - ((.e110/.e14 + .e583/.e239)/.e38 +
.e309/.e94) * .e220) * .e7 + .e223 * .e429 * .e220)/.e38 -
(((((.e510/2 - 0.5 * .e617) * .e53/.e13 + (.e508 - 0.5 *
(.e624/.e13)) * .e84) * .e177 + .e158 * ((32 * (.e464 *
.e10/.e13) - 64 * ((((2 * ((.e323 - .e601) * .e13 +
0.5 * .e451) + 4 * (.e354/.e13)) * .e37 - (.e364 +
.e64) * .e128 * .e10/.e13) * .e13 + (.e85 - 2 * (.e402 *
.e13/.e95)) * .e128 * .e37)/.e95)) * .e4 - (.e402 *
.e316/.e95 + 16 * .e562)) - (0.5 * .e616 + 32 * (((((.e387 *
.e7 + 0.5 * .e42)/.e100 + t0 * (.e510/.e38 - 0.5 *
.e498) * .e4/.e13 - .e42 * (8 * (.e164 * .e13/.e17) -
.e97 * .e110/.e14) * .e7/.e290) * .e53 + .e84 * (tij *
(.e508 - 0.5 * (.e81 * .e10/.e12)) * .e4/.e13 - ((.e373 -
2 * (.e62 * .e309/.e45)) * .e7 + 0.5 * .e62) * .e32/.e94) -
(.e139 * .e402/.e95 + .e591 * .e10/.e13)) * .e37 -
0.5 * (.e375 * .e10/.e13)) * .e4))) * .e7 + .e225 *
.e587) * .e53 * .e25/.e236 + .e234 * (32 * (0.5 *
.e240 - 2 * .e578) + 8 * ((.e587 * .e37 - (.e364 +
.e67) * .e10 * .e7/.e13) * .e37 * .e137 * .e7/.e114) -
(.e230 - .e619) * .e216 * .e75/.e296) + ((2 * ((1 -
(.e259 + 0.5 * .e420)) * .e4/.e13) - (2 * ((.e373 *
.e13 + 0.5 * .e454) * .e32) + 8 * ((.e309 * .e13 +
0.5 * .e571) * .e193 * .e45 * .e13/.e156)))/.e156 +
2 * ((.e387 * .e13 + 0.5 * .e468)/.e155) - .e191 *
(32 * ((.e12 * .e110/.e54 + .e10) * .e12/.e17) -
.e142 * .e110/.e14)/.e291) * .e273) * .e43) *
.e7 + ((8 * .e481 - (.e492 + 0.5 * .e178) * .e43/.e14) *
.e7 + 0.5 * (.e28 * .e43/.e14 + .e612) + 0.5 * (.e66 *
.e10/.e112)) * .e26 + 0.5 * (.e504 - .e460 * .e43) -
0.5 * ((.e373 * .e32 + (.e387 * .e45 + .e42 * (1 - (.e259 +
.e301/.e239)))/.e38 - .e292 * .e309/.e45) * .e43/.e45)),
f0 = ((.e223 * (128 * (.e527/.e49) + 2 * ((.e535 * .e130 +
.e37 * (4 * .e514 - 2 * (.e60 * .e218 * .e182/.e24))) *
.e43 * .e137 * .e7/.e114))/.e38 - (((.e158 * (.e535 *
.e433 + 32 * (.e514 * .e4)) - 32 * (.e139 * .e218 *
.e182 * .e4)) * .e25 + .e225 * .e218) * .e53/.e236 +
.e234 * .e218 * (64 * .e579 + 8 * .e568)) * .e43) *
.e7 + 16 * (.e527 * .e26/.e49)) * .e7, f2 = geno_f *
((.e223 * (2 * ((.e37 * (4 * .e507 - .e60 * .e182/.e24) +
0.5 * (.e182 * .e130)) * .e43 * .e137 * .e7/.e114) +
64 * (.e394/.e49))/.e38 - (((.e158 * (0.5 * (.e182 *
.e433) + 32 * (.e507 * .e4)) - 16 * (.e139 *
.e182 * .e4)) * .e25 + 0.5 * .e225) * .e53/.e236 +
.e234 * (32 * .e579 + 4 * .e568)) * .e43) * .e7 +
8 * .e529) * .e7, f1 = ((.e223 * (2 * ((.e37 *
(4 * (.e449/.e24) - 4 * .e589) - 2 * (.e130 * .e4)) *
.e43 * .e137 * .e7/.e573) - 128 * (.e99 * .e25/.e49)) *
.e4/.e38 - ((((64 * (.e139 * .e4) - .e158 * (2 *
.e433 + 32 * .e589)) * .e4 * .e25/.e13 + 32 * .e210) *
.e4 - .e221) * .e53/.e236 - .e234 * (16 * (.e37 *
.e137 * .e7/.e573) + 64 * (.e25/.e49)) * .e8) * .e43) *
.e7 - 16 * .e529) * .e7)
}
deriv_mu_int_a2_abqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_a * (a2 - a0)/2
.e4 <- a0 + .e3
.e7 <- geno_q * (q2 - q0)/2 + q0
.e8 <- .e4^2
.e9 <- b0 + geno_b * (b2 - b0)/2
.e10 <- .e9^2
.e11 <- .e10 * .e7
.e12 <- .e8 + 2 * .e11
.e13 <- sqrt(.e12)
.e14 <- 2 * .e7
.e15 <- .e4 + .e13
.e16 <- .e15/.e14
.e17 <- r0 - .e16
.e20 <- geno_f * (f2 - f0)/2
.e21 <- f0 + .e20
.e22 <- .e4/.e13
.e23 <- 2 * (.e13/.e17)
.e24 <- .e14 + .e23
.e25 <- .e21 - f1
.e26 <- .e7 * .e17
.e27 <- tij - t0
.e28 <- .e22 + 1
.e29 <- .e8 * .e25
.e30 <- .e21 - m0
.e34 <- 2 * (.e29/.e13) - 2 * (.e30 * .e13)
.e36 <- exp(2 * (.e13 * .e27))
.e37 <- 2 * .e26
.e38 <- 2 * .e13
.e39 <- .e28 * .e13
.e41 <- .e14 - .e24 * .e36
.e42 <- t0 * .e13
.e43 <- .e39/.e37
.e44 <- .e43 + .e22
.e45 <- .e38^2
.e46 <- .e10/.e13
.e47 <- .e24 * .e4
.e49 <- exp(-.e42)
.e50 <- .e8/.e12
.e51 <- 2 * .e22
.e53 <- .e39/.e26 + .e51
.e54 <- t0 * .e24
.e56 <- .e47 * .e27/.e13
.e58 <- .e54 * .e4/.e13
.e61 <- 0.5 * (.e53/.e17) - .e58
.e62 <- 2 * .e50
.e63 <- 2 * .e15
.e64 <- .e44/.e17
.e65 <- 4 - .e62
.e66 <- t0 * .e34
.e67 <- .e64 + .e56
.e68 <- 0.5 * .e66
.e70 <- exp(-(2 * .e42))
.e71 <- .e28 * .e34
.e75 <- .e65 * .e25/2 + m0 - (.e68 + f0 + .e20)
.e76 <- 0.5 * .e22
.e79 <- .e26/.e38 + 0.5
.e81 <- .e7/.e41 - 0.5
.e82 <- 0.5 * .e46
.e83 <- exp(-(tij * .e13))
.e86 <- .e75 * .e4/.e13 - .e71/.e63
.e87 <- 2 * .e12
.e88 <- .e67 * .e36
.e89 <- .e24 * .e45
.e90 <- .e41^2
.e92 <- (-.e23)^2
.e93 <- .e29/.e12
.e94 <- .e7/.e13
.e95 <- .e92 * .e17
.e96 <- .e28/.e13
.e98 <- .e4/.e12
.e99 <- .e46 - .e15/.e7
.e100 <- .e82 - .e16
.e101 <- 0.5 + .e76
.e102 <- 2 * .e93
.e103 <- 2 * .e30
.e104 <- .e102 + .e103
.e105 <- t0 * .e79
.e106 <- tij * .e81
.e108 <- .e24 * .e15^2 * .e70
.e110 <- 0.5 - .e8/.e87
.e115 <- 4 * .e86 - 2 * (.e61 * .e34/.e24)
.e116 <- .e44 * .e7
.e117 <- .e12 * .e13
.e118 <- 0.5 * (.e106 * .e4/.e13)
.e119 <- .e105 * .e4
.e123 <- .e116/.e95 + 0.5 * (.e119/.e13)
.e126 <- .e25^2
.e127 <- .e118 - .e88 * .e7/.e90
.e129 <- 2 * (.e61 * .e13) + 2 * (.e47/.e13)
.e130 <- .e37^2
.e131 <- .e49^2
.e132 <- 2 * .e17
.e133 <- .e24 * .e10
.e134 <- .e24 * .e7
.e136 <- .e123 * .e49 + .e127 * .e83
.e137 <- 0.5 * .e50
.e139 <- (-(4 * (.e12/.e17)))^2
.e140 <- 16 * .e34
.e141 <- 2 * .e94
.e144 <- .e99 * .e13/.e37 + .e46
.e147 <- .e100 * .e13/.e37 + .e82
.e150 <- .e101 * .e13/.e37 + .e76
.e151 <- .e94 + 1/.e132
.e153 <- 1/.e17 + .e141
.e154 <- .e139 * .e17
.e158 <- .e79 * .e49 + .e81 * .e83
.e159 <- (2 * (.e41 * .e13))^2
.e160 <- .e4/.e117
.e162 <- 2 * (.e147/.e17)
.e163 <- 2 + 2 * (.e144/.e17)
.e164 <- .e110 * .e4
.e165 <- .e129 * .e34
.e168 <- 2 * (.e8/.e13) - .e38
.e171 <- .e41 * .e4
.e173 <- (32 * .e86 - 64 * (.e165 * .e13/.e89)) * .e4 + .e140
.e174 <- 0.5 * geno_q
.e175 <- .e96 - .e98
.e177 <- .e164 * .e126/.e45
.e178 <- .e34 * .e115
.e179 <- .e171/.e13
.e181 <- .e133 * .e27/.e13
.e183 <- .e134 * .e27/.e13
.e184 <- 0.5 - .e137
.e186 <- 0.5 * .e96 - 0.5 * .e98
.e191 <- .e179 - 2 * (.e88 * .e13)
.e193 <- 2 * (.e44 * .e13) + 2 * .e4
.e194 <- 2 * (.e151/.e17)
.e195 <- 2 * (.e153/.e17)
.e196 <- 64 * .e177
.e198 <- t0 * .e45/.e13
.e202 <- 0.5 * geno_f
.e203 <- 1 - .e174
.e205 <- 2 * (.e178 * .e131 * .e7/.e108) + .e196
.e206 <- .e136 * .e34
.e207 <- .e158 * .e173
.e208 <- .e28/.e130
.e209 <- (2 * (.e34 * .e49 * .e7/.e15))^2
.e211 <- .e89 * .e15 * .e70
.e212 <- .e133/.e12
.e213 <- .e134/.e12
.e214 <- .e24 * .e70
.e216 <- .e17/.e38 + 1/.e41
.e217 <- 1 - .e202
.e218 <- 1 + .e162
.e220 <- .e207 - 32 * (.e206 * .e4)
.e222 <- 2 * (.e150/.e17)
.e224 <- .e191/.e159 + .e193/.e154
.e226 <- .e99/2 + .e16
.e227 <- .e110/.e45
.e228 <- .e100/2
.e231 <- .e63^2
.e232 <- .e8/.e87^2
.e235 <- 2 * ((1 - .e137) * .e25) + m0 - .e21
.e236 <- (.e4 * .e25/.e38)^2
.e237 <- .e184/.e13
.e238 <- .e67 * .e10
.e239 <- .e67 * .e7
.e240 <- (.e181 + 1 + .e162) * .e36
.e242 <- .e28 * (0.5 * .e17 - .e228) * .e13
.e243 <- .e28 * .e104
.e244 <- .e71/.e231
.e246 <- .e28 * (r0 - .e226) * .e13
.e247 <- .e186 * .e4
.e249 <- .e34 * .e4/.e12
.e250 <- .e56 + .e222
.e251 <- (.e163 + 2 * .e181) * .e36
.e253 <- 2 * .e96 - 2 * .e98
.e254 <- .e194 + 2 * .e183
.e255 <- .e195 + 4 * .e183
.e257 <- t0 * .e104/.e13
.e260 <- .e209/.e214 + 32 * (.e236 * .e7)
.e261 <- 1 - .e240
.e262 <- 2 - .e251
.e263 <- .e175/.e37
.e264 <- (.e247 + 0.5)/.e37
.e267 <- .e186/.e37
.e268 <- .e24 * (4 - .e198)
.e269 <- .e24 * (8 - 2 * .e198)
.e270 <- .e4 * .e7
.e271 <- .e26/.e12
.e273 <- 0.5 * .e75
.e274 <- 0.5 * .e65
.e275 <- .e218 - 0.5 * .e212
.e276 <- 2 * (.e242/.e130)
.e277 <- 2 * (.e246/.e130)
.e278 <- 2 * .e208
.e279 <- .e194 - .e213
.e280 <- .e195 - 2 * .e213
.e281 <- .e163 - .e212
.e282 <- .e95^2
.e283 <- .e154^2
.e284 <- .e88 + .e44 * .e41/.e38
.e285 <- (.e263 - .e160) * .e10
.e287 <- (.e208 - .e160) * .e7
.e288 <- (.e267 - 0.5 * .e160) * .e10
.e289 <- .e108^2
.e290 <- .e250 * .e36
.e291 <- .e214^2
.e292 <- .e28 * .e101
.e293 <- (.e278 - 2 * .e160) * .e7
.e294 <- .e254 * .e36
.e295 <- .e255 * .e36
.e297 <- .e4 * .e10/.e117
.e298 <- .e140 + 32 * (.e86 * .e4)
.e299 <- 4 * .e7
.e301 <- t0 * .e123 * .e49
.e302 <- t0 * .e115
.e303 <- t0 * .e4
.e305 <- tij * .e127 * .e83
.e308 <- .e220 * .e49 * .e25/.e211
.e311 <- (((.e62 - .e65/2) * .e25 + .e68 + f0 + .e20 - m0)/.e12 +
0.5 * .e257) * .e4 + (.e243 + .e249)/.e63 + 2 * .e244
.e313 <- .e216 * .e205/.e38
.e314 <- .e184 * .e24
.e315 <- .e61 * .e104
.e316 <- .e275 * .e4
.e317 <- .e279 * .e4
.e318 <- .e280 * .e4
.e319 <- .e104 * .e115
.e320 <- .e41 * .e10
.e321 <- .e41 * .e7
.e322 <- .e38^3
.e323 <- .e281 * .e4
.e324 <- .e270/.e117
.e325 <- 2 * .e232
.e326 <- 4 * .e227
.e328 <- 4 * .e232 - 8 * .e227
.e329 <- t0 * .e168
.e330 <- t0 * .e15
.e331 <- .e303/.e13
.e334 <- (((.e44 + 2 * .e150)/.e17 + .e56) * .e4 + .e314) *
.e27/.e13 + ((.e44/.e37 + .e39/.e130) * .e101 + .e264 +
.e237)/.e17
.e335 <- .e136 * .e104
.e336 <- ((.e44/.e38 + .e175/2)/.e17 + .e287)/.e17
.e339 <- (.e238 + .e316) * .e27/.e13 + (.e44 * .e100/.e37 +
.e288 - .e276)/.e17
.e340 <- ((.e44/.e13 + .e253/2)/.e17 + .e293)/.e17
.e342 <- (.e285 + .e44 * .e99/.e37 - .e277)/.e17 + (.e323 +
2 * .e238) * .e27/.e13
.e343 <- .e175/.e132
.e345 <- .e264 + .e292 * .e13/.e130 + .e237
.e349 <- (.e317 + 2 * .e239) * .e27/.e13
.e351 <- (.e318 + 4 * .e239) * .e27/.e13
.e354 <- .e313 - .e308
.e355 <- .e164 * .e25
.e357 <- .e218 * .e45 + .e268 * .e10
.e362 <- (16 - 4 * .e198) * .e24 * .e7 + 2 * (.e153 * .e45/.e17)
.e363 <- .e253/.e132
.e364 <- .e294/.e90
.e368 <- .e295/.e90
.e369 <- .e205/.e12
.e371 <- .e268 * .e4 + 2 * (.e150 * .e45/.e17)
.e373 <- .e269 * .e10 + .e45 * .e163
.e375 <- .e269 * .e7 + 2 * (.e151 * .e45/.e17)
.e376 <- .e271 + 1/.e38
.e378 <- 1/.e15 + t0
.e380 <- 1/.e13 + 2 * .e271
.e381 <- 16 - 64 * (.e129 * .e4 * .e13/.e89)
.e385 <- ((.e53/2 + .e43) * .e101 + .e247 + 0.5)/.e26 + 2 *
.e237
.e387 <- .e335 * .e7/.e13
.e388 <- .e336 + .e349
.e389 <- .e340 + .e351
.e391 <- ((.e175 * .e7 + .e28/.e132)/.e7 + .e53/.e38)/.e17 -
2 * .e324
.e393 <- (.e53/.e13 + (.e28/.e17 + .e253 * .e7)/.e7)/.e17 -
4 * .e324
.e394 <- .e238/.e13
.e395 <- .e239/.e13
.e396 <- .e285 - .e277
.e397 <- .e220 * .e378
.e400 <- .e224 * .e260
.e401 <- .e44 * .e4
.e403 <- .e44 * .e10/.e13
.e404 <- .e116/.e13
.e405 <- (.e43 + .e51)/.e12
.e406 <- .e287 + .e343
.e410 <- ((.e93 - .e273)/.e12 + 0.25 * .e257) * .e4 + .e244 +
(0.5 * .e243 + 0.5 * .e249)/.e63
.e411 <- .e354 * .e7
.e412 <- .e288 - .e276
.e415 <- ((.e274 - 0.5 * .e329) * .e217 + .e202 - 1) * .e4/.e13 -
.e28 * .e217 * .e168/.e63
.e417 <- .e290 * .e7/.e90
.e420 <- ((4 * .e93 - 2 * .e75)/.e12 + .e257) * .e4 + (2 *
.e243 + 2 * .e249)/.e63 + 4 * .e244
.e425 <- .e28/.e299
.e426 <- .e28/.e299^2
.e428 <- .e12 * .e7 * .e13
.e430 <- .e376/.e38
.e432 <- .e79 * .e10/.e12
.e433 <- .e79/.e12
.e434 <- .e81/.e12
.e435 <- (0.5 - .e261 * .e7/.e41)/.e41
.e438 <- .e110 * .e217 * .e4 * .e25
.e440 <- .e355 * .e27/.e45
.e442 <- (0.5 - .e11/.e87) * .e17 - .e228
.e444 <- .e315 * .e10/.e13
.e446 <- .e315 * .e7/.e13
.e447 <- .e61 * .e4
.e449 <- .e61 * .e10/.e13
.e451 <- .e61 * .e7/.e13
.e453 <- (.e273 - ((((1 - .e50) * .e25 + .e273)/.e12 + 0.5 *
(t0 * .e235/.e13)) * .e8 + (.e28 * .e235 * .e4 + .e184 *
.e34)/.e63))/.e13 + 2 * (.e292 * .e34/.e231)
.e455 <- (0.5 * .e110 - (1/.e87 + .e326 - .e325) * .e8) *
.e126/.e45
.e458 <- (0.5 * (.e274 - 1) - 0.25 * .e329) * .e4/.e13 -
.e28 * .e168/(4 * .e15)
.e460 <- .e101/.e15 + 0.5 * .e331
.e462 <- .e101/2 + .e270 * .e17/.e87
.e467 <- .e380/.e38
.e468 <- (2 - 2 * .e330) * .e24
.e471 <- .e293 + .e363
.e472 <- .e129 * (.e104 + 2 * .e66)
.e474 <- .e235 * .e4/.e13
.e476 <- .e319 * .e10/.e13
.e478 <- .e319 * .e7/.e13
.e480 <- .e104 * .e10/.e13
.e482 <- .e104 * .e7/.e13
.e486 <- .e34 * .e168 * .e131 * .e7/.e108
.e487 <- .e320/.e12
.e488 <- .e320/.e13
.e489 <- .e321/.e12
.e490 <- .e321/.e13
.e491 <- .e108 * .e13
.e496 <- .e328 * .e126
.e497 <- .e15 * .e13
.e501 <- .e8 * .e10 * .e126 * .e7/(.e322 * .e13)
.e502 <- .e29/.e45
.e504 <- .e8 * .e126/.e322
.e505 <- .e10 * .e17
.e506 <- .e7^2
.e507 <- .e17 * .e13
.e508 <- 0.5 * (((.e53 * .e99/2 + .e175 * .e10 - .e246/.e26)/.e26 -
2 * .e297)/.e17)
.e509 <- 0.5 * (((.e53 * .e100/2 + .e186 * .e10 - .e242/.e26)/.e26 -
.e297)/.e17)
.e510 <- 0.5 * .e104
.e511 <- .e274 - (.e28/.e15 + .e331) * .e4
.e513 <- 0.5 * .e301 + 0.5 * .e305
.e514 <- 1 - (.e203 * .e262 * .e7/.e41 + .e174)
.e516 <- .e325 - .e326
.e517 <- 2 * .e104
.e520 <- 2 * t0 + 2/.e15
.e522 <- 4 * .e311 - 2 * .e302
.e523 <- 64 * (.e328 * .e4 * .e126/.e45)
.e525 <- 8 * .e232 - 16 * .e227
.e526 <- r0 - (.e226 + .e11 * .e17/.e12)
.e527 <- .e301 + .e305
.e529 <- t0 * ((.e222 - 0.5 * (.e47/.e12)) * .e4 + 0.5 *
.e24)/.e13
.e530 <- .e105 * .e10
.e533 <- t0 * .e275 * .e4/.e13
.e536 <- t0 * .e279 * .e4/.e13
.e539 <- t0 * .e280 * .e4/.e13
.e541 <- .e54 * .e10/.e13
.e543 <- .e54 * .e7/.e13
.e546 <- t0 * .e281 * .e4/.e13
.e547 <- .e106 * .e10
.e548 <- .e106/.e13
c(a2 = geno_a^2 * (((((.e290/.e90 - (.e101/.e14 + .e4 * .e17/.e87)/.e38) *
.e205 + .e216 * (2 * (((.e235 * .e115 * .e4/.e13 + .e34 *
(4 * .e453 - (2 * ((((0.5 * .e385 - 2 * (.e150 * .e61/.e24))/.e17 -
.e529) * .e34 + .e61 * .e235 * .e4/.e13)/.e24) +
.e302 * .e4/.e13)))/.e108 - ((2 * .e101 - .e303 *
.e15/.e13) * .e24 + 2 * (.e150 * .e15/.e17)) * .e34 *
.e115 * .e15 * .e70/.e289) * .e131 * .e7) + 64 * .e455 -
.e205 * .e4/.e87))/.e38 - (((.e417 - .e118) * .e83 -
(.e462/2 + 0.5 * .e119) * .e49/.e13) * .e173 + .e158 *
(16 * .e474 + 32 * (.e453 * .e4 + 0.5 * .e86) - (.e371 *
.e298 + 64 * ((((2 * ((.e314 + 2 * (.e150 * .e4/.e17))/.e13) +
2 * ((0.5 * (.e385/.e17) - .e529) * .e13 + 0.5 *
(.e447/.e13))) * .e34 + .e129 * .e235 * .e4/.e13) *
.e4 + (0.5 - t0 * .e8/.e13) * .e129 * .e34) * .e13 +
(.e76 - 2 * (.e371 * .e13/.e89)) * .e129 * .e34 *
.e4))/.e89) - (.e220 * .e460 + 32 * (((((.e345/.e95 -
.e44 * (8 * (.e150 * .e13/.e17) - .e92 * .e101/.e14)/.e282) *
.e7 + 0.5 * (t0 * (0.5 * .e79 - (.e462/.e38 + 0.5 * (.e79 *
.e4/.e12)) * .e4)/.e13)) * .e49 + (0.5 * (tij * ((.e417 -
0.5 * (.e81 * .e4/.e12)) * .e4 + 0.5 * .e81)/.e13) -
(.e334 + 2 * (.e67 * .e250 * .e36/.e41)) * .e36 * .e7/.e90) *
.e83 - (.e136 * .e371/.e89 + .e513 * .e4/.e13)) * .e34 +
.e136 * .e235 * .e4/.e13) * .e4 + 0.5 * .e206))) * .e49 *
.e25/.e211) * .e7 - ((((0.5 * .e41 - (.e290 + 0.5 * (.e171/.e12)) *
.e4)/.e13 - (2 * ((.e334 * .e13 + 0.5 * (.e67 * .e4/.e13)) *
.e36) + 8 * (.e191 * (0.5 * .e179 - .e290 * .e13) * .e41 *
.e13/.e159)))/.e159 + (1 + 2 * (.e345 * .e13 + 0.5 *
(.e401/.e13)))/.e154 - .e193 * (32 * ((.e12 * .e101/.e37 +
a0 + .e3) * .e12/.e17) - .e139 * .e101/.e14)/.e283) *
.e260 + .e224 * ((.e196 + 8 * ((.e474 - .e460 * .e34) *
.e34 * .e131 * .e7/.e108)) * .e7 - (.e222 - .e58) * .e209 *
.e70/.e291))) * .e7 + ((.e184/(4 * (.e7 * .e13)) + 8 *
.e455) * .e7 - 0.5 * .e237) * .e27 - 0.5 * (((.e334 +
.e284 * .e250/.e41) * .e36 + ((.e345 - .e401/.e87) *
.e41 - .e44 * .e250 * .e36)/.e38)/.e41)), b0 = geno_a *
(((((.e368 - .e467) * .e205 + .e216 * (2 * (((((4 * .e420 -
4 * .e302) * .e7/.e13 - 2 * ((((0.5 * .e393 - 2 *
(.e61 * .e153/.e24))/.e17 - .e539) * .e34 - 2 * .e446)/.e24)) *
.e34 - 2 * .e478)/.e108 - (.e24 * (4 - 4 * .e330) *
.e7/.e13 + 2 * (.e153 * .e15/.e17)) * .e34 * .e115 *
.e15 * .e70/.e289) * .e131) + 64 * (.e525 * .e4 *
.e126/.e45) - 2 * .e369) * .e7)/.e38 - ((((.e368 -
2 * .e548) * .e83 - (.e380/2 + 2 * .e105) * .e49/.e13) *
.e173 - .e220 * .e520/.e13) * .e7 + .e158 * ((32 *
(.e420 * .e7/.e13) - 64 * ((((2 * ((0.5 * (.e393/.e17) -
.e539) * .e13 + 2 * .e451) + 2 * (.e318/.e13)) *
.e34 - .e129 * (.e517 + 4 * .e66) * .e7/.e13) * .e13 +
.e165 * (.e141 - 2 * (.e362 * .e13/.e89)))/.e89)) *
.e4 - (.e362 * .e298/.e89 + 32 * .e482)) - 32 * (((((.e471/.e95 -
(.e44 * (8 * (.e153 * .e13/.e17) - .e92/.e13)/.e282 +
0.5 * (t0 * (.e467 + 2 * .e433) * .e4/.e13))) *
.e49 + (0.5 * (tij * (.e368 - 2 * .e434) * .e4/.e13) -
(.e389 + 2 * (.e67 * .e255 * .e36/.e41)) * .e36/.e90) *
.e83 - (2 * .e301 + 2 * .e305)/.e13) * .e7 - .e136 *
.e362/.e89) * .e34 - 2 * .e387) * .e4)) * .e49 *
.e25/.e211) * .e7 + .e224 * ((.e195 - 4 * .e543) *
.e209 * .e70/.e291 + (256 * .e504 + 8 * ((.e34 *
.e520 + .e517) * .e34 * .e131 * .e7/.e108)) * .e506/.e13) +
(0.5/.e117 + 8 * (.e525 * .e126 * .e7/.e45)) * .e4 *
.e27 - .e260 * (2 * ((.e471 * .e13 + 2 * .e404)/.e154) -
(((.e295 + 2 * .e489) * .e4/.e13 + 2 * ((.e389 *
.e13 + 2 * .e395) * .e36) + 8 * (.e191 * (2 *
.e490 - .e295 * .e13) * .e41 * .e13/.e159))/.e159 +
.e193 * (32 * ((.e12/.e507 + .e299) * .e12/.e17) -
.e139/.e13)/.e283))) * .e7 - 0.5 * (((.e284 *
.e255/.e41 + .e340 + .e351) * .e36 + (((.e278 - (2 *
.e44 + .e51)/.e12) * .e7 + .e363) * .e41 - .e44 *
.e255 * .e36)/.e38)/.e41)) * (1 - 0.5 * geno_b) *
.e9, b2 = geno_a * geno_b * (((((.e364 - .e430) * .e205 +
.e216 * (2 * ((((.e522 * .e7/.e13 - 2 * ((((0.5 * .e391 -
2 * (.e151 * .e61/.e24))/.e17 - .e536) * .e34 - .e446)/.e24)) *
.e34 - .e478)/.e108 - (.e468 * .e7/.e13 + 2 * (.e151 *
.e15/.e17)) * .e34 * .e115 * .e15 * .e70/.e289) *
.e131) + .e523 - .e369) * .e7)/.e38 - ((((.e364 -
.e548) * .e83 - (.e376/2 + .e105) * .e49/.e13) * .e173 -
.e397/.e13) * .e7 + .e158 * ((32 * (.e311 * .e7/.e13) -
64 * ((((2 * ((0.5 * (.e391/.e17) - .e536) * .e13 + .e451) +
2 * (.e317/.e13)) * .e34 - .e472 * .e7/.e13) * .e13 +
(.e94 - 2 * (.e375 * .e13/.e89)) * .e129 * .e34)/.e89)) *
.e4 - (.e375 * .e298/.e89 + 16 * .e482)) - 32 * (((((.e406/.e95 -
(.e44 * (8 * (.e151 * .e13/.e17) - .e92/.e38)/.e282 +
0.5 * (t0 * (.e430 + .e433) * .e4/.e13))) * .e49 +
(0.5 * (tij * (.e364 - .e434) * .e4/.e13) - (.e388 +
2 * (.e67 * .e254 * .e36/.e41)) * .e36/.e90) * .e83 -
.e527/.e13) * .e7 - .e136 * .e375/.e89) * .e34 - .e387) *
.e4)) * .e49 * .e25/.e211) * .e7 + .e224 * ((128 * .e504 +
8 * ((.e378 * .e34 + .e102 + .e103) * .e34 * .e131 *
.e7/.e108)) * .e506/.e13 + (.e194 - 2 * .e543) *
.e209 * .e70/.e291) + (0.25/.e117 + 8 * (.e496 * .e7/.e45)) *
.e4 * .e27 - .e260 * (2 * ((.e406 * .e13 + .e404)/.e154) -
(((.e294 + .e489) * .e4/.e13 + 2 * ((.e388 * .e13 + .e395) *
.e36) + 8 * (.e191 * (.e490 - .e294 * .e13) * .e41 *
.e13/.e159))/.e159 + .e193 * (32 * ((.e12/(2 * .e507) +
.e14) * .e12/.e17) - .e139/.e38)/.e283))) * .e7 -
0.5 * (((.e336 + .e284 * .e254/.e41 + .e349) * .e36 +
(((.e208 - .e405) * .e7 + .e343) * .e41 - .e44 *
.e254 * .e36)/.e38)/.e41)) * .e9, q0 = geno_a *
((((((.e523 - .e369) * .e10 + 2 * (((((.e522 * .e10/.e13 -
2 * (((.e508 - (.e61 * .e163/.e24 + .e546)) * .e34 -
.e444)/.e24)) * .e34 - .e476) * .e7 + .e178)/.e108 -
(.e468 * .e10/.e13 + .e163 * .e15) * .e34 * .e115 *
.e15 * .e70 * .e7/.e289) * .e131)) * .e216 -
((.e99/.e14 + .e505/.e12)/.e38 + .e262/.e90) * .e205) *
.e203/.e38 - ((.e158 * ((32 * (.e311 * .e10/.e13) -
64 * ((((2 * ((.e508 - .e546) * .e13 + .e449) + 2 *
(.e323/.e13)) * .e34 - .e472 * .e10/.e13) * .e13 +
(.e46 - 2 * (.e373 * .e13/.e89)) * .e129 * .e34)/.e89)) *
.e4 - (.e373 * .e298/.e89 + 16 * .e480)) - .e397 *
.e10/.e13) * .e203 + (((.e526/2 - .e530) * .e49 -
.e547 * .e83) * .e203/.e13 + .e514 * .e83/.e41) *
.e173 - 32 * ((((((.e396 * .e7 + .e43 + .e22)/.e95 +
0.5 * (t0 * (.e526/.e38 - .e432) * .e4/.e13) - .e44 *
(8 * (.e144 * .e13/.e17) - .e92 * .e99/.e14) * .e7/.e282) *
.e49 - (.e136 * .e373/.e89 + .e10 * .e527/.e13)) *
.e203 + (0.5 * (tij * (.e514/.e41 - .e81 * .e203 *
.e10/.e12) * .e4/.e13) - ((.e342 - 2 * (.e67 * .e262/.e41)) *
.e7 + .e64 + .e56) * .e203 * .e36/.e90) * .e83) *
.e34 - .e136 * .e203 * .e104 * .e10/.e13) * .e4)) *
.e49 * .e25/.e211) * .e7 + (.e313 - (.e308 + (((2 -
(.e487 + .e251)) * .e4/.e13 - (2 * ((.e342 * .e13 +
.e394) * .e36) + 8 * ((.e262 * .e13 + .e488) * .e191 *
.e41 * .e13/.e159)))/.e159 + 2 * ((.e396 * .e13 +
.e403)/.e154) - .e193 * (32 * ((.e12 * .e99/.e37 +
2 * .e10) * .e12/.e17) - .e139 * .e99/.e14)/.e283) *
.e260)) * .e203 - .e224 * (.e203 * (32 * (.e236 -
4 * .e501) - .e209 * (.e163 - 2 * .e541) * .e70/.e291) +
8 * (((1 - (.e203 * .e10 * .e7/.e497 + .e174)) *
.e34 - .e203 * (.e104 + .e66) * .e10 * .e7/.e13) *
.e34 * .e131 * .e7/.e108))) * .e7 + ((((8 * (.e496/.e45) -
1/(4 * .e428)) * .e4 * .e10 - 4 * .e426) * .e7 +
.e425 + (0.5 * (.e10/.e117) + 8 * (.e110 * .e126/.e45)) *
.e4) * .e27 + .e411 - (.e400 + 0.5 * (((((.e263 -
.e405) * .e10 - .e277) * .e41 + .e44 * .e262)/.e38 +
.e342 * .e36 - .e284 * .e262/.e41)/.e41))) * .e203),
q2 = geno_a * geno_q * ((((((64 * (.e516 * .e4 * .e126/.e45) -
.e205/.e87) * .e10 + 2 * ((((((4 * .e410 - .e302) *
.e10/.e13 - 2 * (((.e509 - (.e61 * .e218/.e24 + .e533)) *
.e34 - 0.5 * .e444)/.e24)) * .e34 - 0.5 * .e476) *
.e7 + 0.5 * .e178)/.e108 - ((1 - .e330) * .e24 *
.e10/.e13 + .e218 * .e15) * .e34 * .e115 * .e15 *
.e70 * .e7/.e289) * .e131)) * .e216 - ((.e100/.e14 +
.e505/.e87)/.e38 + .e261/.e90) * .e205)/.e38 - (((.e442/2 -
0.5 * .e530) * .e49/.e13 + (.e435 - 0.5 * (.e547/.e13)) *
.e83) * .e173 + .e158 * ((32 * (.e410 * .e10/.e13) -
64 * ((((2 * ((.e509 - .e533) * .e13 + 0.5 * .e449) +
2 * (.e316/.e13)) * .e34 - (.e510 + .e66) * .e129 *
.e10/.e13) * .e13 + (.e82 - 2 * (.e357 * .e13/.e89)) *
.e129 * .e34)/.e89)) * .e4 - (.e357 * .e298/.e89 +
8 * .e480)) - (.e220 * (0.5 * t0 + 0.5/.e15) * .e10/.e13 +
32 * (((((.e412 * .e7 + 0.5 * .e44)/.e95 + 0.5 *
(t0 * (.e442/.e38 - 0.5 * .e432) * .e4/.e13) -
.e44 * (8 * (.e147 * .e13/.e17) - .e92 * .e100/.e14) *
.e7/.e282) * .e49 + (0.5 * (tij * (.e435 -
0.5 * (.e81 * .e10/.e12)) * .e4/.e13) - ((.e339 -
2 * (.e67 * .e261/.e41)) * .e7 + 0.5 * .e67) *
.e36/.e90) * .e83 - (.e136 * .e357/.e89 + .e513 *
.e10/.e13)) * .e34 - 0.5 * (.e335 * .e10/.e13)) *
.e4))) * .e49 * .e25/.e211) * .e7 + 0.5 * .e354 -
((((1 - (.e240 + 0.5 * .e487)) * .e4/.e13 - (2 *
((.e339 * .e13 + 0.5 * .e394) * .e36) + 8 * ((.e261 *
.e13 + 0.5 * .e488) * .e191 * .e41 * .e13/.e159)))/.e159 +
2 * ((.e412 * .e13 + 0.5 * .e403)/.e154) - .e193 *
(32 * ((.e12 * .e100/.e37 + .e10) * .e12/.e17) -
.e139 * .e100/.e14)/.e283) * .e260 + .e224 *
(32 * (0.5 * .e236 - 2 * .e501) + 8 * (((0.5 -
0.5 * (.e11/.e497)) * .e34 - (.e510 + .e68) *
.e10 * .e7/.e13) * .e34 * .e131 * .e7/.e108) -
(.e218 - .e541) * .e209 * .e70/.e291))) * .e7 +
(((8 * (.e516 * .e126/.e45) - 1/(8 * .e428)) * .e4 *
.e10 - 2 * .e426) * .e7 + 0.25 * .e297 + 0.5 *
(.e425 + 8 * .e177)) * .e27 + 0.5 * (.e411 -
.e400) - 0.5 * ((.e339 * .e36 + (((.e267 - (.e44/2 +
.e76)/.e12) * .e10 - .e276) * .e41 + .e44 * .e261)/.e38 -
.e284 * .e261/.e41)/.e41)), f0 = geno_a * ((.e216 *
(128 * (.e438/.e45) + 2 * ((.e217 * .e168 * .e115 +
.e34 * (4 * .e415 - 2 * (.e61 * .e217 * .e168/.e24))) *
.e131 * .e7/.e108))/.e38 - (((.e158 * (.e217 *
.e381 * .e168 + 32 * (.e415 * .e4)) - 32 * (.e136 *
.e217 * .e168 * .e4)) * .e25 + .e220 * .e217) * .e49/.e211 +
.e224 * .e217 * (64 * .e502 + 8 * .e486))) * .e7 +
16 * (.e438 * .e27/.e45)) * .e7, f2 = geno_a * geno_f *
((.e216 * (2 * ((.e34 * (4 * .e458 - .e61 * .e168/.e24) +
0.5 * (.e168 * .e115)) * .e131 * .e7/.e108) +
64 * (.e355/.e45))/.e38 - (((.e158 * (0.5 * (.e381 *
.e168) + 32 * (.e458 * .e4)) - 16 * (.e136 *
.e168 * .e4)) * .e25 + 0.5 * .e220) * .e49/.e211 +
.e224 * (32 * .e502 + 4 * .e486))) * .e7 + 8 *
.e440) * .e7, f1 = geno_a * (((.e224 * (16 *
(.e34 * .e131 * .e7/.e491) + 64 * (.e25/.e45)) *
.e4 + .e216 * (2 * ((.e34 * (4 * (.e447/.e24) - 4 *
.e511) - 2 * (.e115 * .e4)) * .e131 * .e7/.e491) -
128 * (.e110 * .e25/.e45))/.e38) * .e4 - (((64 *
(.e136 * .e4) - .e158 * (2 * .e381 + 32 * .e511)) *
.e4 * .e25/.e13 + 32 * .e206) * .e4 - .e207) * .e49/.e211) *
.e7 - 16 * .e440) * .e7)
}
deriv_mu_int_b0_bqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e6 <- b0 + geno_b * (b2 - b0)/2
.e7 <- .e6^2
.e8 <- .e7 * .e3
.e9 <- .e5 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e17 <- geno_f * (f2 - f0)/2
.e18 <- f0 + .e17
.e19 <- 2 * (.e10/.e14)
.e20 <- .e11 + .e19
.e21 <- .e18 - f1
.e22 <- tij - t0
.e23 <- .e5 * .e21
.e24 <- 2 * .e10
.e26 <- exp(2 * (.e10 * .e22))
.e27 <- .e18 - m0
.e28 <- .e3/.e10
.e32 <- 2 * (.e23/.e10) - 2 * (.e27 * .e10)
.e33 <- 4 * .e28
.e35 <- 2/.e14 + .e33
.e36 <- t0 * .e10
.e37 <- .e20 * .e26
.e38 <- .e11 - .e37
.e39 <- .e24^2
.e40 <- .e35/.e14
.e41 <- .e20 * .e3
.e42 <- .e3 * .e14
.e43 <- .e7/.e10
.e45 <- exp(-.e36)
.e48 <- .e41 * .e22/.e10
.e49 <- exp(-(2 * .e36))
.e50 <- 0.5 * geno_q
.e51 <- 4 * .e48
.e52 <- t0 * .e20
.e54 <- .e52 * .e3/.e10
.e55 <- .e40 + .e51
.e56 <- 4 * .e54
.e57 <- .e40 - .e56
.e58 <- 1 - .e50
.e59 <- t0 * .e32
.e60 <- .e32/.e12
.e61 <- .e20 * .e39
.e62 <- 0.5 * .e43
.e65 <- .e42/.e24 + 0.5
.e67 <- .e3/.e38 - 0.5
.e68 <- exp(-(tij * .e10))
.e69 <- .e23/.e39
.e70 <- 2 * .e60
.e71 <- 0.5 * .e59
.e76 <- .e70 + 4 * (.e71 + 4 * .e69 + f0 + .e17 - m0)
.e77 <- .e55 * .e26
.e78 <- 2 * .e42
.e80 <- .e76 * .e3/.e10
.e82 <- (-.e19)^2
.e83 <- .e38^2
.e84 <- .e24^3
.e85 <- .e82 * .e14
.e87 <- 1/.e14
.e88 <- 2 * (.e23/.e9)
.e89 <- 2 * .e27
.e91 <- .e43 - .e12/.e3
.e92 <- .e62 - .e13
.e93 <- .e21^2
.e95 <- .e20 * .e12^2 * .e49
.e96 <- t0 * .e65
.e97 <- tij * .e67
.e98 <- .e88 + .e89
.e99 <- .e97/.e10
.e100 <- 2 * .e99
.e105 <- .e35/.e85 + 2 * (.e96/.e10)
.e107 <- 2 * (.e57 * .e10) + 8 * (.e41/.e10)
.e108 <- .e100 - .e77/.e83
.e109 <- .e45^2
.e110 <- .e5 * .e93
.e114 <- 2 * (.e57 * .e32/.e20) + 4 * .e80
.e116 <- .e105 * .e45 + .e108 * .e68
.e117 <- .e84 * .e10
.e119 <- (-(4 * (.e9/.e14)))^2
.e120 <- 2 * .e28
.e123 <- .e91 * .e10/.e78 + .e43
.e126 <- .e92 * .e10/.e78 + .e62
.e127 <- .e28 + 1/(2 * .e14)
.e128 <- .e3^2
.e129 <- .e87 + .e120
.e133 <- .e65 * .e45 + .e67 * .e68
.e134 <- .e20 * .e7
.e135 <- 2 * (.e123/.e14)
.e136 <- 2 * (.e126/.e14)
.e137 <- .e119 * .e14
.e138 <- (2 * (.e38 * .e10))^2
.e139 <- .e38 * .e3
.e140 <- .e107 * .e32
.e141 <- .e5/.e10
.e144 <- .e139/.e10
.e146 <- 32 * .e80 + 64 * (.e140 * .e10/.e61)
.e147 <- .e58 * .e7
.e148 <- .e61 * .e49
.e150 <- .e134 * .e22/.e10
.e151 <- 2 + .e135
.e154 <- .e147 * .e3
.e158 <- .e35/2 + .e87
.e161 <- .e14/.e24 + 1/.e38
.e162 <- 0.5 - 0.5 * (.e8/.e9)
.e164 <- 2 * (.e127/.e14)
.e165 <- 2 * (.e129/.e14)
.e167 <- 2 * (.e35 * .e10) + 8 * .e3
.e169 <- 4 * .e144 - 2 * (.e77 * .e10)
.e174 <- .e128/.e9
.e176 <- 2 * (.e114 * .e32 * .e109/.e95) + 256 * (.e110/.e117)
.e179 <- .e133 * .e146
.e182 <- 0.5 * geno_f
.e183 <- 1 - (.e154/.e9 + .e50)
.e184 <- 32 * (.e116 * .e32 * .e3)
.e185 <- .e179 + .e184
.e186 <- (2 * (.e32 * .e45 * .e3/.e12))^2
.e187 <- .e41/.e9
.e188 <- .e20 * .e49
.e189 <- .e12 * .e10
.e190 <- .e14^2
.e191 <- 1 + .e136
.e193 <- t0 * .e39/.e10
.e195 <- .e167/.e137 + .e169/.e138
.e196 <- 1 - .e182
.e197 <- (.e4 * .e21/.e24)^2
.e198 <- .e24^4
.e199 <- .e110 * .e3
.e201 <- .e61 * .e12 * .e49
.e202 <- .e141 - .e10
.e204 <- 2 * .e141 - .e24
.e205 <- (.e150 + 1 + .e136) * .e26
.e210 <- .e186/.e188 + 32 * (.e197 * .e3)
.e211 <- .e148 * .e10
.e212 <- (.e151 + 2 * .e150) * .e26
.e213 <- .e23/.e198
.e215 <- 1 + 32 * (.e199/.e84)
.e216 <- .e164 + 2 * .e48
.e217 <- .e165 + .e51
.e218 <- 4 * (.e162/.e10)
.e219 <- 4 * (.e183/.e10)
.e221 <- t0 * .e98/.e10
.e222 <- .e55 * .e7
.e224 <- 1 - .e205
.e225 <- 1 - 0.5 * geno_b
.e226 <- 2 - .e212
.e227 <- 2 * .e9
.e228 <- 4 * .e174
.e229 <- 8 * .e174
.e234 <- .e185 * .e4 * .e45 * .e21/.e201 - .e161 * .e176 *
.e3/.e24
.e235 <- .e77 + .e38 * .e35/.e24
.e237 <- .e162 * .e20 + .e191 * .e3
.e238 <- .e20 * (8 - 2 * .e193)
.e239 <- .e42/.e9
.e240 <- .e3 * .e190
.e241 <- .e164 - .e187
.e242 <- .e165 - 2 * .e187
.e243 <- (.e158 * .e91 * .e58/.e42 + .e219)/.e14
.e244 <- (.e158 * .e92/.e42 + .e218)/.e14
.e245 <- (.e158/.e14 - .e228)/.e14
.e246 <- ((.e33 + 4/.e14)/.e14 - .e229)/.e14
.e247 <- .e216 * .e26
.e248 <- .e217 * .e26
.e249 <- 0.5 * .e98
.e250 <- 2 * .e98
.e251 <- .e85^2
.e252 <- .e137^2
.e254 <- .e234 * .e3 - (.e210 * .e195 + .e215 * .e22/.e10)
.e256 <- .e211^2
.e257 <- .e148^2
.e258 <- .e95^2
.e259 <- .e188^2
.e260 <- .e117^2
.e261 <- .e91 * .e58
.e263 <- (.e135 + 4 - .e134/.e9) * .e3 + .e19
.e264 <- .e38 * .e7
.e265 <- .e5/.e39
.e268 <- 2 * ((.e60 + .e88 + .e89)/.e189)
.e269 <- .e98 + 2 * .e59
.e270 <- 4 * (0.5 * .e221 + 32 * .e213)
.e272 <- t0 * .e105 * .e45
.e273 <- t0 * .e12
.e275 <- tij * .e108 * .e68
.e276 <- .e116 * .e98
.e279 <- (.e222 + 4 * .e237) * .e22/.e10 + .e244
.e280 <- .e57 * .e58
.e281 <- .e57 * .e98
.e285 <- .e92/.e240 + .e218
.e286 <- .e58 * .e226
.e288 <- .e191 * .e39 + .e20 * (4 - .e193) * .e7
.e293 <- (16 - 4 * .e193) * .e20 * .e3 + 2 * (.e129 * .e39/.e14)
.e294 <- .e247/.e83
.e295 <- .e248/.e83
.e296 <- .e76/.e9
.e298 <- .e238 * .e7 + .e39 * .e151
.e300 <- .e238 * .e3 + 2 * (.e127 * .e39/.e14)
.e301 <- .e39 * .e5
.e302 <- .e35 * .e7
.e304 <- .e239 + 1/.e24
.e305 <- 0.5 - .e8/.e227
.e307 <- 1/.e12 + t0
.e308 <- 1/.e190
.e310 <- 1/.e10 + 2 * .e239
.e312 <- 2 * .e222 + 4 * .e263
.e314 <- 2 * .e55 + 4 * .e241
.e315 <- 2/.e190
.e317 <- 4 * .e55 + 4 * .e242
.e318 <- .e254 * .e3
.e320 <- .e276 * .e3/.e10
.e322 <- .e243 + .e58 * .e312 * .e22/.e10
.e323 <- .e245 + .e314 * .e3 * .e22
.e324 <- .e288 * .e10
.e325 <- .e293 * .e10
.e326 <- .e298 * .e10
.e327 <- .e300 * .e10
.e329 <- .e281 * .e3/.e10
.e330 <- .e57/.e10
.e331 <- .e55/.e10
.e332 <- .e246 + .e317 * .e3 * .e22
.e335 <- .e261/.e240 + .e219
.e337 <- .e304/.e24
.e338 <- .e65/.e9
.e339 <- .e67/.e9
.e340 <- (0.5 - .e224 * .e3/.e38)/.e38
.e342 <- .e305 * .e14 - .e92/2
.e347 <- (1 - (.e286 * .e3/.e38 + .e50))/.e38
.e351 <- .e183 * .e14 - .e261/2
.e354 <- .e58 * .e35
.e355 <- .e215/.e9
.e356 <- .e310/.e24
.e357 <- (2 - 2 * .e273) * .e20
.e359 <- (2 * (.e202/.e12) + 4 * (0.5 + 0.5 * (t0 * .e202) +
2 * .e265)) * .e3/.e10
.e361 <- (2 * ((0.5 * .e60 + .e249)/.e189) + 4 * (0.25 *
.e221 + 16 * .e213)) * .e7 * .e3
.e363 <- (2 * (.e196 * .e204/.e12) + 4 * ((0.5 * (t0 * .e204) +
4 * .e265) * .e196 + 1 - .e182)) * .e3/.e10
.e364 <- .e176/.e9
.e367 <- .e296 + .e268 + .e270
.e368 <- .e264/.e9
.e369 <- .e264/.e10
.e370 <- .e139/.e9
.e372 <- .e61 * .e7/.e10
.e374 <- .e61 * .e3/.e10
.e375 <- .e20 * .e14
.e377 <- .e301 * .e93/.e260
.e380 <- .e35 * .e3/.e9
.e381 <- .e35/.e10
.e382 <- (4 * (4/.e39 + t0/.e10) + 4/.e189) * .e3
.e386 <- .e5 * .e7 * .e93 * .e3/.e117
.e387 <- .e23 * .e22
.e388 <- .e199/(.e198 * .e10)
.e389 <- .e110/.e84
.e390 <- .e7 * .e14
.e391 <- .e3/.e9
.e392 <- .e14 * .e10
.e393 <- 0.5 * (.e235/.e38)
.e394 <- .e249 + .e59
.e395 <- .e268 + .e270
.e396 <- 2 * ((.e70 + .e250)/.e189)
.e397 <- .e250 + 4 * .e59
.e399 <- 2 * t0 + 2/.e12
.e400 <- .e228 - .e308
.e401 <- 4 * (64 * .e213 + .e221)
.e402 <- 4 * (t0 * .e237/.e10)
.e403 <- 4 * (t0 * (.e183 * .e20 + .e58 * .e151 * .e3)/.e10)
.e404 <- .e229 - .e315
.e405 <- .e272 + .e275
.e406 <- t0 * .e241
.e407 <- t0 * .e242
.e409 <- .e52 * .e7/.e10
c(b0 = ((((((((.e295 - .e100) * .e68 - (.e310/2 + 2 * .e96) *
.e45/.e10) * .e146 + 32 * (((2 * (tij * (.e295 - 2 *
.e339) * .e3/.e10) - (.e332/.e10 + 2 * (.e55 * .e217 *
.e26/.e38)) * .e26/.e83) * .e68 - (.e116 * .e293/.e61 +
((.e404/.e85 + 2 * (t0 * (.e356 + 2 * .e338) * .e3))/.e10 +
.e35 * (8 * (.e129 * .e10/.e14) - .e82/.e10)/.e251) *
.e45 + (2 * .e272 + 2 * .e275) * .e3/.e10)) * .e32 -
2 * .e320) - .e185 * .e399/.e10) * .e3/.e148 + .e133 *
(64 * ((((2 * (.e246 + (2 * .e330 - 4 * .e407) * .e3) +
8 * (.e242 * .e3/.e10)) * .e32 - .e107 * .e397 *
.e3/.e10) * .e10 + .e140 * (.e120 - 2 * (.e325/.e61))) *
.e49/.e257) - 32 * (((.e325 + 2 * .e374) * .e76 *
.e49/.e256 + (.e396 + .e401) * .e3/.e211) * .e3))) *
.e4 * .e45 * .e21/.e12 + ((2 * .e355 + 384 * .e388) *
.e22 - ((.e295 - .e356) * .e176 + .e161 * (2 * ((((2 *
((((.e246 - 4 * (.e407 * .e3))/.e10 - 2 * (.e57 * .e129/.e375)) *
.e32 - 2 * .e329)/.e20) - 4 * ((.e396 + 2 * .e296 +
.e401) * .e128/.e10)) * .e32 - .e114 * .e397 * .e3/.e10)/.e95 -
(.e20 * (4 - 4 * .e273) * .e3/.e10 + 2 * (.e129 * .e12/.e14)) *
.e114 * .e32 * .e12 * .e49/.e258) * .e109) - (2 *
.e364 + 4096 * .e377) * .e3)) * .e3/2)/.e10) * .e3 +
((.e165 - .e56) * .e186 * .e49/.e259 + (256 * .e389 +
8 * ((.e32 * .e399 + .e250) * .e32 * .e109 * .e3/.e95)) *
.e128/.e10) * .e195 - .e210 * (2 * (((2 * .e381 -
8 * .e391) * .e3 + .e315)/.e137) - ((2 * (((.e317 * .e22 +
2 * .e331) * .e3 + .e246) * .e26) + 4 * ((.e248 + 2 *
.e370) * .e3/.e10) + 8 * ((2 * .e144 - .e248 * .e10) *
.e38 * .e169 * .e10/.e138))/.e138 + .e167 * (32 * ((.e9/.e392 +
4 * .e3) * .e9/.e14) - .e119/.e10)/.e252))) * .e3 - 0.5 *
(((.e332 * .e26 - ((.e404/.e10 + 2 * .e380) * .e38 +
.e217 * .e35 * .e26)/2)/.e10 + .e235 * .e217 * .e26/.e38)/.e38)) *
.e7 + .e318 - .e393) * .e225^2, b2 = geno_b * ((((((((.e294 -
.e99) * .e68 - (.e304/2 + .e96) * .e45/.e10) * .e146 +
32 * (((2 * (tij * (.e294 - .e339) * .e3/.e10) - (.e323/.e10 +
2 * (.e55 * .e216 * .e26/.e38)) * .e26/.e83) * .e68 -
(.e116 * .e300/.e61 + ((.e400/.e85 + 2 * (t0 * (.e337 +
.e338) * .e3))/.e10 + .e35 * (8 * (.e127 * .e10/.e14) -
.e82/.e24)/.e251) * .e45 + .e3 * .e405/.e10)) *
.e32 - .e320) - .e185 * .e307/.e10) * .e3/.e148 +
.e133 * (64 * ((((2 * ((.e330 - 4 * .e406) * .e3 + .e245) +
8 * (.e241 * .e3/.e10)) * .e32 - .e107 * .e269 *
.e3/.e10) * .e10 + (.e28 - 2 * (.e327/.e61)) * .e107 *
.e32) * .e49/.e257) - 32 * (((.e327 + .e374) * .e76 *
.e49/.e256 + .e395 * .e3/.e211) * .e3))) * .e4 *
.e45 * .e21/.e12 + ((.e355 + 192 * .e388) * .e22 - ((.e294 -
.e337) * .e176 + .e161 * (2 * ((((2 * ((((.e245 - 4 *
(.e406 * .e3))/.e10 - 2 * (.e57 * .e127/.e375)) * .e32 -
.e329)/.e20) - 4 * (.e367 * .e128/.e10)) * .e32 - .e114 *
.e269 * .e3/.e10)/.e95 - (.e357 * .e3/.e10 + 2 * (.e127 *
.e12/.e14)) * .e114 * .e32 * .e12 * .e49/.e258) * .e109) -
(.e364 + 2048 * .e377) * .e3)) * .e3/2)/.e10) * .e3 +
((128 * .e389 + 8 * ((.e307 * .e32 + .e88 + .e89) * .e32 *
.e109 * .e3/.e95)) * .e128/.e10 + (.e164 - 2 * .e54) *
.e186 * .e49/.e259) * .e195 - .e210 * (2 * (((.e381 -
4 * .e391) * .e3 + .e308)/.e137) - ((2 * (((.e331 + .e314 *
.e22) * .e3 + .e245) * .e26) + 4 * ((.e247 + .e370) *
.e3/.e10) + 8 * ((.e144 - .e247 * .e10) * .e38 * .e169 *
.e10/.e138))/.e138 + .e167 * (32 * ((.e9/(2 * .e392) +
.e11) * .e9/.e14) - .e119/.e24)/.e252))) * .e3 - 0.5 *
(((.e323 * .e26 - ((.e380 + .e400/.e10) * .e38 + .e216 *
.e35 * .e26)/2)/.e10 + .e235 * .e216 * .e26/.e38)/.e38)) *
.e7 + 0.5 * (.e318 - .e393)) * .e225, q0 = (((((((.e351/2 -
.e96 * .e58 * .e7) * .e45/.e10 + (.e347 - .e97 * .e58 *
.e7/.e10) * .e68) * .e146 + 32 * ((((.e335/.e85 + 2 *
(t0 * (.e351/.e24 - .e65 * .e58 * .e7/.e9)/.e10) - .e354 *
(8 * (.e123 * .e10/.e14) - .e82 * .e91/.e11)/.e251) *
.e45 + (2 * (tij * (.e347 - .e67 * .e58 * .e7/.e9)/.e10) -
(.e243 + (.e312 * .e22/.e10 - 2 * (.e55 * .e226/.e38)) *
.e58) * .e26/.e83) * .e68 - .e147 * .e405/.e10) *
.e32 - .e116 * .e58 * .e98 * .e7/.e10) * .e3 + .e116 *
(1 - (.e298 * .e58 * .e3/.e61 + .e50)) * .e32) - .e185 *
.e58 * .e307 * .e7/.e10)/.e148 + .e133 * (32 * (((.e76 -
.e395 * .e7 * .e3)/.e211 - (.e326 + .e372) * .e76 * .e49 *
.e3/.e256) * .e58) + 64 * ((((2 * ((.e243 - .e403) *
.e10 + .e280 * .e7/.e10) + 8 * (.e263 * .e58/.e10)) *
.e32 - .e58 * .e107 * .e269 * .e7/.e10) * .e10 + (.e43 -
2 * (.e326/.e61)) * .e58 * .e107 * .e32) * .e49/.e257))) *
.e4 * .e45 * .e21/.e12 - ((.e161 * (2 * ((((2 * (((.e243 -
(.e280 * .e151/.e20 + .e403)) * .e32 - .e280 * .e98 *
.e7/.e10)/.e20) + 4 * (.e58 * (.e76 - .e367 * .e7 * .e3)/.e10)) *
.e32 - .e58 * .e114 * .e269 * .e7/.e10)/.e95 - (.e357 *
.e7/.e10 + .e151 * .e12) * .e58 * .e114 * .e32 * .e12 *
.e49/.e258) * .e109) - 2048 * (.e58 * .e39 * .e5 * .e7 *
.e93/.e260)) - ((.e91/.e11 + .e390/.e9)/.e24 + .e226/.e83) *
.e58 * .e176) * .e3 + .e161 * .e183 * .e176)/.e24) *
.e3 + .e234 * .e58 - (((.e58 * (4 * (((4 - (.e368 + .e212)) *
.e3 - .e37)/.e10) - 8 * ((.e226 * .e10 + .e369) * .e38 *
.e169 * .e10/.e138)) - 2 * ((.e322 * .e10 + .e55 * .e58 *
.e7/.e10) * .e26))/.e138 + (2 * (.e335 * .e10 + .e354 *
.e7/.e10) + 8 * .e58)/.e137 - .e58 * .e167 * (32 * ((.e9 *
.e91/.e78 + 2 * .e7) * .e9/.e14) - .e119 * .e91/.e11)/.e252) *
.e210 + (.e58 * (32 * (.e197 - 4 * .e386) - .e186 * (.e151 -
2 * .e409) * .e49/.e259) + 8 * (((1 - (.e154/.e189 +
.e50)) * .e32 - .e58 * (.e98 + .e59) * .e7 * .e3/.e10) *
.e32 * .e109 * .e3/.e95)) * .e195 + (32 * ((1 - (.e50 +
6 * (.e154/.e10))) * .e5 * .e93/.e84) - .e58 * .e215 *
.e7/.e9) * .e22/.e10)) * .e3 + .e254 * .e58 - 0.5 * (((((.e91/.e240 -
.e302/.e9) * .e58 + .e219) * .e38 + .e286 * .e35)/.e24 +
.e322 * .e26 - .e235 * .e58 * .e226/.e38)/.e38)) * .e225 *
.e6, q2 = geno_q * (((((((.e342/2 - 0.5 * (.e96 * .e7)) *
.e45/.e10 + (.e340 - 0.5 * (.e97 * .e7/.e10)) * .e68) *
.e146 + 32 * ((((.e285/.e85 + 2 * (t0 * (.e342/.e24 -
0.5 * (.e65 * .e7/.e9))/.e10) - .e35 * (8 * (.e126 *
.e10/.e14) - .e82 * .e92/.e11)/.e251) * .e45 + (2 * (tij *
(.e340 - 0.5 * (.e67 * .e7/.e9))/.e10) - (.e279 - 2 *
(.e55 * .e224/.e38)) * .e26/.e83) * .e68 - (0.5 * .e272 +
0.5 * .e275) * .e7/.e10) * .e32 - 0.5 * (.e276 * .e7/.e10)) *
.e3 + .e116 * (0.5 - .e288 * .e3/.e61) * .e32) - .e185 *
(0.5 * t0 + 0.5/.e12) * .e7/.e10)/.e148 + .e133 * (32 *
((0.5 * .e76 - .e361)/.e211 - (.e324 + 0.5 * .e372) *
.e76 * .e49 * .e3/.e256) + 64 * ((((2 * ((.e244 -
.e402) * .e10 + 0.5 * (.e57 * .e7/.e10)) + 8 * (.e237/.e10)) *
.e32 - .e394 * .e107 * .e7/.e10) * .e10 + (.e62 - 2 *
(.e324/.e61)) * .e107 * .e32) * .e49/.e257))) * .e4 *
.e45 * .e21/.e12 - ((.e161 * (2 * ((((2 * (((.e244 -
(.e57 * .e191/.e20 + .e402)) * .e32 - 0.5 * (.e281 *
.e7/.e10))/.e20) + 4 * ((.e162 * .e76 - .e361)/.e10)) *
.e32 - .e394 * .e114 * .e7/.e10)/.e95 - ((1 - .e273) *
.e20 * .e7/.e10 + .e191 * .e12) * .e114 * .e32 * .e12 *
.e49/.e258) * .e109) - 1024 * (.e301 * .e7 * .e93/.e260)) -
((.e92/.e11 + .e390/.e227)/.e24 + .e224/.e83) * .e176) *
.e3 + .e161 * .e305 * .e176)/.e24) * .e3 + 0.5 * .e234 -
(((2 * (.e285 * .e10 + 0.5 * (.e302/.e10)) + 4)/.e137 +
(4 * (((1 - (.e205 + 0.5 * .e368)) * .e3 + 0.5 *
.e38)/.e10) - (2 * ((.e279 * .e10 + 0.5 * (.e222/.e10)) *
.e26) + 8 * ((.e224 * .e10 + 0.5 * .e369) * .e38 *
.e169 * .e10/.e138)))/.e138 - .e167 * (32 * ((.e9 *
.e92/.e78 + .e7) * .e9/.e14) - .e119 * .e92/.e11)/.e252) *
.e210 + .e195 * (32 * (0.5 * .e197 - 2 * .e386) +
8 * (((0.5 - 0.5 * (.e8/.e189)) * .e32 - (.e249 +
.e71) * .e7 * .e3/.e10) * .e32 * .e109 * .e3/.e95) -
(.e191 - .e409) * .e186 * .e49/.e259) + (32 * ((0.5 -
3 * .e8/.e227) * .e5 * .e93/.e84) - 0.5 * (.e215 *
.e7/.e9)) * .e22/.e10)) * .e3 + 0.5 * .e254 - 0.5 *
((.e279 * .e26 + ((.e285 - .e302/.e227) * .e38 + .e224 *
.e35)/.e24 - .e235 * .e224/.e38)/.e38)) * .e225 *
.e6, f0 = (((.e133 * (32 * .e363 + 64 * (.e196 * .e107 *
.e204 * .e10/.e61)) + 32 * (.e116 * .e196 * .e204 * .e3)) *
.e21 + .e185 * .e196) * .e4 * .e45/.e201 - ((.e195 *
(64 * .e69 + 8 * (.e32 * .e204 * .e109 * .e3/.e95)) +
64 * (.e387/.e117)) * .e196 + .e161 * (2 * ((.e196 *
.e114 * .e204 + (2 * (.e57 * .e196 * .e204/.e20) + 4 *
.e363) * .e32) * .e109/.e95) + 512 * (.e196 * .e5 * .e21/.e117)) *
.e3/.e24)) * .e225 * .e6 * .e128, f2 = geno_f * (((.e133 *
(32 * .e359 + 64 * (.e202 * .e107 * .e10/.e61)) + 32 *
(.e116 * .e202 * .e3)) * .e21 + 0.5 * .e185) * .e4 *
.e45/.e201 - ((.e161 * (2 * ((.e202 * .e114 + (2 * (.e57 *
.e202/.e20) + 4 * .e359) * .e32) * .e109/.e95) + 256 *
(.e23/.e117)) * .e3/2 + 32 * (.e387/.e84))/.e10 + .e195 *
(32 * .e69 + 8 * (.e202 * .e32 * .e109 * .e3/.e95)))) *
.e225 * .e6 * .e128, f1 = ((.e195 * (16 * (.e32 * .e109 *
.e3/(.e95 * .e10)) + 64 * (.e21/.e39)) + .e161 * (2 *
((.e32 * (4 * (.e57/.e20) + 4 * .e382) + 2 * .e114) *
.e109/.e95) + 512 * (.e21/.e84)) * .e3/.e227 + 64 *
(.e21 * .e22/.e117)) * .e4 - ((.e133 * (128 * (.e107/.e61) +
32 * (.e382/.e10)) + 64 * (.e116 * .e3/.e10)) * .e5 *
.e21 + .e179 + .e184) * .e45/.e201) * .e225 * .e4 * .e6 *
.e128)
}
deriv_mu_int_b2_bqff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e6 <- b0 + geno_b * (b2 - b0)/2
.e7 <- .e6^2
.e8 <- .e7 * .e3
.e9 <- .e5 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e17 <- geno_f * (f2 - f0)/2
.e18 <- f0 + .e17
.e19 <- 2 * (.e10/.e14)
.e20 <- .e11 + .e19
.e21 <- .e18 - f1
.e22 <- tij - t0
.e23 <- .e5 * .e21
.e24 <- 2 * .e10
.e26 <- exp(2 * (.e10 * .e22))
.e27 <- .e18 - m0
.e30 <- .e3/.e10
.e32 <- 2 * (.e23/.e10) - 2 * (.e27 * .e10)
.e33 <- t0 * .e10
.e34 <- .e20 * .e26
.e35 <- .e11 - .e34
.e36 <- .e24^2
.e37 <- .e7/.e10
.e39 <- 1/.e14 + 2 * .e30
.e40 <- .e3 * .e14
.e41 <- .e20 * .e3
.e43 <- exp(-.e33)
.e44 <- 0.5 * geno_q
.e46 <- exp(-(2 * .e33))
.e47 <- 1 - .e44
.e50 <- 2 * (.e41 * .e22/.e10)
.e51 <- 4 * .e30
.e52 <- t0 * .e20
.e53 <- 0.5 * .e37
.e54 <- 2 * (.e52 * .e3/.e10)
.e57 <- 0.5 * ((2/.e14 + .e51)/.e14) - .e54
.e59 <- .e39/.e14 + .e50
.e60 <- t0 * .e32
.e61 <- .e32/.e12
.e62 <- 2 * .e40
.e64 <- .e20 * .e36
.e66 <- .e40/.e24 + 0.5
.e68 <- .e3/.e35 - 0.5
.e69 <- exp(-(tij * .e10))
.e70 <- .e23/.e36
.e71 <- 0.5 * .e60
.e72 <- .e61 + 2 * (.e71 + 4 * .e70 + f0 + .e17 - m0)
.e73 <- .e59 * .e26
.e75 <- .e37 - .e12/.e3
.e76 <- .e53 - .e13
.e78 <- .e72 * .e3/.e10
.e80 <- (-.e19)^2
.e81 <- 2 * .e14
.e82 <- .e35^2
.e83 <- .e24^3
.e84 <- 1/.e81
.e85 <- .e80 * .e14
.e87 <- 2 * (.e23/.e9)
.e88 <- 2 * .e27
.e90 <- .e20 * .e12^2 * .e46
.e91 <- .e21^2
.e92 <- t0 * .e66
.e93 <- tij * .e68
.e94 <- .e93/.e10
.e98 <- .e39/.e85 + .e92/.e10
.e101 <- 2 * (.e57 * .e10) + 4 * (.e41/.e10)
.e102 <- .e43^2
.e103 <- .e94 - .e73/.e82
.e104 <- .e87 + .e88
.e107 <- .e75 * .e10/.e62 + .e37
.e110 <- .e76 * .e10/.e62 + .e53
.e111 <- .e30 + .e84
.e115 <- .e98 * .e43 + .e69 * .e103
.e118 <- .e20 * .e7
.e119 <- .e83 * .e10
.e120 <- 2 * (.e107/.e14)
.e121 <- 2 * (.e110/.e14)
.e123 <- 2 * (.e57 * .e32/.e20) + 4 * .e78
.e124 <- .e5 * .e91
.e126 <- (-(4 * (.e9/.e14)))^2
.e127 <- .e5/.e10
.e129 <- .e66 * .e43 + .e68 * .e69
.e130 <- .e47 * .e7
.e132 <- .e118 * .e22/.e10
.e133 <- 2 + .e120
.e134 <- .e126 * .e14
.e136 <- .e130 * .e3
.e137 <- (2 * (.e35 * .e10))^2
.e139 <- 0.5 - 0.5 * (.e8/.e9)
.e140 <- 2 * (.e111/.e14)
.e144 <- .e35 * .e3
.e146 <- 32 * .e78 + 64 * (.e101 * .e32 * .e10/.e64)
.e149 <- .e144/.e10
.e151 <- .e14/.e24 + 1/.e35
.e152 <- 0.5 * geno_f
.e153 <- 1 - (.e136/.e9 + .e44)
.e156 <- .e64 * .e46
.e157 <- .e3^2
.e158 <- 1 + .e121
.e161 <- 2 * (.e39 * .e10) + 4 * .e3
.e163 <- 2 * .e149 - 2 * (.e73 * .e10)
.e166 <- .e129 * .e146
.e171 <- 1 - .e152
.e173 <- 128 * (.e124/.e119) + 2 * (.e123 * .e32 * .e102/.e90)
.e174 <- 32 * (.e115 * .e32 * .e3)
.e175 <- .e166 + .e174
.e176 <- .e12 * .e10
.e178 <- .e39/2 + .e84
.e180 <- .e161/.e134 + .e163/.e137
.e181 <- (2 * (.e32 * .e43 * .e3/.e12))^2
.e182 <- .e20 * .e46
.e183 <- .e127 - .e10
.e184 <- .e14^2
.e186 <- 2 * .e127 - .e24
.e188 <- t0 * .e36/.e10
.e189 <- (.e132 + 1 + .e121) * .e26
.e190 <- (.e4 * .e21/.e24)^2
.e191 <- .e139/.e10
.e192 <- .e153/.e10
.e194 <- .e64 * .e12 * .e46
.e195 <- (.e133 + 2 * .e132) * .e26
.e196 <- .e140 + .e50
.e197 <- .e59 * .e7
.e198 <- .e24^4
.e199 <- .e124 * .e3
.e200 <- .e157/.e9
.e201 <- 1 - .e189
.e202 <- 2 - .e195
.e203 <- 2 * .e9
.e205 <- .e75 * .e47
.e207 <- .e139 * .e20 + .e158 * .e3
.e209 <- .e181/.e182 + 32 * (.e190 * .e3)
.e210 <- .e156 * .e10
.e211 <- .e20 * (8 - 2 * .e188)
.e213 <- .e23/.e198
.e216 <- 0.5 + 16 * (.e199/.e83)
.e217 <- .e140 - .e41/.e9
.e218 <- 2 * .e191
.e219 <- 2 * .e192
.e220 <- 2 * (.e3 * .e184)
.e221 <- .e51 + 4/.e14
.e223 <- t0 * .e104/.e10
.e228 <- .e175 * .e4 * .e43 * .e21/.e194 - .e151 * .e173 *
.e3/.e24
.e229 <- .e196 * .e26
.e230 <- 0.5 * .e104
.e231 <- 2 * .e200
.e232 <- .e73 + .e39 * .e35/.e24
.e233 <- (.e61 + .e87 + .e88)/.e176
.e235 <- (.e120 + 4 - .e118/.e9) * .e3 + .e19
.e236 <- .e35 * .e7
.e237 <- .e5/.e36
.e240 <- .e104 + 2 * .e60
.e241 <- 2 * (0.5 * .e223 + 32 * .e213)
.e242 <- .e85^2
.e243 <- .e134^2
.e245 <- .e228 * .e3 - (.e180 * .e209 + .e216 * .e22/.e10)
.e248 <- (.e197 + 2 * .e207) * .e22/.e10 + (.e178 * .e76/.e40 +
.e218)/.e14
.e249 <- (.e178 * .e75 * .e47/.e40 + .e219)/.e14
.e250 <- (.e178/.e14 - .e231)/.e14
.e251 <- .e210^2
.e252 <- .e156^2
.e253 <- .e90^2
.e254 <- .e182^2
.e255 <- .e119^2
.e258 <- .e57 * .e47
.e260 <- .e76/.e220 + .e218
.e261 <- .e47 * .e39
.e263 <- .e158 * .e36 + .e20 * (4 - .e188) * .e7
.e264 <- .e39 * .e7
.e265 <- .e229/.e82
.e267 <- .e211 * .e7 + .e36 * .e133
.e269 <- .e211 * .e3 + 2 * (.e111 * .e36/.e14)
.e272 <- .e40/.e9 + 1/.e24
.e273 <- 0.5 - .e8/.e203
.e274 <- 1/(2 * .e184)
.e276 <- 1/.e12 + t0
.e278 <- 2 * .e197 + 2 * .e235
.e280 <- 2 * .e59 + 2 * .e217
.e282 <- t0 * .e98 * .e43
.e283 <- t0 * .e12
.e285 <- tij * .e69 * .e103
.e286 <- .e115 * .e104
.e287 <- .e249 + .e47 * .e278 * .e22/.e10
.e288 <- .e250 + .e280 * .e3 * .e22
.e290 <- (.e183/.e12 + 2 * (0.5 + 0.5 * (t0 * .e183) + 2 *
.e237)) * .e3/.e10
.e293 <- ((0.5 * .e61 + .e230)/.e176 + 2 * (0.25 * .e223 +
16 * .e213)) * .e7 * .e3
.e296 <- (.e171 * .e186/.e12 + 2 * ((0.5 * (t0 * .e186) +
4 * .e237) * .e171 + 1 - .e152)) * .e3/.e10
.e297 <- .e263 * .e10
.e299 <- .e233 + .e72/.e9 + .e241
.e300 <- .e233 + .e241
.e301 <- .e267 * .e10
.e302 <- .e269 * .e10
.e305 <- .e205/.e220 + .e219
.e307 <- .e272/.e24
.e308 <- (0.5 - .e201 * .e3/.e35)/.e35
.e310 <- .e273 * .e14 - .e76/2
.e311 <- .e57 * .e104
.e312 <- (1 - (.e47 * .e202 * .e3/.e35 + .e44))/.e35
.e316 <- .e153 * .e14 - .e205/2
.e317 <- (2 - 2 * .e283) * .e20
.e318 <- (2 * (4/.e36 + t0/.e10) + 2/.e176) * .e3
.e319 <- .e236/.e9
.e320 <- .e236/.e10
.e322 <- .e64 * .e7/.e10
.e323 <- .e36 * .e5
.e327 <- .e5 * .e7 * .e91 * .e3/.e119
.e328 <- .e23 * .e22
.e329 <- .e7 * .e14
.e330 <- 0.5 * ((.e205 * .e221/.e62 + 4 * .e192)/.e14)
.e331 <- 0.5 * ((.e76 * .e221/.e62 + 4 * .e191)/.e14)
.e332 <- 0.5 * ((.e221/.e81 - 4 * .e200)/.e14)
.e333 <- .e230 + .e60
.e334 <- .e274 - .e231
.e335 <- 2 * (t0 * .e207/.e10)
.e336 <- 2 * (t0 * (.e153 * .e20 + .e47 * .e133 * .e3)/.e10)
.e337 <- .e282 + .e285
.e338 <- t0 * .e217
.e340 <- .e52 * .e7/.e10
c(b2 = geno_b^2 * ((((((((.e265 - .e94) * .e69 - (.e272/2 +
.e92) * .e43/.e10) * .e146 + 32 * ((((.e334/.e85 - t0 *
(.e307 + .e66/.e9) * .e3)/.e10 - .e39 * (8 * (.e111 *
.e10/.e14) - .e80/.e24)/.e242) * .e43 + .e69 * (tij *
(.e265 - .e68/.e9) * .e3/.e10 - (.e288/.e10 + 2 * (.e59 *
.e196 * .e26/.e35)) * .e26/.e82) - (.e115 * .e269/.e64 +
.e3 * .e337/.e10)) * .e32 - .e286 * .e3/.e10) - .e175 *
.e276/.e10) * .e3/.e156 + .e129 * (64 * ((((2 * ((.e57/.e10 -
2 * .e338) * .e3 + .e332) + 4 * (.e217 * .e3/.e10)) *
.e32 - .e101 * .e240 * .e3/.e10) * .e10 + (.e30 - 2 *
(.e302/.e64)) * .e101 * .e32) * .e46/.e252) - 32 * ((.e300 *
.e3/.e210 + (.e302 + .e64 * .e3/.e10) * .e72 * .e46/.e251) *
.e3))) * .e4 * .e43 * .e21/.e12 + ((.e216/.e9 + 96 *
(.e199/(.e198 * .e10))) * .e22 - ((.e265 - .e307) * .e173 +
.e151 * (2 * ((((2 * ((((.e332 - 2 * (.e338 * .e3))/.e10 -
2 * (.e111 * .e57/(.e20 * .e14))) * .e32 - .e311 *
.e3/.e10)/.e20) - 4 * (.e299 * .e157/.e10)) * .e32 -
.e123 * .e240 * .e3/.e10)/.e90 - (.e317 * .e3/.e10 +
2 * (.e111 * .e12/.e14)) * .e123 * .e32 * .e12 *
.e46/.e253) * .e102) - (.e173/.e9 + 1024 * (.e323 *
.e91/.e255)) * .e3)) * .e3/2)/.e10) * .e3 + ((128 *
(.e124/.e83) + 8 * ((.e276 * .e32 + .e87 + .e88) * .e32 *
.e102 * .e3/.e90)) * .e157/.e10 + (.e140 - .e54) * .e181 *
.e46/.e254) * .e180 - .e209 * (2 * (((.e39/.e10 - 2 *
(.e3/.e9)) * .e3 + .e274)/.e134) - ((2 * (((.e59/.e10 +
.e280 * .e22) * .e3 + .e250) * .e26) + 2 * ((.e229 +
.e144/.e9) * .e3/.e10) + 8 * ((.e149 - .e229 * .e10) *
.e163 * .e35 * .e10/.e137))/.e137 + .e161 * (32 * ((.e9/(2 *
(.e14 * .e10)) + .e11) * .e9/.e14) - .e126/.e24)/.e243))) *
.e3 - 0.5 * (((.e288 * .e26 + ((.e334/.e10 - .e39 * .e3/.e9) *
.e35 - .e39 * .e196 * .e26)/2)/.e10 + .e232 * .e196 *
.e26/.e35)/.e35)) * .e7 + 0.5 * (.e245 * .e3 - 0.5 *
(.e232/.e35))), q0 = geno_b * (((((((.e316/2 - .e92 *
.e47 * .e7) * .e43/.e10 + (.e312 - .e93 * .e47 * .e7/.e10) *
.e69) * .e146 + 32 * ((((.e305/.e85 + t0 * (.e316/.e24 -
.e66 * .e47 * .e7/.e9)/.e10 - .e261 * (8 * (.e107 * .e10/.e14) -
.e80 * .e75/.e11)/.e242) * .e43 + .e69 * (tij * (.e312 -
.e68 * .e47 * .e7/.e9)/.e10 - (.e249 + (.e278 * .e22/.e10 -
2 * (.e59 * .e202/.e35)) * .e47) * .e26/.e82) - .e130 *
.e337/.e10) * .e32 - .e115 * .e47 * .e104 * .e7/.e10) *
.e3 + .e115 * (1 - (.e267 * .e47 * .e3/.e64 + .e44)) *
.e32) - .e175 * .e47 * .e276 * .e7/.e10)/.e156 + .e129 *
(32 * (((.e72 - .e300 * .e7 * .e3)/.e210 - (.e301 + .e322) *
.e72 * .e46 * .e3/.e251) * .e47) + 64 * ((((2 * ((.e330 -
.e336) * .e10 + .e258 * .e7/.e10) + 4 * (.e235 *
.e47/.e10)) * .e32 - .e47 * .e101 * .e240 * .e7/.e10) *
.e10 + (.e37 - 2 * (.e301/.e64)) * .e47 * .e101 *
.e32) * .e46/.e252))) * .e4 * .e43 * .e21/.e12 -
((.e151 * (2 * ((((2 * (((.e330 - (.e258 * .e133/.e20 +
.e336)) * .e32 - .e258 * .e104 * .e7/.e10)/.e20) +
4 * ((.e72 - .e299 * .e7 * .e3) * .e47/.e10)) * .e32 -
.e47 * .e123 * .e240 * .e7/.e10)/.e90 - (.e317 *
.e7/.e10 + .e133 * .e12) * .e47 * .e123 * .e32 *
.e12 * .e46/.e253) * .e102) - 1024 * (.e47 * .e36 *
.e5 * .e7 * .e91/.e255)) - ((.e75/.e11 + .e329/.e9)/.e24 +
.e202/.e82) * .e47 * .e173) * .e3 + .e151 * .e153 *
.e173)/.e24) * .e3 + .e228 * .e47 - (((.e47 * (2 *
(((4 - (.e319 + .e195)) * .e3 - .e34)/.e10) - 8 * ((.e202 *
.e10 + .e320) * .e163 * .e35 * .e10/.e137)) - 2 * ((.e287 *
.e10 + .e59 * .e47 * .e7/.e10) * .e26))/.e137 + (2 *
(.e305 * .e10 + .e261 * .e7/.e10) + 4 * .e47)/.e134 -
.e47 * .e161 * (32 * ((.e9 * .e75/.e62 + 2 * .e7) * .e9/.e14) -
.e126 * .e75/.e11)/.e243) * .e209 + (.e47 * (32 *
(.e190 - 4 * .e327) - .e181 * (.e133 - 2 * .e340) * .e46/.e254) +
8 * (((1 - (.e136/.e176 + .e44)) * .e32 - .e47 * (.e104 +
.e60) * .e7 * .e3/.e10) * .e32 * .e102 * .e3/.e90)) *
.e180 + (16 * ((1 - (.e44 + 6 * (.e136/.e10))) * .e5 *
.e91/.e83) - .e216 * .e47 * .e7/.e9) * .e22/.e10)) *
.e3 + .e245 * .e47 - 0.5 * (((((.e75/.e220 - .e264/.e9) *
.e47 + .e219) * .e35 + .e261 * .e202)/.e24 + .e287 *
.e26 - .e232 * .e47 * .e202/.e35)/.e35)) * .e6, q2 = geno_b *
geno_q * (((((((.e310/2 - 0.5 * (.e92 * .e7)) * .e43/.e10 +
(.e308 - 0.5 * (.e93 * .e7/.e10)) * .e69) * .e146 + 32 *
((((.e260/.e85 + t0 * (.e310/.e24 - 0.5 * (.e66 * .e7/.e9))/.e10 -
.e39 * (8 * (.e110 * .e10/.e14) - .e80 * .e76/.e11)/.e242) *
.e43 + .e69 * (tij * (.e308 - 0.5 * (.e68 * .e7/.e9))/.e10 -
(.e248 - 2 * (.e59 * .e201/.e35)) * .e26/.e82) -
(0.5 * .e282 + 0.5 * .e285) * .e7/.e10) * .e32 -
0.5 * (.e286 * .e7/.e10)) * .e3 + .e115 * (0.5 -
.e263 * .e3/.e64) * .e32) - .e175 * (0.5 * t0 + 0.5/.e12) *
.e7/.e10)/.e156 + .e129 * (32 * ((0.5 * .e72 - .e293)/.e210 -
(.e297 + 0.5 * .e322) * .e72 * .e46 * .e3/.e251) + 64 *
((((2 * ((.e331 - .e335) * .e10 + 0.5 * (.e57 * .e7/.e10)) +
4 * (.e207/.e10)) * .e32 - .e333 * .e101 * .e7/.e10) *
.e10 + (.e53 - 2 * (.e297/.e64)) * .e101 * .e32) *
.e46/.e252))) * .e4 * .e43 * .e21/.e12 - ((.e151 *
(2 * ((((2 * (((.e331 - (.e57 * .e158/.e20 + .e335)) *
.e32 - 0.5 * (.e311 * .e7/.e10))/.e20) + 4 * ((.e72 *
.e139 - .e293)/.e10)) * .e32 - .e333 * .e123 * .e7/.e10)/.e90 -
((1 - .e283) * .e20 * .e7/.e10 + .e158 * .e12) *
.e123 * .e32 * .e12 * .e46/.e253) * .e102) -
512 * (.e323 * .e7 * .e91/.e255)) - ((.e76/.e11 +
.e329/.e203)/.e24 + .e201/.e82) * .e173) * .e3 + .e151 *
.e273 * .e173)/.e24) * .e3 + 0.5 * .e228 - (((2 * (((1 -
(.e189 + 0.5 * .e319)) * .e3 + 0.5 * .e35)/.e10) - (2 *
((.e248 * .e10 + 0.5 * (.e197/.e10)) * .e26) + 8 * ((.e201 *
.e10 + 0.5 * .e320) * .e163 * .e35 * .e10/.e137)))/.e137 +
(2 + 2 * (.e260 * .e10 + 0.5 * (.e264/.e10)))/.e134 -
.e161 * (32 * ((.e9 * .e76/.e62 + .e7) * .e9/.e14) -
.e126 * .e76/.e11)/.e243) * .e209 + .e180 * (32 *
(0.5 * .e190 - 2 * .e327) + 8 * (((0.5 - 0.5 * (.e8/.e176)) *
.e32 - (.e230 + .e71) * .e7 * .e3/.e10) * .e32 * .e102 *
.e3/.e90) - (.e158 - .e340) * .e181 * .e46/.e254) + (16 *
((0.5 - 3 * .e8/.e203) * .e5 * .e91/.e83) - 0.5 * (.e216 *
.e7/.e9)) * .e22/.e10)) * .e3 + 0.5 * .e245 - 0.5 * ((.e248 *
.e26 + ((.e260 - .e264/.e203) * .e35 + .e201 * .e39)/.e24 -
.e232 * .e201/.e35)/.e35)) * .e6, f0 = geno_b * (((.e129 *
(32 * .e296 + 64 * (.e171 * .e101 * .e186 * .e10/.e64)) +
32 * (.e115 * .e171 * .e186 * .e3)) * .e21 + .e175 *
.e171) * .e4 * .e43/.e194 - ((.e180 * (64 * .e70 + 8 *
(.e32 * .e186 * .e102 * .e3/.e90)) + 32 * (.e328/.e119)) *
.e171 + .e151 * (2 * ((.e171 * .e123 * .e186 + (2 * (.e57 *
.e171 * .e186/.e20) + 4 * .e296) * .e32) * .e102/.e90) +
256 * (.e171 * .e5 * .e21/.e119)) * .e3/.e24)) * .e6 *
.e157, f2 = geno_b * geno_f * (((.e129 * (32 * .e290 +
64 * (.e183 * .e101 * .e10/.e64)) + 32 * (.e115 * .e183 *
.e3)) * .e21 + 0.5 * .e175) * .e4 * .e43/.e194 - ((.e151 *
(128 * (.e23/.e119) + 2 * ((.e183 * .e123 + (2 * (.e183 *
.e57/.e20) + 4 * .e290) * .e32) * .e102/.e90)) *
.e3/2 + 16 * (.e328/.e83))/.e10 + .e180 * (32 * .e70 +
8 * (.e183 * .e32 * .e102 * .e3/.e90)))) * .e6 * .e157,
f1 = geno_b * ((.e180 * (16 * (.e32 * .e102 * .e3/(.e90 *
.e10)) + 64 * (.e21/.e36)) + .e151 * (2 * ((.e32 *
(4 * (.e57/.e20) + 4 * .e318) + 2 * .e123) * .e102/.e90) +
256 * (.e21/.e83)) * .e3/.e203 + 32 * (.e21 * .e22/.e119)) *
.e4 - ((.e129 * (128 * (.e101/.e64) + 32 * (.e318/.e10)) +
64 * (.e115 * .e3/.e10)) * .e5 * .e21 + .e166 + .e174) *
.e43/.e194) * .e4 * .e6 * .e157)
}
deriv_mu_int_q0_qff1b_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e4^2
.e8 <- .e6 * .e3
.e9 <- .e7 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e17 <- geno_f * (f2 - f0)/2
.e18 <- f0 + .e17
.e19 <- .e11 + 2 * (.e10/.e14)
.e20 <- tij - t0
.e21 <- .e18 - f1
.e22 <- 2 * .e10
.e23 <- .e6/.e10
.e24 <- .e7 * .e21
.e25 <- .e11^2
.e27 <- 2 * (.e3 * .e10)
.e29 <- exp(2 * (.e10 * .e20))
.e31 <- 2 * (.e12/.e25)
.e33 <- .e6/.e27 - .e31
.e34 <- .e18 - m0
.e36 <- 2 * (.e34 * .e10)
.e37 <- .e24/.e10
.e39 <- 2 * .e37 - .e36
.e40 <- 0.5 * geno_q
.e42 <- .e11 - .e19 * .e29
.e45 <- 2 * (.e33 * .e10/.e14)
.e46 <- t0 * .e10
.e47 <- 2 * .e23
.e48 <- .e45 + .e47
.e49 <- 1 - .e40
.e50 <- .e22^2
.e51 <- .e3 * .e14
.e53 <- .e48/.e14 + 2
.e54 <- .e19 * .e6
.e56 <- exp(-.e46)
.e57 <- 0.5 * .e23
.e59 <- exp(-(2 * .e46))
.e61 <- .e54 * .e20/.e10
.e62 <- 2 * .e61
.e63 <- t0 * .e19
.e64 <- .e12/.e3
.e66 <- .e63 * .e6/.e10
.e67 <- .e3/.e10
.e68 <- 2 * .e51
.e69 <- .e53 + .e62
.e71 <- .e3/.e42 - 0.5
.e72 <- 2 * .e66
.e74 <- .e51/.e22 + 0.5
.e75 <- .e53 - .e72
.e77 <- exp(-(tij * .e10))
.e78 <- t0 * .e39
.e79 <- .e24/.e50
.e80 <- .e69 * .e29
.e81 <- 0.5 * .e78
.e85 <- .e81 + 4 * .e79 + f0 + .e17 - m0
.e86 <- .e19 * .e50
.e87 <- 2 - .e80
.e88 <- .e33 * .e39
.e89 <- .e23 - .e64
.e90 <- .e57 - .e13
.e92 <- 2 * (.e24/.e9)
.e93 <- 2 * .e34
.e99 <- 2 * (.e88 * .e3/.e12) + 2 * (.e85 * .e6/.e10)
.e100 <- .e22^3
.e101 <- .e27^2
.e102 <- .e92 + .e93
.e103 <- .e21^2
.e105 <- .e19 * .e12^2 * .e59
.e106 <- t0 * .e74
.e107 <- 2 * .e67
.e110 <- .e89 * .e10/.e68 + .e23
.e113 <- .e90 * .e10/.e68 + .e57
.e114 <- .e8/.e9
.e115 <- .e67 + 1/(2 * .e14)
.e117 <- 1/.e14 + .e107
.e118 <- .e56^2
.e119 <- tij * .e71
.e121 <- .e74 * .e56 + .e71 * .e77
.e126 <- 1 - (.e49 * .e48 * .e3/.e22 + .e40)
.e128 <- .e106 * .e49 * .e6
.e133 <- 1 - (.e49 * .e87 * .e3/.e42 + .e40)
.e135 <- .e126 * .e14/2
.e136 <- .e100 * .e10
.e137 <- .e128 - .e135
.e140 <- .e119 * .e49 * .e6/.e10
.e146 <- 2 * (.e113/.e14)
.e148 <- 2 * (.e75 * .e39/.e19) + 4 * .e99
.e150 <- 2 * (.e75 * .e10) + 4 * (.e54/.e10)
.e152 <- (.e4 * .e21/.e22)^2
.e154 <- .e133/.e42 - .e140
.e155 <- .e19 * .e3
.e157 <- 2 + 2 * (.e110/.e14)
.e159 <- .e155 * .e20/.e10
.e160 <- .e7/.e10
.e162 <- (-(4 * (.e9/.e14)))^2
.e164 <- .e154 * .e77 - .e56 * .e137/.e10
.e165 <- 1/.e42
.e166 <- .e7 * .e103
.e167 <- .e8/.e101
.e168 <- .e8/.e10
.e170 <- .e14/.e22 + .e165
.e171 <- (2 * (.e39 * .e56 * .e3/.e12))^2
.e172 <- .e42^2
.e173 <- .e19 * .e59
.e174 <- .e5^4
.e175 <- 1/.e11
.e176 <- .e162 * .e14
.e177 <- (2 * (.e42 * .e10))^2
.e178 <- .e42 * .e6
.e180 <- .e86 * .e12 * .e59
.e181 <- 2 - 2 * .e114
.e182 <- .e121 * .e49
.e183 <- .e54/.e9
.e184 <- .e7 * .e6
.e185 <- .e150 * .e39
.e186 <- .e178/.e10
.e187 <- .e184 * .e103
.e188 <- 0.5 * geno_f
.e189 <- .e148 * .e39
.e192 <- .e166/.e100
.e193 <- 1 + .e146
.e195 <- 32 * .e99 + 64 * (.e185 * .e10/.e86)
.e200 <- 1 - .e114
.e201 <- 1 - .e188
.e202 <- 2 * (.e115/.e14)
.e203 <- 2 * (.e117/.e14)
.e205 <- 2 * (.e87 * .e10) + 2 * .e186
.e207 <- 2 * (.e48 * .e10) + 4 * .e6
.e209 <- .e22^4
.e210 <- .e174/(.e9 * .e10)
.e211 <- 2/.e25
.e213 <- t0 * .e50/.e10
.e214 <- (.e61 + 1 + .e146) * .e29
.e221 <- .e160 - .e10
.e223 <- 128 * (.e187/.e136) + 2 * (.e189 * .e118 * .e3/.e105)
.e224 <- 2 * ((.e23 - 2 * .e64)/.e25)
.e225 <- .e202 + 2 * .e159
.e226 <- 2 * ((.e57 - .e64)/.e25)
.e227 <- .e203 + 4 * .e159
.e228 <- 4/.e25
.e229 <- .e164 * .e39
.e230 <- .e182 * .e195
.e234 <- .e171/.e173 + 32 * (.e152 * .e3)
.e235 <- (.e157 + .e62) * .e29
.e236 <- .e168 + .e10
.e237 <- .e51/.e9
.e239 <- 0.5 * .e168 + 0.5 * .e10
.e240 <- 1 - .e214
.e241 <- 1/.e3
.e243 <- 2 * .e160 - .e22
.e244 <- 2 * .e167
.e246 <- 32 * .e152 - .e223 * .e3
.e247 <- 4 * .e167
.e249 <- .e205/.e177 + .e207/.e176
.e250 <- 2 - .e235
.e251 <- 32 * .e229
.e253 <- .e110 * .e33 - (2 * (.e236 * .e6/.e101) + .e224) *
.e10
.e255 <- .e113 * .e33 - (2 * (.e239 * .e6/.e101) + .e226) *
.e10
.e256 <- .e173^2
.e259 <- .e33 * .e115 + .e175 - (.e244 + .e211) * .e3
.e262 <- .e33 * .e117 + .e241 - (.e247 + .e228) * .e3
.e263 <- .e33 * .e102
.e266 <- .e24/.e209
.e267 <- 2 * (.e200/.e10)
.e268 <- 2 * (.e181/.e10)
.e269 <- .e251 - .e230
.e271 <- t0 * .e102/.e10
.e272 <- t0 * .e12
.e273 <- 2 * .e9
.e274 <- .e69 * .e3
.e275 <- .e115 * .e6
.e279 <- .e181 * .e19 + 2 * (.e117 * .e6/.e14)
.e280 <- .e48 * .e3
.e281 <- .e48/.e22
.e282 <- .e225 * .e29
.e283 <- .e227 * .e29
.e284 <- .e19 * (8 - 2 * .e213)
.e286 <- .e193 - 0.5 * .e183
.e287 <- .e175 - 16 * .e192
.e289 <- 1/.e12 + t0
.e290 <- 2 * .e210
.e291 <- .e157 - .e183
.e292 <- ((.e89 * .e48/.e11 + 2 * .e253)/.e14 - .e290)/.e14
.e293 <- ((.e90 * .e48/.e11 + 2 * .e255)/.e14 - .e210)/.e14
.e295 <- (.e281 + 2 * .e259)/.e14 + .e267
.e297 <- (.e48/.e10 + 2 * .e262)/.e14 + .e268
.e298 <- .e282/.e172
.e299 <- .e283/.e172
.e300 <- .e237 + 1/.e22
.e301 <- 0.5 * .e102
.e303 <- 1/.e10 + 2 * .e237
.e304 <- 2 * .e102
.e305 <- 2 * .e78
.e306 <- .e176^2
.e307 <- .e164 * .e102
.e308 <- .e295/.e14
.e309 <- .e297/.e14
.e310 <- .e75 * .e102
.e312 <- .e180^2
.e313 <- .e105^2
.e314 <- .e136^2
.e316 <- .e263 * .e6/.e10
.e317 <- .e263 * .e3
.e318 <- .e33/(.e12 * .e10)
.e319 <- .e33/.e12
.e322 <- .e85/.e9
.e323 <- .e193 * .e50
.e324 <- .e287/.e9
.e327 <- .e289 * .e39 + .e92 + .e93
.e331 <- (2 - .e183) * .e3 + (2 * .e275 + .e22)/.e14
.e332 <- .e280/.e9
.e333 <- .e50 * .e157
.e336 <- .e187 * .e3/.e136
.e337 <- .e166/(.e209 * .e10)
.e338 <- .e7/.e50
.e339 <- .e6 * .e14
.e340 <- .e6/.e9
.e341 <- .e3^2
.e342 <- 0.5 * .e271
.e343 <- 2 - (.e80 + .e48 * .e42/.e22)
.e344 <- 2 * (.e115 * .e50/.e14)
.e345 <- 2 * (.e117 * .e50/.e14)
.e346 <- .e102 + .e305
.e347 <- 2 * .e272
.e348 <- 32 * .e266
.e350 <- .e63 * .e3/.e10
.e351 <- t0/.e10
.e352 <- .e119/.e10
.e353 <- (.e292 + (2 * .e69 + 2 * .e291) * .e6 * .e20/.e10) *
.e29
.e354 <- (.e293 + (.e69 + 2 * .e286) * .e6 * .e20/.e10) *
.e29
.e357 <- .e308 + (2 * .e274 + 2 * .e331) * .e20/.e10
.e358 <- .e309 + (2 * .e279 + 4 * .e274) * .e20/.e10
.e361 <- ((1 - (.e49 * .e6 * .e3/.e9 + .e40)) * .e14 - .e89 *
.e49/2)/2
.e362 <- .e89/.e11
.e363 <- (0.5 - .e240 * .e3/.e42)/.e42
.e365 <- (0.5 - .e8/.e273) * .e14 - .e90/2
.e366 <- .e90/.e11
.e367 <- .e323 + .e19 * (4 - .e213) * .e6
.e370 <- (16 - 4 * .e213) * .e19 * .e3 + .e345
.e372 <- .e284 * .e6 + .e333
.e374 <- .e284 * .e3 + .e344
.e375 <- .e246/.e9
.e377 <- 0.5 * .e39
.e379 <- 0.5 * t0 + 0.5/.e12
.e380 <- 2 * (.e253/.e14)
.e381 <- 2 * (.e255/.e14)
.e383 <- 2 * (.e259/.e14) + .e267
.e385 <- 2 * (.e262/.e14) + .e268
.e387 <- 2 * t0 + 2/.e12
.e388 <- 32 * .e79
.e389 <- 32 * .e192
.e390 <- 64 * (.e21/.e50)
.e394 <- (.e365/2 - 0.5 * (.e106 * .e6)) * .e56/.e10 + (.e363 -
0.5 * (.e119 * .e6/.e10)) * .e77
.e397 <- .e307 * .e6/.e10
.e399 <- .e307 * .e3/.e10
.e402 <- (.e361 - .e128) * .e56/.e10 + ((1 - (.e49 * .e250 *
.e3/.e42 + .e40))/.e42 - .e140) * .e77
.e405 <- (.e362 + .e339/.e9)/.e22
.e408 <- (.e366 + .e339/.e273)/.e22
.e416 <- .e154 * .e3
.e430 <- .e310 * .e6/.e10
.e432 <- .e310 * .e3/.e10
.e434 <- .e75 * .e6/.e10
.e436 <- .e75 * .e3/.e10
.e440 <- (.e298 - .e352) * .e77 - (.e300/2 + .e106) * .e56/.e10
.e442 <- (.e299 - 2 * .e352) * .e77 - (.e303/2 + 2 * .e106) *
.e56/.e10
.e443 <- .e249 * .e234
.e466 <- .e300/.e22
.e467 <- .e71/.e9
.e469 <- .e170 * .e246
.e470 <- .e170 * .e6
.e472 <- .e170 * .e3/.e9
.e488 <- .e240/.e172
.e491 <- .e201 * .e7
.e493 <- (1 - .e347) * .e19 * .e50
.e497 <- .e289 * .e269
.e498 <- .e303/.e22
.e501 <- (128 * .e192 + 8 * (.e327 * .e39 * .e118 * .e3/.e105)) *
.e341/.e10 + (.e202 - 2 * .e350) * .e171 * .e59/.e256
.e503 <- .e87 * .e6/.e10
.e505 <- .e87 * .e3/.e10
.e506 <- .e250/.e172
.e507 <- (2 - .e347) * .e19
.e508 <- (2 * (((.e175 - (.e319 + .e244 + .e211) * .e3) *
.e39 - .e317) * .e3/.e12) + 2 * (.e85 * .e200 - (.e342 +
.e348) * .e6 * .e3))/.e10
.e509 <- (2 * (((.e241 - (2 * .e319 + .e247 + .e228) * .e3) *
.e39 - 2 * .e317) * .e3/.e12) + 2 * (.e85 * .e181 - (64 *
.e266 + .e271) * .e6 * .e3))/.e10
.e510 <- .e148 * .e346
.e511 <- .e150 * .e346
.e513 <- .e48 * .e6/.e10
.e514 <- .e280/.e10
.e520 <- (.e203 - 4 * .e350) * .e171 * .e59/.e256 + (256 *
.e192 + 8 * ((.e39 * .e387 + .e304) * .e39 * .e118 *
.e3/.e105)) * .e341/.e10
.e531 <- .e178/.e9
.e533 <- .e42 * .e3/.e10
.e535 <- .e19 * .e12 * .e59
.e539 <- .e50 * .e7 * .e174 * .e103/.e314
.e542 <- .e50 * .e6 * .e3/.e314
.e545 <- (96 * .e337 - .e324) * .e6 - .e211
.e546 <- .e166/.e136
.e547 <- .e14 * .e10
.e548 <- .e137/.e9
.e551 <- .e301 + .e78
.e552 <- 0.5 * .e269
.e553 <- 1/.e9
.e555 <- 16 * (.e39 * .e118 * .e3/(.e105 * .e10)) + .e390
.e556 <- 16 * .e114
.e557 <- .e380 - (.e45 + 4 * .e23) * .e6/.e9
.e558 <- .e381 - (.e48/2 + .e23) * .e6/.e9
.e559 <- .e383 - .e332
.e560 <- .e385 - 2 * .e332
.e561 <- 2 * ((.e88 - (((.e318 + 2 * (.e236/.e101)) * .e6 +
.e224) * .e39 + .e316) * .e3)/.e12)
.e562 <- 2 * ((.e322 + .e342 + .e348) * .e174/.e10)
.e564 <- 2 * (((0.5 * (t0 * .e243) + 4 * .e338) * .e201 +
1 - .e188) * .e6/.e10) + 2 * (.e33 * .e201 * .e243 *
.e3/.e12)
.e566 <- 2 * (.e221 * .e33 * .e3/.e12) + 2 * ((0.5 + 0.5 *
(t0 * .e221) + 2 * .e338) * .e6/.e10)
.e567 <- 2 * ((0.25 * .e271 + 0.5 * .e322 + 16 * .e266) *
.e174/.e10)
.e568 <- 2 * ((0.5 * .e88 - (((0.5 * .e318 + 2 * (.e239/.e101)) *
.e6 + .e226) * .e39 + 0.5 * .e316) * .e3)/.e12)
.e570 <- 2 * ((4/.e50 + .e351) * .e6) + 4 * (.e33 * .e3/.e12)
.e571 <- .e102 + .e78
.e572 <- .e304 + 4 * .e78
.e573 <- 2 * (t0 * (.e200 * .e19 + 2 * (.e275/.e14))/.e10)
.e574 <- 2 * (t0 * .e279/.e10)
.e575 <- 2 * (t0 * .e286 * .e6/.e10)
.e576 <- 2 * (t0 * .e291 * .e6/.e10)
.e579 <- 32 * (.e152 - 4 * .e336) + 8 * (((2 * .e24 - .e327 *
.e6 * .e3)/.e10 - .e36) * .e39 * .e118 * .e3/.e105) -
.e171 * (.e157 - .e72) * .e59/.e256
.e580 <- .e388 + 8 * (.e221 * .e39 * .e118 * .e3/.e105)
.e583 <- 32 * (0.5 * .e152 - 2 * .e336) + 8 * ((.e377 - (.e379 *
.e39 + .e301) * .e6 * .e3/.e10) * .e39 * .e118 * .e3/.e105) -
(.e193 - .e66) * .e171 * .e59/.e256
.e584 <- 4 * .e272
.e586 <- 64 * .e79 + 8 * (.e39 * .e243 * .e118 * .e3/.e105)
c(q0 = ((((.e545 * .e6/.e10 - .e224) * .e3 + (.e340 + .e175 -
.e389) * .e6/.e10 + .e362 - .e31) * .e20 + ((.e170 *
.e579 - (.e405 + .e470/.e9 + .e506) * .e234)/2 + .e469/2)/.e10 -
(.e443 + 0.5 * ((.e353 + (.e250 * .e48 + .e557 * .e42)/.e22 +
.e343 * .e250/.e42)/.e42))) * .e49 - (((((.e405 +
.e506) * .e246 + (((2 * ((((2 * (((.e292 - (.e75 * .e157/.e19 +
.e576)) * .e39 - .e430)/.e19) + 4 * (.e561 - .e562)) *
.e39 - .e510 * .e6/.e10) * .e3 + .e189)/.e105 - (.e507 *
.e6/.e10 + .e157 * .e12) * .e148 * .e39 * .e12 * .e59 *
.e3/.e313) + 2 * (.e189/.e105)) * .e118 - 1024 * .e539) *
.e3 + (.e375 + 256 * .e546) * .e6) * .e170)/.e22 + ((2 *
(.e503 - .e353 * .e10) + 2 * ((2 - (.e531 + .e235)) *
.e6/.e10) - 8 * ((.e250 * .e10 + .e186) * .e205 * .e42 *
.e10/.e177))/.e177 + 2 * (((.e380 - .e290) * .e10 + .e513)/.e176) -
.e207 * (32 * ((.e9 * .e89/.e68 + 2 * .e6) * .e9/.e14) -
.e162 * .e89/.e11)/.e306) * .e234 + .e249 * .e579) *
.e49 + (64 * .e229 - ((.e402 * .e195 + .e182 * (32 *
(.e561 - (.e372 * .e99/.e86 + .e562)) + 64 * ((((2 *
((.e292 - .e576) * .e10 + .e434) + 4 * (.e291 * .e6/.e10)) *
.e39 - .e511 * .e6/.e10) * .e10 + (.e23 - 2 * (.e372 *
.e10/.e86)) * .e150 * .e39)/.e86)) + .e497 * .e6/.e10 +
32 * ((((.e133 * .e250 + .e49 * (2 - ((.e353 + .e87 *
.e250/.e42) * .e3 + .e80)))/.e172 + tij * ((2 - (.e49 *
(4 - ((.e45 + 2 * .e110 + .e47)/.e14 + 4 + 4 * .e61) *
.e29) * .e3/.e42 + geno_q))/.e42 - .e71 * .e49 *
(.e553 + tij/.e10) * .e6) * .e6/.e10) * .e77 + .e164 *
.e372/.e86 + (.e6 * (t0 * (.e361 + .e135 - .e128)/.e10 -
.e548) + 0.5 * ((.e557 * .e3 + .e45 + .e47) * .e49 *
.e14/.e22 + .e89 * .e126/.e11)) * .e56/.e10) * .e39 +
.e397)) * .e3 + 2 * .e230)) * .e4 * .e56 * .e21/.e180) *
.e3 + 32 * ((((.e402 * .e39 - .e182 * .e571 * .e6/.e10) *
.e3 + .e182 * .e39)/.e180 - ((.e333 + 8 * .e54) * .e12 +
.e493 * .e6/.e10) * .e121 * .e49 * .e39 * .e59 * .e3/.e312) *
.e4 * .e56 * .e21))) * .e49, q2 = geno_q * ((((((48 *
.e337 - 0.5 * .e324) * .e6 - 1/.e25) * .e6/.e10 - .e226) *
.e3 + (0.5 * .e340 - 8 * .e192) * .e6/.e10 + .e366 +
0.5 * (.e287 * .e6/.e10 - .e31)) * .e20 + (.e170 * .e583 -
(.e408 + .e470/.e273 + .e488) * .e234)/.e22 - (0.5 *
((.e354 + (.e240 * .e48 + .e558 * .e42)/.e22 + .e240 *
.e343/.e42)/.e42) + 32 * ((((.e394 * .e39 - .e121 *
(.e301 + .e81) * .e6/.e10) * .e3 + 0.5 * (.e121 * .e39))/.e180 -
((.e323 + 4 * .e54) * .e12 + (0.5 - .e272) * .e19 * .e50 *
.e6/.e10) * .e121 * .e39 * .e59 * .e3/.e312) * .e4 *
.e56 * .e21))) * .e49 + 0.5 * ((.e469/.e22 - .e443) *
.e49 - .e269 * .e4 * .e56 * .e21 * .e3/.e180) - ((((.e408 +
.e488) * .e246 + ((.e246/.e273 + 64 * .e546) * .e6 +
(2 * (((((2 * (((.e293 - (.e75 * .e193/.e19 + .e575)) *
.e39 - 0.5 * .e430)/.e19) + 4 * (.e568 - .e567)) *
.e39 - .e551 * .e148 * .e6/.e10) * .e3 + 0.5 * .e189)/.e105 -
((1 - .e272) * .e19 * .e6/.e10 + .e193 * .e12) *
.e148 * .e39 * .e12 * .e59 * .e3/.e313) * .e118) -
512 * .e539) * .e3 + 0.5 * .e223) * .e170)/.e22 +
((2 * ((1 - (.e214 + 0.5 * .e531)) * .e6/.e10) + 2 *
(0.5 * .e503 - .e354 * .e10) - 8 * ((.e240 * .e10 +
0.5 * .e186) * .e205 * .e42 * .e10/.e177))/.e177 +
2 * (((.e381 - .e210) * .e10 + 0.5 * .e513)/.e176) -
.e207 * (32 * ((.e9 * .e90/.e68 + .e6) * .e9/.e14) -
.e162 * .e90/.e11)/.e306) * .e234 + .e249 * .e583) *
.e49 + (.e552 - ((.e394 * .e195 + .e121 * (32 * (.e568 -
(.e367 * .e99/.e86 + .e567)) + 64 * ((((2 * ((.e293 -
.e575) * .e10 + 0.5 * .e434) + 4 * (.e286 * .e6/.e10)) *
.e39 - .e551 * .e150 * .e6/.e10) * .e10 + (.e57 - 2 *
(.e367 * .e10/.e86)) * .e150 * .e39)/.e86))) * .e49 +
.e379 * .e269 * .e6/.e10 + 32 * (((((0.5 * .e87 - (.e354 +
.e240 * .e87/.e42) * .e3) * .e49 + .e133 * .e240)/.e172 +
tij * ((.e363 - 0.5 * (.e71 * .e6/.e9)) * .e49 + 0.5 *
.e154) * .e6/.e10) * .e77 + .e164 * .e367/.e86 +
(.e6 * (t0 * (.e365 * .e49/2 - 0.5 * .e137)/.e10 - 0.5 *
.e548) + 0.5 * ((.e558 * .e3 + 0.5 * .e48) * .e49 *
.e14/.e22 + .e90 * .e126/.e11)) * .e56/.e10) * .e39 +
0.5 * .e397)) * .e3) * .e4 * .e56 * .e21/.e180) * .e3),
f0 = ((.e170 * (64 * (.e491 * .e21/.e50) - (2 * ((.e201 *
.e148 * .e243 + (2 * (.e75 * .e201 * .e243/.e19) +
4 * .e564) * .e39) * .e118 * .e3/.e105) + 256 * (.e491 *
.e6 * .e21/.e136)) * .e3)/.e22 - .e249 * .e201 *
.e586 * .e3) * .e49 - (.e201 * .e269 + (32 * (.e164 *
.e201 * .e243) - .e182 * (32 * .e564 + 64 * (.e201 *
.e150 * .e243 * .e10/.e86))) * .e21) * .e4 * .e56 *
.e3/.e180) * .e3 + (((8 - .e556) * .e4 * .e21 * .e20 -
32 * (.e121 * ((4 * .e160 - .e22) * .e21 - .e36) *
.e56 * .e3/.e535)) * .e4/.e50 + .e170 * .e586 *
.e3/.e22) * .e201 * .e49, f2 = geno_f * (((.e170 *
(.e388 - (128 * (.e184 * .e21/.e136) + 2 * ((.e221 *
.e148 + (2 * (.e75 * .e221/.e19) + 4 * .e566) *
.e39) * .e118 * .e3/.e105)) * .e3)/.e22 - .e249 *
.e580 * .e3) * .e49 - ((32 * (.e164 * .e221) - .e182 *
(32 * .e566 + 64 * (.e221 * .e150 * .e10/.e86))) *
.e21 + .e552) * .e4 * .e56 * .e3/.e180) * .e3 + (((4 -
8 * .e114) * .e4 * .e21 * .e20 - 32 * ((.e221 * .e21 +
.e377) * .e121 * .e56 * .e3/.e535)) * .e4/.e50 +
.e170 * .e580 * .e3/.e22) * .e49), f1 = (((((2 *
((.e39 * (4 * (.e75/.e19) + 4 * .e570) + 2 * .e148) *
.e118 * .e3/.e105) + 256 * (.e6 * .e21/.e100)) *
.e3/.e10 - .e390) * .e170/.e22 + .e249 * .e555 *
.e3) * .e49 * .e4 - ((.e182 * (128 * (.e150/.e86) +
32 * (.e570/.e10)) - 64 * (.e164/.e10)) * .e7 * .e21 +
.e230 - .e251) * .e56 * .e3/.e180) * .e3 + (((.e556 -
8) * .e21 * .e20/.e50 - .e170 * .e555 * .e3/.e22) *
.e4 - 32 * (.e121 * (.e36 - 4 * .e37) * .e56 * .e3/.e180)) *
.e49) * .e4, b0 = (((((((192 * .e337 - 2 * .e324) *
.e6 - .e228) * .e3 + 2 * .e340 + 2 * .e287 - .e389) *
.e3 - 1) * .e20 + ((.e299 - (.e498 + 2 * .e472)) *
.e234 - .e520 * .e170)/2)/.e10 - (0.5 * (((.e358 -
.e343 * .e227/.e42) * .e29 + (.e560 * .e42 - .e48 *
.e227 * .e29)/.e22)/.e42) + 32 * (((.e442 * .e39 -
.e121 * (.e304 + .e305)/.e10) * .e3/.e180 - .e121 *
((16 * .e155 + .e345) * .e12 + (2 - .e584) * .e19 *
.e50 * .e3/.e10) * .e39 * .e59/.e312) * .e4 *
.e56 * .e21 * .e3))) * .e49 + (((.e442 * .e195 *
.e3 + .e121 * (32 * (.e509 - .e370 * .e99/.e86) +
64 * ((((2 * ((.e309 - .e574) * .e10 + 2 * .e436) +
4 * (.e279/.e10)) * .e39 - .e150 * .e572 * .e3/.e10) *
.e10 + .e185 * (.e107 - 2 * (.e370 * .e10/.e86)))/.e86))) *
.e49 + .e387 * .e269 * .e3/.e10 + 32 * (((((.e87 *
.e227/.e42 - .e358) * .e49 * .e3 - .e133 * .e227) *
.e29/.e172 + tij * (((.e299 - 2 * .e467) * .e6 *
.e3 + 2 * .e71) * .e49 + 2 * .e416)/.e10) * .e77 +
.e164 * .e370/.e86 + (0.5 * (((.e560 * .e14/2 - .e281) *
.e49 * .e3 + 1 - .e40)/.e10) + t0 * .e49 * (2 * .e74 -
.e303 * .e6 * .e3/.e22) - (2 * .e351 + 2/.e9) * .e3 *
.e137) * .e56/.e10) * .e39 + 2 * .e399)) * .e4 *
.e56 * .e21 * .e3/.e180 + (((.e299 - .e498) * .e246 -
((128 * (2/.e136 - 16 * .e542) + 256/.e136) * .e7 *
.e103 + 2 * ((((2 * ((((.e297 - 2 * (.e75 * .e117/.e19))/.e14 -
.e574) * .e39 - 2 * .e432)/.e19) + 4 * .e509) *
.e39 - .e148 * .e572 * .e3/.e10)/.e105 - (.e19 *
(4 - .e584) * .e3/.e10 + 2 * (.e117 * .e12/.e14)) *
.e148 * .e39 * .e12 * .e59/.e313) * .e118 * .e3) +
2 * .e375) * .e170 * .e3)/.e22 + .e520 * .e249 -
((2 * ((.e181 * .e42 - .e227 * .e6 * .e29)/.e10) +
2 * (2 * .e505 - .e358 * .e29 * .e10) - 8 * (.e205 *
(2 * .e533 - .e283 * .e10) * .e42 * .e10/.e177))/.e177 +
(2 * (.e385 * .e10 + 2 * .e514) + 8)/.e176 -
.e207 * (32 * ((.e9/.e547 + 4 * .e3) * .e9/.e14) -
.e162/.e10)/.e306) * .e234) * .e49) * .e3) *
(1 - 0.5 * geno_b) * .e5, b2 = geno_b * ((((.e440 *
.e195 * .e3 + .e121 * (32 * (.e508 - .e374 * .e99/.e86) +
64 * ((((2 * ((.e308 - .e573) * .e10 + .e436) + 4 *
(.e331/.e10)) * .e39 - .e511 * .e3/.e10) * .e10 +
(.e67 - 2 * (.e374 * .e10/.e86)) * .e150 * .e39)/.e86))) *
.e49 + .e497 * .e3/.e10 + 32 * (((((.e87 * .e225/.e42 -
.e357) * .e49 * .e3 - .e133 * .e225) * .e29/.e172 +
tij * ((((.e298 - .e467) * .e6 + .e165) * .e3 - 0.5) *
.e49 + .e416)/.e10) * .e77 + .e164 * .e374/.e86 +
(0.5 * ((.e126/2 + .e49 * .e559 * .e3 * .e14/2)/.e10) +
t0 * ((.e14/2 - .e300 * .e6/2) * .e3/.e10 + 0.5) *
.e49 - (.e553 + .e351) * .e3 * .e137) * .e56/.e10) *
.e39 + .e399)) * .e4 * .e56 * .e21 * .e3/.e180 +
(((.e298 - .e466) * .e246 - ((128 * (1/.e136 - 8 *
.e542) + 128/.e136) * .e7 * .e103 + .e375 + 2 *
((((2 * ((((.e295 - 2 * (.e75 * .e115/.e19))/.e14 -
.e573) * .e39 - .e432)/.e19) + 4 * .e508) *
.e39 - .e510 * .e3/.e10)/.e105 - (.e507 * .e3/.e10 +
2 * (.e115 * .e12/.e14)) * .e148 * .e39 * .e12 *
.e59/.e313) * .e118 * .e3)) * .e170 * .e3)/.e22 +
.e501 * .e249 - ((2 * ((.e200 * .e42 - .e225 *
.e6 * .e29)/.e10) + 2 * (.e505 - .e357 * .e29 *
.e10) - 8 * ((.e533 - .e282 * .e10) * .e205 *
.e42 * .e10/.e177))/.e177 + (2 * (.e383 * .e10 +
.e514) + 4)/.e176 - .e207 * (32 * ((.e9/(2 *
.e547) + .e11) * .e9/.e14) - .e162/.e22)/.e306) *
.e234) * .e49) * .e3 + ((((.e545 * .e3 + .e340 +
.e175 - .e389) * .e3 - 0.5) * .e20 + ((.e298 - (.e466 +
.e472)) * .e234 - .e501 * .e170)/2)/.e10 - (0.5 *
(((.e357 - .e343 * .e225/.e42) * .e29 + (.e559 *
.e42 - .e48 * .e225 * .e29)/.e22)/.e42) + 32 *
(((.e440 * .e39 - .e121 * .e571/.e10) * .e3/.e180 -
.e121 * (.e493 * .e3/.e10 + (.e344 + 8 * .e155) *
.e12) * .e39 * .e59/.e312) * .e4 * .e56 * .e21 *
.e3))) * .e49) * .e5)
}
deriv_mu_int_q2_qff1b_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- b0 + geno_b * (b2 - b0)/2
.e6 <- .e5^2
.e7 <- .e4^2
.e8 <- .e6 * .e3
.e9 <- .e7 + 2 * .e8
.e10 <- sqrt(.e9)
.e11 <- 2 * .e3
.e12 <- .e4 + .e10
.e13 <- .e12/.e11
.e14 <- r0 - .e13
.e17 <- geno_f * (f2 - f0)/2
.e18 <- f0 + .e17
.e19 <- .e11 + 2 * (.e10/.e14)
.e20 <- tij - t0
.e21 <- .e18 - f1
.e22 <- 2 * .e10
.e23 <- .e7 * .e21
.e24 <- .e11^2
.e26 <- 2 * (.e3 * .e10)
.e28 <- exp(2 * (.e10 * .e20))
.e29 <- .e6/.e10
.e32 <- .e6/.e26 - 2 * (.e12/.e24)
.e33 <- .e18 - m0
.e35 <- 2 * (.e33 * .e10)
.e36 <- .e23/.e10
.e38 <- 2 * .e36 - .e35
.e40 <- .e11 - .e19 * .e28
.e41 <- t0 * .e10
.e43 <- .e32 * .e10/.e14
.e44 <- .e22^2
.e45 <- .e43 + .e29
.e47 <- exp(-.e41)
.e48 <- .e3 * .e14
.e49 <- 0.5 * .e29
.e50 <- .e19 * .e6
.e52 <- exp(-(2 * .e41))
.e53 <- .e3/.e10
.e55 <- .e50 * .e20/.e10
.e57 <- 2 * .e43 + 2 * .e29
.e58 <- t0 * .e19
.e60 <- .e3/.e40 - 0.5
.e62 <- .e58 * .e6/.e10
.e64 <- .e48/.e22 + 0.5
.e69 <- 0.5 * (.e57/.e14 + 2) - .e62
.e70 <- exp(-(tij * .e10))
.e73 <- .e45/.e14 + .e55 + 1
.e74 <- .e49 - .e13
.e75 <- t0 * .e38
.e76 <- .e73 * .e28
.e77 <- .e23/.e44
.e78 <- .e19 * .e44
.e79 <- 1 - .e76
.e80 <- 0.5 * .e75
.e84 <- .e80 + 4 * .e77 + f0 + .e17 - m0
.e85 <- .e8/.e9
.e86 <- .e32 * .e38
.e87 <- .e22^3
.e88 <- 2 * .e48
.e89 <- 2 * .e53
.e92 <- .e74 * .e10/.e88 + .e49
.e93 <- .e26^2
.e95 <- .e53 + 1/(2 * .e14)
.e97 <- 1/.e14 + .e89
.e98 <- 2 * (.e23/.e9)
.e99 <- 2 * .e33
.e102 <- .e86 * .e3/.e12 + .e84 * .e6/.e10
.e104 <- .e19 * .e12^2 * .e52
.e105 <- .e98 + .e99
.e106 <- .e45 * .e3
.e107 <- .e87 * .e10
.e108 <- .e47^2
.e109 <- t0 * .e64
.e110 <- tij * .e60
.e111 <- .e79 * .e3
.e112 <- .e21^2
.e114 <- .e64 * .e47 + .e60 * .e70
.e115 <- .e19 * .e3
.e117 <- 0.5 - .e111/.e40
.e120 <- (2 * (.e8/.e93) + 2/.e24) * .e3
.e122 <- .e115 * .e20/.e10
.e123 <- .e7/.e10
.e124 <- 0.5 - .e106/.e22
.e125 <- 0.5 * (.e109 * .e6)
.e126 <- 0.5 * (.e110 * .e6/.e10)
.e127 <- 2 * (.e92/.e14)
.e131 <- .e117/.e40 - .e126
.e134 <- .e125 - .e124 * .e14/2
.e136 <- 2 * (.e69 * .e10) + 2 * (.e50/.e10)
.e139 <- 2 - 2 * .e85
.e141 <- 2 * (.e69 * .e38/.e19) + 4 * .e102
.e143 <- .e131 * .e70 - .e134 * .e47/.e10
.e144 <- 1/.e40
.e146 <- (-(4 * (.e9/.e14)))^2
.e147 <- (.e4 * .e21/.e22)^2
.e149 <- .e78 * .e12 * .e52
.e151 <- .e14/.e22 + .e144
.e152 <- .e40^2
.e153 <- 0.5 * geno_f
.e154 <- 1 - .e85
.e155 <- .e146 * .e14
.e158 <- (2 * (.e38 * .e47 * .e3/.e12))^2
.e159 <- (2 * (.e40 * .e10))^2
.e160 <- .e19 * .e52
.e161 <- .e7 * .e6
.e162 <- 1 - .e153
.e163 <- 2 * (.e95/.e14)
.e164 <- 2 * (.e97/.e14)
.e165 <- .e136 * .e38
.e166 <- .e40 * .e6
.e167 <- .e161 * .e112
.e168 <- (.e55 + 1 + .e127) * .e28
.e174 <- .e166/.e10
.e175 <- .e123 - .e10
.e176 <- .e5^4
.e177 <- 1 + .e127
.e178 <- 1/.e11
.e179 <- 1/.e3
.e180 <- .e163 + 2 * .e122
.e182 <- 2 * ((0.5 * (.e8/.e10) + 0.5 * .e10) * .e6/.e93) +
2 * ((.e49 - .e12/.e3)/.e24)
.e183 <- .e164 + 4 * .e122
.e184 <- 2 * .e120
.e186 <- 32 * .e102 + 64 * (.e165 * .e10/.e78)
.e189 <- .e174 + 2 * (.e79 * .e10)
.e190 <- .e167/.e107
.e191 <- .e48/.e9
.e192 <- 1 - .e168
.e194 <- 2 * (.e45 * .e10) + 2 * .e6
.e196 <- 2 * .e123 - .e22
.e197 <- .e141 * .e38
.e199 <- t0 * .e44/.e10
.e201 <- .e114 * .e186
.e202 <- .e92 * .e32
.e203 <- .e32 * .e95
.e204 <- .e32 * .e97
.e205 <- .e154/.e10
.e206 <- .e139/.e10
.e210 <- .e182 * .e10
.e212 <- 2 * (.e197 * .e108 * .e3/.e104) + 64 * .e190
.e213 <- 32 * (.e143 * .e38)
.e215 <- .e189/.e159 + .e194/.e155
.e220 <- .e158/.e160 + 32 * (.e147 * .e3)
.e221 <- .e50/.e9
.e222 <- .e7 * .e112
.e223 <- .e176/(.e9 * .e10)
.e224 <- 0.5 * .e105
.e226 <- 16 * .e147 - .e212 * .e3
.e227 <- 2 * .e9
.e228 <- 2 * .e105
.e229 <- .e213 - .e201
.e230 <- .e160^2
.e231 <- .e107^2
.e232 <- .e95 * .e6
.e236 <- .e139 * .e19 + 2 * (.e97 * .e6/.e14)
.e237 <- .e180 * .e28
.e238 <- .e183 * .e28
.e239 <- .e38/.e12
.e241 <- .e23/.e22^4
.e243 <- t0 * .e105/.e10
.e244 <- t0 * .e12
.e245 <- .e202 - .e210
.e247 <- .e203 + .e178 - .e120
.e249 <- .e204 + .e179 - .e184
.e250 <- .e237/.e152
.e251 <- .e238/.e152
.e252 <- .e191 + 1/.e22
.e254 <- 1/.e10 + 2 * .e191
.e255 <- t0/.e10
.e256 <- .e106/.e9
.e257 <- .e45/.e22
.e260 <- .e177 * .e44
.e263 <- (2 * .e232 + .e22)/.e14
.e266 <- .e44 * .e6 * .e3/.e231
.e267 <- .e222/.e87
.e268 <- .e7/.e44
.e269 <- .e3^2
.e270 <- 0.5 * .e223
.e271 <- 0.5/.e9
.e272 <- 2 * (.e95 * .e44/.e14)
.e273 <- 2 * (.e97 * .e44/.e14)
.e275 <- .e58 * .e3/.e10
.e276 <- .e110/.e10
.e277 <- .e155^2
.e278 <- (((.e45 * .e74/.e11 + .e202 - .e210)/.e14 - .e270)/.e14 +
((.e45 + 2 * .e92)/.e14 + (.e20/.e10 - .e271) * .e19 *
.e6 + 2) * .e6 * .e20/.e10) * .e28
.e280 <- ((.e257 + .e203 + .e178 - .e120)/.e14 + .e205)/.e14 +
(.e263 + (2 + 2 * .e73 - .e221) * .e3) * .e20/.e10
.e282 <- ((.e45/.e10 + .e204 + .e179 - .e184)/.e14 + .e206)/.e14 +
(.e236 + 4 * (.e73 * .e3)) * .e20/.e10
.e284 <- .e143 * .e105
.e285 <- .e245/.e14
.e287 <- .e247/.e14 + .e205
.e289 <- .e249/.e14 + .e206
.e290 <- .e149^2
.e291 <- .e104^2
.e292 <- (0.5 - .e192 * .e3/.e40)/.e40
.e294 <- (0.5 - .e8/.e227) * .e14 - .e74/2
.e295 <- .e69 * .e105
.e296 <- .e74/.e11
.e297 <- .e260 + .e19 * (4 - .e199) * .e6
.e300 <- (16 - 4 * .e199) * .e19 * .e3 + .e273
.e303 <- .e19 * (8 - 2 * .e199) * .e3 + .e272
.e304 <- .e21/.e44
.e306 <- 0.5 * .e38
.e308 <- 0.5 * t0 + 0.5/.e12
.e309 <- 1 - (.e76 + .e45 * .e40/.e22)
.e310 <- .e177 - 0.5 * .e221
.e311 <- .e178 - .e120
.e313 <- 1/.e12 + t0
.e314 <- .e179 - .e184
.e315 <- 2 * .e75
.e317 <- 2 * t0 + 2/.e12
.e318 <- (((.e311 * .e38 - (.e239 + .e98 + .e99) * .e32 *
.e3)/.e12 - (0.5 * .e243 + 32 * .e241) * .e6) * .e3 +
.e84 * .e154)/.e10
.e319 <- (((.e314 * .e38 - .e32 * (2 * .e239 + .e228) * .e3)/.e12 -
(64 * .e241 + .e243) * .e6) * .e3 + .e84 * .e139)/.e10
.e323 <- .e284 * .e3/.e10
.e326 <- (.e294/2 - .e125) * .e47/.e10 + (.e292 - .e126) *
.e70
.e328 <- .e285 - (.e45/2 + .e49) * .e6/.e9
.e329 <- .e287 - .e256
.e331 <- .e289 - 2 * .e256
.e332 <- .e106/.e10
.e335 <- .e131 * .e3
.e336 <- (.e296 + .e6 * .e14/.e227)/.e22
.e339 <- ((0.5 * (t0 * .e196) + 4 * .e268) * .e162 + 1 -
.e153) * .e6/.e10 + .e32 * .e162 * .e196 * .e3/.e12
.e350 <- (.e57/.e22 + 2 * .e247)/.e14 + 2 * .e205
.e352 <- (.e57/.e10 + 2 * .e249)/.e14 + 2 * .e206
.e354 <- (.e250 - .e276) * .e70 - (.e252/2 + .e109) * .e47/.e10
.e356 <- (.e251 - 2 * .e276) * .e70 - (.e254/2 + 2 * .e109) *
.e47/.e10
.e364 <- .e175 * .e32 * .e3/.e12 + (0.5 + 0.5 * (t0 * .e175) +
2 * .e268) * .e6/.e10
.e371 <- .e252/.e22
.e372 <- .e60/.e9
.e375 <- .e151 * .e3/.e9
.e377 <- (0.25 * .e243 + 0.5 * (.e84/.e9) + 16 * .e241) *
.e176/.e10
.e378 <- (0.5 * .e86 - (.e32 * (0.5 * .e239 + .e224) * .e6/.e10 +
.e182 * .e38) * .e3)/.e12
.e380 <- .e295 * .e3/.e10
.e382 <- .e69 * .e3/.e10
.e387 <- .e111/.e10
.e388 <- .e192/.e152
.e391 <- .e162 * .e7
.e395 <- .e254/.e22
.e398 <- (128 * .e267 + 8 * ((.e313 * .e38 + .e98 + .e99) *
.e38 * .e108 * .e3/.e104)) * .e269/.e10 + (.e163 - 2 *
.e275) * .e158 * .e52/.e230
.e399 <- .e226/.e9
.e403 <- (.e164 - 4 * .e275) * .e158 * .e52/.e230 + (256 *
.e267 + 8 * ((.e38 * .e317 + .e228) * .e38 * .e108 *
.e3/.e104)) * .e269/.e10
.e412 <- .e40 * .e3/.e10
.e416 <- .e44 * .e7 * .e176 * .e112/.e231
.e418 <- (4/.e44 + .e255) * .e6 + 2 * (.e32 * .e3/.e12)
.e422 <- .e222 * .e3/.e87
.e423 <- .e14 * .e10
.e424 <- 0.5 * (((.e74 * .e57/.e11 + 2 * .e245)/.e14 - .e223)/.e14)
.e427 <- .e224 + .e75
.e428 <- 0.5 * .e229
.e430 <- 1/.e107 - 8 * .e266
.e432 <- 16 * (.e38 * .e108 * .e3/(.e104 * .e10)) + 64 *
.e304
.e434 <- .e105 + .e315
.e435 <- .e228 + 4 * .e75
.e436 <- 2 * .e244
.e438 <- 2/.e107 - 16 * .e266
.e440 <- 32 * .e77 + 8 * (.e175 * .e38 * .e108 * .e3/.e104)
.e443 <- 32 * (0.5 * .e147 - 2 * (.e167 * .e3/.e107)) + 8 *
((.e306 - (.e308 * .e38 + .e224) * .e6 * .e3/.e10) *
.e38 * .e108 * .e3/.e104) - (.e177 - .e62) * .e158 *
.e52/.e230
.e444 <- 4 * .e244
.e446 <- 64 * .e77 + 8 * (.e38 * .e196 * .e108 * .e3/.e104)
.e447 <- 8 * .e190
.e448 <- 8 * .e85
.e450 <- t0 * (.e154 * .e19 + 2 * (.e232/.e14))/.e10
.e452 <- t0 * .e236/.e10
.e455 <- t0 * .e310 * .e6/.e10
c(q2 = geno_q^2 * (((32 * .e416 - 0.5 * .e182) * .e3 + 0.25 *
.e223 + 0.5 * (.e296 - .e447) + 0.5 * (0.5 * .e32 - .e447)) *
.e20 + 0.5 * ((.e151 * .e443 - (.e336 + .e151 * .e6/.e227 +
.e388) * .e220)/.e22 - 32 * ((((.e326 * .e38 - .e114 *
(.e224 + .e80) * .e6/.e10) * .e3 + 0.5 * (.e114 * .e38))/.e149 -
((.e260 + 4 * .e50) * .e12 + (0.5 - .e244) * .e19 * .e44 *
.e6/.e10) * .e114 * .e38 * .e52 * .e3/.e290) * .e4 *
.e47 * .e21)) + 0.5 * (.e151 * .e226/.e22 - (.e215 *
.e220 + .e229 * .e4 * .e47 * .e21 * .e3/.e149)) - ((((.e336 +
.e388) * .e226 + ((.e226/.e227 + 32 * (.e222/.e107)) *
.e6 + (2 * (((((2 * (((.e424 - (.e69 * .e177/.e19 + .e455)) *
.e38 - 0.5 * (.e295 * .e6/.e10))/.e19) + 4 * (.e378 -
.e377)) * .e38 - .e427 * .e141 * .e6/.e10) * .e3 + 0.5 *
.e197)/.e104 - ((1 - .e244) * .e19 * .e6/.e10 + .e177 *
.e12) * .e141 * .e38 * .e12 * .e52 * .e3/.e291) * .e108) -
256 * .e416) * .e3 + 0.5 * .e212) * .e151)/.e22 + (((1 -
(.e168 + 0.5 * (.e166/.e9))) * .e6/.e10 + 2 * (0.5 *
(.e79 * .e6/.e10) - .e278 * .e10) - 8 * ((.e192 * .e10 +
0.5 * .e174) * .e189 * .e40 * .e10/.e159))/.e159 + 2 *
(((.e285 - .e270) * .e10 + 0.5 * (.e45 * .e6/.e10))/.e155) -
.e194 * (32 * ((.e9 * .e74/.e88 + .e6) * .e9/.e14) -
.e146 * .e74/.e11)/.e277) * .e220 + .e215 * .e443 +
(.e428 - (.e326 * .e186 + .e114 * (32 * (.e378 - (.e102 *
.e297/.e78 + .e377)) + 64 * ((((2 * ((.e424 - .e455) *
.e10 + 0.5 * (.e69 * .e6/.e10)) + 2 * (.e310 * .e6/.e10)) *
.e38 - .e427 * .e136 * .e6/.e10) * .e10 + (.e49 -
2 * (.e297 * .e10/.e78)) * .e136 * .e38)/.e78)) +
.e308 * .e229 * .e6/.e10 + 32 * ((((.e117 * .e192 +
0.5 * .e79 - (.e278 + .e79 * .e192/.e40) * .e3)/.e152 +
tij * (0.5 * .e131 + 0.5 * (.e292 - 0.5 * (.e60 *
.e6/.e9))) * .e6/.e10) * .e70 + .e143 * .e297/.e78 +
(.e6 * (t0 * .e294/(4 * .e10) - .e134 * (0.5 * .e255 +
.e271)) + 0.5 * ((.e328 * .e3 + 0.5 * .e45) *
.e14/.e22 + .e124 * .e74/.e11)) * .e47/.e10) *
.e38 + 0.5 * (.e284 * .e6/.e10))) * .e3) * .e4 *
.e47 * .e21/.e149) * .e3 + 0.5 * ((.e278 + (.e328 *
.e40 + .e45 * .e192)/.e22 + .e309 * .e192/.e40)/.e40))),
f0 = geno_q * ((.e151 * (32 * (.e391 * .e21/.e44) - (128 *
(.e391 * .e6 * .e21/.e107) + 2 * ((.e162 * .e141 *
.e196 + (2 * (.e69 * .e162 * .e196/.e19) + 4 * .e339) *
.e38) * .e108 * .e3/.e104)) * .e3)/.e22 - (.e215 *
.e162 * .e446 + (.e162 * .e229 + (32 * (.e143 * .e162 *
.e196) - .e114 * (32 * .e339 + 64 * (.e162 * .e136 *
.e196 * .e10/.e78))) * .e21) * .e4 * .e47/.e149) *
.e3) * .e3 + ((4 - .e448) * .e7 * .e21 * .e20/.e44 +
0.5 * ((.e151 * .e446/.e22 - 32 * (.e114 * ((4 *
.e123 - .e22) * .e21 - .e35) * .e4 * .e47/.e149)) *
.e3)) * .e162), f2 = geno_f * geno_q * ((.e151 *
(16 * .e77 - (2 * ((.e175 * .e141 + (2 * (.e175 *
.e69/.e19) + 4 * .e364) * .e38) * .e108 * .e3/.e104) +
64 * (.e161 * .e21/.e107)) * .e3)/.e22 + 0.5 *
(.e151 * .e440/.e22 - 32 * ((.e175 * .e21 + .e306) *
.e114 * .e4 * .e47/.e149)) - (.e215 * .e440 +
((32 * (.e143 * .e175) - .e114 * (32 * .e364 + 64 *
(.e175 * .e136 * .e10/.e78))) * .e21 + .e428) *
.e4 * .e47/.e149) * .e3) * .e3 + (2 - 4 * .e85) *
.e7 * .e21 * .e20/.e44), f1 = geno_q * ((((128 *
(.e6 * .e21/.e87) + 2 * ((.e38 * (4 * (.e69/.e19) +
4 * .e418) + 2 * .e141) * .e108 * .e3/.e104)) * .e3/.e10 -
32 * .e304) * .e151 * .e4/.e22 - ((((.e114 * (128 *
(.e136/.e78) + 32 * (.e418/.e10)) - 64 * (.e143/.e10)) *
.e7 * .e21 + .e201 - .e213) * .e47/.e149 - .e215 *
.e432 * .e4) * .e3 + 0.5 * (.e151 * .e432 * .e4/.e22 +
32 * (.e114 * (.e35 - 4 * .e36) * .e47/.e149)))) *
.e3 + (.e448 - 4) * .e4 * .e21 * .e20/.e44) * .e4,
b0 = geno_q * ((((.e356 * .e186 + .e317 * .e229/.e10) *
.e3 + .e114 * (32 * (.e319 - .e102 * .e300/.e78) +
64 * ((((2 * (.e236/.e10) + 2 * ((0.5 * (.e352/.e14) -
.e452) * .e10 + 2 * .e382)) * .e38 - .e136 *
.e435 * .e3/.e10) * .e10 + .e165 * (.e89 - 2 *
(.e300 * .e10/.e78)))/.e78)) + 32 * (((((.e79 *
.e183/.e40 - .e282) * .e3 - .e117 * .e183) * .e28/.e152 +
tij * (0.5 * ((.e251 - 2 * .e372) * .e6 * .e3 + 2 *
.e60) + 2 * .e335)/.e10) * .e70 + .e143 * .e300/.e78 +
(0.5 * (((.e331 * .e14/2 - .e257) * .e3 + 0.5)/.e10) +
0.5 * (t0 * (2 * .e64 - .e254 * .e6 * .e3/.e22)) -
.e134 * (2 * .e255 + 2/.e9) * .e3) * .e47/.e10) *
.e38 + 2 * .e323)) * .e4 * .e47 * .e21 * .e3/.e149 +
((.e251 - .e395) * .e226 - ((128/.e107 + 64 * .e438) *
.e7 * .e112 + 2 * ((((2 * ((((0.5 * .e352 - 2 *
(.e69 * .e97/.e19))/.e14 - .e452) * .e38 - 2 *
.e380)/.e19) + 4 * .e319) * .e38 - .e141 * .e435 *
.e3/.e10)/.e104 - (.e19 * (4 - .e444) * .e3/.e10 +
2 * (.e97 * .e12/.e14)) * .e141 * .e38 * .e12 *
.e52/.e291) * .e108 * .e3) + 2 * .e399) * .e151 *
.e3)/.e22 + .e215 * .e403 - (((.e139 * .e40 -
.e183 * .e6 * .e28)/.e10 + 2 * (2 * .e387 - .e282 *
.e28 * .e10) - 8 * (.e189 * (2 * .e412 - .e238 *
.e10) * .e40 * .e10/.e159))/.e159 + (2 * (.e289 *
.e10 + 2 * .e332) + 4)/.e155 - .e194 * (32 * ((.e9/.e423 +
4 * .e3) * .e9/.e14) - .e146/.e10)/.e277) * .e220) *
.e3 + ((0.5 * (.e314/.e10) - 8 * (.e438 * .e7 * .e112)) *
.e3 + (0.5 * (1 - 32 * .e422) - 0.5 * .e139)/.e10) *
.e20 + 0.5 * (((.e251 - (.e395 + 2 * .e375)) * .e220 -
.e403 * .e151)/.e22 - 32 * (((.e356 * .e38 - .e114 *
(.e228 + .e315)/.e10) * .e3/.e149 - .e114 * ((16 *
.e115 + .e273) * .e12 + (2 - .e444) * .e19 * .e44 *
.e3/.e10) * .e38 * .e52/.e290) * .e4 * .e47 * .e21 *
.e3)) - 0.5 * (((.e282 - .e309 * .e183/.e40) * .e28 +
(.e331 * .e40 - .e45 * .e183 * .e28)/.e22)/.e40)) *
(1 - 0.5 * geno_b) * .e5, b2 = geno_b * geno_q *
((((.e354 * .e186 + .e313 * .e229/.e10) * .e3 + .e114 *
(32 * (.e318 - .e102 * .e303/.e78) + 64 * ((((2 *
(((2 - .e221) * .e3 + .e263)/.e10) + 2 * ((0.5 *
(.e350/.e14) - .e450) * .e10 + .e382)) * .e38 -
.e136 * .e434 * .e3/.e10) * .e10 + (.e53 -
2 * (.e303 * .e10/.e78)) * .e136 * .e38)/.e78)) +
32 * (((((.e79 * .e180/.e40 - .e280) * .e3 -
.e117 * .e180) * .e28/.e152 + tij * (.e335 +
0.5 * (((.e250 - .e372) * .e6 + .e144) * .e3 -
0.5))/.e10) * .e70 + .e143 * .e303/.e78 +
(0.5 * ((.e329 * .e3 * .e14/2 + .e124/2)/.e10) +
0.5 * (t0 * ((.e14/2 - .e252 * .e6/2) * .e3/.e10 +
0.5)) - .e134 * (1/.e9 + .e255) * .e3) *
.e47/.e10) * .e38 + .e323)) * .e4 * .e47 *
.e21 * .e3/.e149 + ((.e250 - .e371) * .e226 -
(.e399 + (64 * .e430 + 64/.e107) * .e7 * .e112 +
2 * ((((2 * ((((0.5 * .e350 - 2 * (.e95 * .e69/.e19))/.e14 -
.e450) * .e38 - .e380)/.e19) + 4 * .e318) *
.e38 - .e141 * .e434 * .e3/.e10)/.e104 -
((2 - .e436) * .e19 * .e3/.e10 + 2 * (.e95 *
.e12/.e14)) * .e141 * .e38 * .e12 * .e52/.e291) *
.e108 * .e3)) * .e151 * .e3)/.e22 + .e215 *
.e398 - (((.e154 * .e40 - .e180 * .e6 * .e28)/.e10 +
2 * (.e387 - .e280 * .e28 * .e10) - 8 * (.e189 *
(.e412 - .e237 * .e10) * .e40 * .e10/.e159))/.e159 +
(2 + 2 * (.e287 * .e10 + .e332))/.e155 - .e194 *
(32 * ((.e9/(2 * .e423) + .e11) * .e9/.e14) -
.e146/.e22)/.e277) * .e220) * .e3 + ((0.5 *
(.e311/.e10) - 8 * (.e430 * .e7 * .e112)) * .e3 +
(0.5 * (0.5 - 16 * .e422) - 0.5 * .e154)/.e10) *
.e20 + 0.5 * (((.e250 - (.e371 + .e375)) * .e220 -
.e398 * .e151)/.e22 - 32 * (((.e354 * .e38 -
.e114 * (.e105 + .e75)/.e10) * .e3/.e149 - .e114 *
((1 - .e436) * .e19 * .e44 * .e3/.e10 + (.e272 +
8 * .e115) * .e12) * .e38 * .e52/.e290) * .e4 *
.e47 * .e21 * .e3)) - 0.5 * (((.e280 - .e309 *
.e180/.e40) * .e28 + (.e329 * .e40 - .e45 * .e180 *
.e28)/.e22)/.e40)) * .e5)
}
deriv_mu_int_f0_ff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e7 <- sqrt(.e5 + 2 * ((b0 + geno_b * (b2 - b0)/2)^2 * .e3))
.e8 <- 2 * .e3
.e9 <- 2 * .e7
.e10 <- .e4 + .e7
.e12 <- r0 - .e10/.e8
.e13 <- t0 * .e7
.e14 <- .e8 + 2 * (.e7/.e12)
.e16 <- .e9^2
.e17 <- .e5/.e7
.e18 <- exp(-.e13)
.e19 <- tij - t0
.e23 <- 2 * .e17 - .e9
.e24 <- .e8 - .e14 * exp(2 * (.e7 * .e19))
.e25 <- exp(-(2 * .e13))
.e28 <- (.e3 * .e12/.e9 + 0.5) * .e18 + (.e3/.e24 - 0.5) *
exp(-(tij * .e7))
.e31 <- .e14 * .e16 * .e10 * .e25
.e33 <- .e14 * .e10^2 * .e25
.e35 <- .e12/.e9 + 1/.e24
.e37 <- 1 - 0.5 * geno_f
.e38 <- .e18^2
.e40 <- .e5 * .e19/.e16
.e41 <- .e5/.e16
.e42 <- .e17 - .e7
c(f0 = ((.e35 * (64 * .e41 + 8 * (.e23^2 * .e38 * .e3/.e33))/.e9 -
64 * (.e28 * .e23 * .e4 * .e18/.e31)) * .e3 + 8 * .e40) *
.e37^2 * .e3, f2 = geno_f * ((.e35 * (32 * .e41 + 8 *
(.e42 * .e23 * .e38 * .e3/.e33))/.e9 - .e28 * (16 * .e23 +
32 * .e42) * .e4 * .e18/.e31) * .e3 + 4 * .e40) * .e37 *
.e3, f1 = ((.e28 * (32 * .e23 + 64 * .e17) * .e18/.e31 -
.e35 * (16 * (.e23 * .e38 * .e3/(.e33 * .e7)) + 64/.e16) *
.e4/.e9) * .e3 - 8 * (.e4 * .e19/.e16)) * .e37 *
.e4 * .e3)
}
deriv_mu_int_f2_ff1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e7 <- sqrt(.e5 + 2 * ((b0 + geno_b * (b2 - b0)/2)^2 * .e3))
.e8 <- 2 * .e3
.e9 <- 2 * .e7
.e10 <- .e4 + .e7
.e12 <- r0 - .e10/.e8
.e13 <- t0 * .e7
.e14 <- .e8 + 2 * (.e7/.e12)
.e15 <- .e5/.e7
.e17 <- .e9^2
.e18 <- exp(-.e13)
.e19 <- tij - t0
.e23 <- 2 * .e15 - .e9
.e24 <- .e8 - .e14 * exp(2 * (.e7 * .e19))
.e25 <- exp(-(2 * .e13))
.e28 <- (.e3 * .e12/.e9 + 0.5) * .e18 + (.e3/.e24 - 0.5) *
exp(-(tij * .e7))
.e31 <- .e14 * .e17 * .e10 * .e25
.e33 <- .e14 * .e10^2 * .e25
.e34 <- .e15 - .e7
.e36 <- .e12/.e9 + 1/.e24
.e37 <- .e18^2
c(f2 = geno_f^2 * ((.e36 * (16 * (.e5/.e17) + 4 * (.e34 *
.e23 * .e37 * .e3/.e33))/.e9 - .e28 * (16 * .e34 + 8 *
.e23) * .e4 * .e18/.e31) * .e3 + 2 * (.e5 * .e19/.e17)) *
.e3, f1 = geno_f * ((.e28 * (16 * .e23 + 32 * .e15) *
.e18/.e31 - .e36 * (32/.e17 + 8 * (.e23 * .e37 * .e3/(.e33 *
.e7))) * .e4/.e9) * .e3 - 4 * (.e4 * .e19/.e17)) * .e4 *
.e3)
}
deriv_mu_int_f1_f1_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e3 <- geno_q * (q2 - q0)/2 + q0
.e4 <- a0 + geno_a * (a2 - a0)/2
.e5 <- .e4^2
.e6 <- .e5 + 2 * ((b0 + geno_b * (b2 - b0)/2)^2 * .e3)
.e7 <- sqrt(.e6)
.e8 <- 2 * .e3
.e9 <- .e4 + .e7
.e11 <- r0 - .e9/.e8
.e12 <- 2 * .e7
.e13 <- t0 * .e7
.e14 <- .e8 + 2 * (.e7/.e11)
.e16 <- .e12^2
.e17 <- exp(-.e13)
.e18 <- tij - t0
.e21 <- .e8 - .e14 * exp(2 * (.e7 * .e18))
.e22 <- exp(-(2 * .e13))
(((.e11/.e12 + 1/.e21) * (32 * (.e5 * .e17^2 * .e3/(.e6 *
.e14 * .e9^2 * .e22)) + 64/.e16)/2 - 128 * (((.e3 * .e11/.e12 +
0.5) * .e17 + (.e3/.e21 - 0.5) * exp(-(tij * .e7))) *
.e4 * .e17/(.e14 * .e16 * .e9 * .e22))) * .e3/.e7 + 8 *
(.e18/.e16)) * .e5 * .e3
}
deriv_mu_int_m0_t_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e1 <- exp(t0 * theta)
.e2 <- exp(theta * tij)
(1 - 0.5 * geno_mu) * (tij * .e2 - ((.e2 - .e1)/theta + t0 * .e1))/theta
}
deriv_mu_int_m2_t_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e1 <- exp(t0 * theta)
.e2 <- exp(theta * tij)
0.5 * (geno_mu * (tij * .e2 - ((.e2 - .e1)/theta + t0 * .e1))/theta)
}
deriv_mu_int_t_t_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
tij, r0, m0, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
.e1 <- exp(t0 * theta)
.e2 <- exp(theta * tij)
(geno_mu * (mu02 - mu00)/2 + mu00) * (tij^2 * .e2 - ((2 *
(tij * .e2) - (2 * ((.e2 - .e1)/theta) + 2 * (t0 * .e1)))/theta +
t0^2 * .e1))/theta
}
d_f_i1_a0_abqff1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_a0_abqff1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_a2_abqff1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_a2_abqff1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_b0_bqff1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_b0_bqff1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_b2_bqff1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_b2_bqff1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_q0_qff1mtb_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_q0_qff1mtb_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_q2_qff1mtb_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_q2_qff1mtb_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_f0_ff1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_f0_ff1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_f2_ff1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_f2_ff1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_f1_f1mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_f1_f1mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_m0_mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_m0_mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_m2_mt_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_m2_mt_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
d_f_i1_t_t_g <-
function (a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,
m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
{
d <- .Call('d_f_i1_t_t_g_c', a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0, r0, tau, t0, geno_a, geno_b, geno_q, geno_f, geno_mu)
return(d)
}
hes_loglik_g <- function(param,m0,r0,tau,yij,delta,tij, n_j,t0,geno_a,geno_b,geno_q,geno_f,geno_mu)
{
deriv_a0_a0 <- deriv_a0_a2 <- deriv_a0_b0 <- deriv_a0_b2 <- deriv_a0_q0 <- deriv_a0_q2 <- deriv_a0_f0 <- deriv_a0_f2 <- deriv_a0_f1 <- deriv_a0_mu00 <- deriv_a0_mu02 <- deriv_a0_theta <- 0
deriv_a2_a2 <- deriv_a2_b0 <- deriv_a2_b2 <- deriv_a2_q0 <- deriv_a2_q2 <- deriv_a2_f0 <- deriv_a2_f2 <- deriv_a2_f1 <- deriv_a2_mu00 <- deriv_a2_mu02 <- deriv_a2_theta <- 0
deriv_b0_b0 <- deriv_b0_b2 <- deriv_b0_q0 <- deriv_b0_q2 <- deriv_b0_f0 <- deriv_b0_f2 <- deriv_b0_f1 <- deriv_b0_mu00 <- deriv_b0_mu02 <- deriv_b0_theta <- 0
deriv_b2_b2 <- deriv_b2_q0 <- deriv_b2_q2 <- deriv_b2_f0 <- deriv_b2_f2 <- deriv_b2_f1 <- deriv_b2_mu00 <- deriv_b2_mu02 <- deriv_b2_theta <- 0
deriv_q0_q0 <- deriv_q0_q2 <- deriv_q0_f0 <- deriv_q0_f2 <- deriv_q0_f1 <- deriv_q0_mu00 <- deriv_q0_mu02 <- deriv_q0_theta <- 0
deriv_q2_q2 <- deriv_q2_f0 <- deriv_q2_f2 <- deriv_q2_f1 <- deriv_q2_mu00 <- deriv_q2_mu02 <- deriv_q2_theta <- 0
deriv_f0_f0 <- deriv_f0_f2 <- deriv_f0_f1 <- deriv_f0_mu00 <- deriv_f0_mu02 <- deriv_f0_theta <- 0
deriv_f2_f2 <- deriv_f2_f1 <- deriv_f2_mu00 <- deriv_f2_mu02 <- deriv_f2_theta <- 0
deriv_f1_f1 <- deriv_f1_mu00 <- deriv_f1_mu02 <- deriv_f1_theta <- 0
deriv_mu00_mu00 <- deriv_mu00_mu02 <- deriv_mu00_theta <- 0
deriv_mu02_mu02 <- deriv_mu02_theta <- 0
deriv_theta_theta <- 0
a0 <- param[1]
a2 <- param[2]
b0 <- param[3]
b2 <- param[4]
q0 <- param[5]
q2 <- param[6]
f0 <- param[7]
f2 <- param[8]
f1 <- param[9]
mu00 <- param[10]
mu02 <- param[11]
theta <- param[12]
num_j <- length(yij)
index <- 1:length(yij)
re_1_a0 <- d_f_j1_a0_abq_g(a0, a2, b0, b2, q0, q2, r0[index], tij[index], t0[index], geno_a, geno_b, geno_q)
re_1_a2 <- d_f_j1_a2_abq_g(a0, a2, b0, b2, q0, q2, r0[index], tij[index], t0[index], geno_a, geno_b, geno_q)
re_1_b0 <- d_f_j1_b0_bq_g(a0, a2, b0, b2, q0, q2, r0[index], tij[index], t0[index], geno_a, geno_b, geno_q)
re_1_b2 <- d_f_j1_b2_bq_g(a0, a2, b0, b2, q0, q2, r0[index], tij[index], t0[index], geno_a, geno_b, geno_q)
re_1_q0 <- d_f_j1_q0_qb_g(a0, a2, b0, b2, q0, q2, r0[index], tij[index], t0[index], geno_a, geno_b, geno_q)
re_1_q2 <- d_f_j1_q2_qb_g(a0, a2, b0, b2, q0, q2, r0[index], tij[index], t0[index], geno_a, geno_b, geno_q)
re_2_a0 <- d_f_j2_a0_abqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1,m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_a2 <- d_f_j2_a2_abqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1,m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_b0 <- d_f_j2_b0_bqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_b2 <- d_f_j2_b2_bqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_q0 <- d_f_j2_q0_qff1b_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_q2 <- d_f_j2_q2_qff1b_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_f0 <- d_f_j2_f0_ff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_f2 <- d_f_j2_f2_ff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_2_f1 <- d_f_j2_f1_f1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, m0[index],r0[index],tij[index],yij[index], t0[index], geno_a, geno_b, geno_q, geno_f)
re_4_a0 <- deriv_mu_int_a0_abqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_a2 <- deriv_mu_int_a2_abqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_b0 <- deriv_mu_int_b0_bqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_b2 <- deriv_mu_int_b2_bqff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_q0 <- deriv_mu_int_q0_qff1b_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_q2 <- deriv_mu_int_q2_qff1b_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_f0 <- deriv_mu_int_f0_ff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_f2 <- deriv_mu_int_f2_ff1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_f1 <- deriv_mu_int_f1_f1_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_mu00 <- deriv_mu_int_m0_t_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_mu02 <- deriv_mu_int_m2_t_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
re_4_theta <- deriv_mu_int_t_t_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, tij[index],r0[index],m0[index],t0[index], geno_a, geno_b, geno_q, geno_f, geno_mu)
deriv_a0_a0 <- sum(re_1_a0[1:num_j]) + sum(re_2_a0[1:num_j]) - sum(re_4_a0[1:num_j])
deriv_a0_a2 <- sum(re_1_a0[(num_j+1):(2*num_j)]) + sum(re_2_a0[(num_j+1):(2*num_j)]) - sum(re_4_a0[(num_j+1):(2*num_j)])
deriv_a0_b0 <- sum(re_1_a0[(2*num_j+1):(3*num_j)]) + sum(re_2_a0[(2*num_j+1):(3*num_j)]) - sum(re_4_a0[(2*num_j+1):(3*num_j)])
deriv_a0_b2 <- sum(re_1_a0[(3*num_j+1):(4*num_j)]) + sum(re_2_a0[(3*num_j+1):(4*num_j)]) - sum(re_4_a0[(3*num_j+1):(4*num_j)])
deriv_a0_q0 <- sum(re_1_a0[(4*num_j+1):(5*num_j)]) + sum(re_2_a0[(4*num_j+1):(5*num_j)]) - sum(re_4_a0[(4*num_j+1):(5*num_j)])
deriv_a0_q2 <- sum(re_1_a0[(5*num_j+1):(6*num_j)]) + sum(re_2_a0[(5*num_j+1):(6*num_j)]) - sum(re_4_a0[(5*num_j+1):(6*num_j)])
deriv_a0_f0 <- sum(re_2_a0[(6*num_j+1):(7*num_j)]) - sum(re_4_a0[(6*num_j+1):(7*num_j)])
deriv_a0_f2 <- sum(re_2_a0[(7*num_j+1):(8*num_j)]) - sum(re_4_a0[(7*num_j+1):(8*num_j)])
deriv_a0_f1 <- sum(re_2_a0[(8*num_j+1):(9*num_j)]) - sum(re_4_a0[(8*num_j+1):(9*num_j)])
deriv_a2_a2 <- sum(re_1_a2[1:num_j]) + sum(re_2_a2[1:num_j]) - sum(re_4_a2[1:num_j])
deriv_a2_b0 <- sum(re_1_a2[(num_j+1):(2*num_j)]) + sum(re_2_a2[(num_j+1):(2*num_j)]) - sum(re_4_a2[(num_j+1):(2*num_j)])
deriv_a2_b2 <- sum(re_1_a2[(2*num_j+1):(3*num_j)]) + sum(re_2_a2[(2*num_j+1):(3*num_j)]) - sum(re_4_a2[(2*num_j+1):(3*num_j)])
deriv_a2_q0 <- sum(re_1_a2[(3*num_j+1):(4*num_j)]) + sum(re_2_a2[(3*num_j+1):(4*num_j)]) - sum(re_4_a2[(3*num_j+1):(4*num_j)])
deriv_a2_q2 <- sum(re_1_a2[(4*num_j+1):(5*num_j)]) + sum(re_2_a2[(4*num_j+1):(5*num_j)]) - sum(re_4_a2[(4*num_j+1):(5*num_j)])
deriv_a2_f0 <- sum(re_2_a2[(5*num_j+1):(6*num_j)]) - sum(re_4_a2[(5*num_j+1):(6*num_j)])
deriv_a2_f2 <- sum(re_2_a2[(6*num_j+1):(7*num_j)]) - sum(re_4_a2[(6*num_j+1):(7*num_j)])
deriv_a2_f1 <- sum(re_2_a2[(7*num_j+1):(8*num_j)]) - sum(re_4_a2[(7*num_j+1):(8*num_j)])
deriv_b0_b0 <- sum(re_1_b0[1:num_j]) + sum(re_2_b0[1:num_j]) - sum(re_4_b0[1:num_j])
deriv_b0_b2 <- sum(re_1_b0[(num_j+1):(2*num_j)]) + sum(re_2_b0[(num_j+1):(2*num_j)]) - sum(re_4_b0[(num_j+1):(2*num_j)])
deriv_b0_q0 <- sum(re_1_q0[(2*num_j+1):(3*num_j)]) + sum(re_2_q0[(5*num_j+1):(6*num_j)]) - sum(re_4_q0[(5*num_j+1):(6*num_j)])
deriv_b0_q2 <- sum(re_1_q2[(num_j+1):(2*num_j)]) + sum(re_2_q2[(4*num_j+1):(5*num_j)]) - sum(re_4_q2[(4*num_j+1):(5*num_j)])
deriv_b0_f0 <- sum(re_2_b0[(4*num_j+1):(5*num_j)]) - sum(re_4_b0[(4*num_j+1):(5*num_j)])
deriv_b0_f2 <- sum(re_2_b0[(5*num_j+1):(6*num_j)]) - sum(re_4_b0[(5*num_j+1):(6*num_j)])
deriv_b0_f1 <- sum(re_2_b0[(6*num_j+1):(7*num_j)]) - sum(re_4_b0[(6*num_j+1):(7*num_j)])
deriv_b2_b2 <- sum(re_1_b2[1:num_j]) + sum(re_2_b2[1:num_j]) - sum(re_4_b2[1:num_j])
deriv_b2_q0 <- sum(re_1_q0[(3*num_j+1):(4*num_j)]) + sum(re_2_q0[(6*num_j+1):(7*num_j)]) - sum(re_4_q0[(6*num_j+1):(7*num_j)])
deriv_b2_q2 <- sum(re_1_q2[(2*num_j+1):(3*num_j)]) + sum(re_2_q2[(5*num_j+1):(6*num_j)]) - sum(re_4_q2[(5*num_j+1):(6*num_j)])
deriv_b2_f0 <- sum(re_2_b2[(3*num_j+1):(4*num_j)]) - sum(re_4_b2[(3*num_j+1):(4*num_j)])
deriv_b2_f2 <- sum(re_2_b2[(4*num_j+1):(5*num_j)]) - sum(re_4_b2[(4*num_j+1):(5*num_j)])
deriv_b2_f1 <- sum(re_2_b2[(5*num_j+1):(6*num_j)]) - sum(re_4_b2[(5*num_j+1):(6*num_j)])
deriv_q0_q0 <- sum(re_1_q0[1:num_j]) + sum(re_2_q0[1:num_j]) - sum(re_4_q0[1:num_j])
deriv_q0_q2 <- sum(re_1_q0[(num_j+1):(2*num_j)]) + sum(re_2_q0[(num_j+1):(2*num_j)]) - sum(re_4_q0[(num_j+1):(2*num_j)])
deriv_q0_f0 <- sum(re_2_q0[(2*num_j+1):(3*num_j)]) - sum(re_4_q0[(2*num_j+1):(3*num_j)])
deriv_q0_f2 <- sum(re_2_q0[(3*num_j+1):(4*num_j)]) - sum(re_4_q0[(3*num_j+1):(4*num_j)])
deriv_q0_f1 <- sum(re_2_q0[(4*num_j+1):(5*num_j)]) - sum(re_4_q0[(4*num_j+1):(5*num_j)])
deriv_q2_q2 <- sum(re_1_q2[1:num_j]) + sum(re_2_q2[1:num_j]) - sum(re_4_q2[1:num_j])
deriv_q2_f0 <- sum(re_2_q2[(num_j+1):(2*num_j)]) - sum(re_4_q2[(num_j+1):(2*num_j)])
deriv_q2_f2 <- sum(re_2_q2[(2*num_j+1):(3*num_j)]) - sum(re_4_q2[(2*num_j+1):(3*num_j)])
deriv_q2_f1 <- sum(re_2_q2[(3*num_j+1):(4*num_j)]) - sum(re_4_q2[(3*num_j+1):(4*num_j)])
deriv_f0_f0 <- sum(re_2_f0[1:num_j]) - sum(re_4_f0[1:num_j])
deriv_f0_f2 <- sum(re_2_f0[(num_j+1):(2*num_j)]) - sum(re_4_f0[(num_j+1):(2*num_j)])
deriv_f0_f1 <- sum(re_2_f0[(2*num_j+1):(3*num_j)]) - sum(re_4_f0[(2*num_j+1):(3*num_j)])
deriv_f2_f2 <- sum(re_2_f2[1:num_j]) - sum(re_4_f2[1:num_j])
deriv_f2_f1 <- sum(re_2_f2[(num_j+1):(2*num_j)]) - sum(re_4_f2[(num_j+1):(2*num_j)])
deriv_f1_f1 <- sum(re_2_f1[1:num_j]) - sum(re_4_f1[1:num_j])
deriv_mu00_theta <- - sum(re_4_mu00[1:num_j])
deriv_mu02_theta <- - sum(re_4_mu02[1:num_j])
deriv_theta_theta <- - sum(re_4_theta[1:num_j])
num_i <- length(tau)
for(i in 1:num_i)
{
if(i==1)
{
num_j <- n_j[1]
index <- 1:num_j
}else{
num_j <- n_j[i]
index <- (sum(n_j[1:(i-1)])+1):sum(n_j[1:i])
}
if(delta[i]>0)
{
sum_n_j <- sum(n_j[1:i])
re_3_a0 <- d_f_i1_a0_abqff1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_a2 <- d_f_i1_a2_abqff1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta, m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_b0 <- d_f_i1_b0_bqff1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_b2 <- d_f_i1_b2_bqff1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_q0 <- d_f_i1_q0_qff1mtb_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_q2 <- d_f_i1_q2_qff1mtb_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_f0 <- d_f_i1_f0_ff1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_f2 <- d_f_i1_f2_ff1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_f1 <- d_f_i1_f1_f1mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_mu00 <- d_f_i1_m0_mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_mu02 <- d_f_i1_m2_mt_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
re_3_theta <- d_f_i1_t_t_g(a0, a2, b0, b2, q0, q2, f0, f2, f1, mu00, mu02, theta,m0[sum_n_j],r0[sum_n_j],tau[i], t0[sum_n_j], geno_a[sum_n_j], geno_b[sum_n_j], geno_q[sum_n_j], geno_f[sum_n_j], geno_mu[sum_n_j])
deriv_a0_a0 <- deriv_a0_a0 + re_3_a0[1]
deriv_a0_a2 <- deriv_a0_a2 + re_3_a0[2]
deriv_a0_b0 <- deriv_a0_b0 + re_3_a0[3]
deriv_a0_b2 <- deriv_a0_b2 + re_3_a0[4]
deriv_a0_q0 <- deriv_a0_q0 + re_3_a0[5]
deriv_a0_q2 <- deriv_a0_q2 + re_3_a0[6]
deriv_a0_f0 <- deriv_a0_f0 + re_3_a0[7]
deriv_a0_f2 <- deriv_a0_f2 + re_3_a0[8]
deriv_a0_f1 <- deriv_a0_f1 + re_3_a0[9]
deriv_a0_mu00 <- deriv_a0_mu00 + re_3_a0[10]
deriv_a0_mu02 <- deriv_a0_mu02 + re_3_a0[11]
deriv_a0_theta <- deriv_a0_theta + re_3_a0[12]
deriv_a2_a2 <- deriv_a2_a2 + re_3_a2[1]
deriv_a2_b0 <- deriv_a2_b0 + re_3_a2[2]
deriv_a2_b2 <- deriv_a2_b2 + re_3_a2[3]
deriv_a2_q0 <- deriv_a2_q0 + re_3_a2[4]
deriv_a2_q2 <- deriv_a2_q2 + re_3_a2[5]
deriv_a2_f0 <- deriv_a2_f0 + re_3_a2[6]
deriv_a2_f2 <- deriv_a2_f2 + re_3_a2[7]
deriv_a2_f1 <- deriv_a2_f1 + re_3_a2[8]
deriv_a2_mu00 <- deriv_a2_mu00 + re_3_a2[9]
deriv_a2_mu02 <- deriv_a2_mu02 + re_3_a2[10]
deriv_a2_theta <- deriv_a2_theta + re_3_a2[11]
deriv_b0_b0 <- deriv_b0_b0 + re_3_b0[1]
deriv_b0_b2 <- deriv_b0_b2 + re_3_b0[2]
deriv_b0_q0 <- deriv_b0_q0 + re_3_q0[9]
deriv_b0_q2 <- deriv_b0_q2 + re_3_q2[8]
deriv_b0_f0 <- deriv_b0_f0 + re_3_b0[5]
deriv_b0_f2 <- deriv_b0_f2 + re_3_b0[6]
deriv_b0_f1 <- deriv_b0_f1 + re_3_b0[7]
deriv_b0_mu00 <- deriv_b0_mu00 + re_3_b0[8]
deriv_b0_mu02 <- deriv_b0_mu02 + re_3_b0[9]
deriv_b0_theta <- deriv_b0_theta + re_3_b0[10]
deriv_b2_b2 <- deriv_b2_b2 + re_3_b2[1]
deriv_b2_q0 <- deriv_b2_q0 + re_3_q0[10]
deriv_b2_q2 <- deriv_b2_q2 + re_3_q2[9]
deriv_b2_f0 <- deriv_b2_f0 + re_3_b2[4]
deriv_b2_f2 <- deriv_b2_f2 + re_3_b2[5]
deriv_b2_f1 <- deriv_b2_f1 + re_3_b2[6]
deriv_b2_mu00 <- deriv_b2_mu00 + re_3_b2[7]
deriv_b2_mu02 <- deriv_b2_mu02 + re_3_b2[8]
deriv_b2_theta <- deriv_b2_theta + re_3_b2[9]
deriv_q0_q0 <- deriv_q0_q0 + re_3_q0[1]
deriv_q0_q2 <- deriv_q0_q2 + re_3_q0[2]
deriv_q0_f0 <- deriv_q0_f0 + re_3_q0[3]
deriv_q0_f2 <- deriv_q0_f2 + re_3_q0[4]
deriv_q0_f1 <- deriv_q0_f1 + re_3_q0[5]
deriv_q0_mu00 <- deriv_q0_mu00 + re_3_q0[6]
deriv_q0_mu02 <- deriv_q0_mu02 + re_3_q0[7]
deriv_q0_theta <- deriv_q0_theta + re_3_q0[8]
deriv_q2_q2 <- deriv_q2_q2 + re_3_q2[1]
deriv_q2_f0 <- deriv_q2_f0 + re_3_q2[2]
deriv_q2_f2 <- deriv_q2_f2 + re_3_q2[3]
deriv_q2_f1 <- deriv_q2_f1 + re_3_q2[4]
deriv_q2_mu00 <- deriv_q2_mu00 + re_3_q2[5]
deriv_q2_mu02 <- deriv_q2_mu02 + re_3_q2[6]
deriv_q2_theta <- deriv_q2_theta + re_3_q2[7]
deriv_f0_f0 <- deriv_f0_f0 + re_3_f0[1]
deriv_f0_f2 <- deriv_f0_f2 + re_3_f0[2]
deriv_f0_f1 <- deriv_f0_f1 + re_3_f0[3]
deriv_f0_mu00 <- deriv_f0_mu00 + re_3_f0[4]
deriv_f0_mu02 <- deriv_f0_mu02 + re_3_f0[5]
deriv_f0_theta <- deriv_f0_theta + re_3_f0[6]
deriv_f2_f2 <- deriv_f2_f2 + re_3_f2[1]
deriv_f2_f1 <- deriv_f2_f1 + re_3_f2[2]
deriv_f2_mu00 <- deriv_f2_mu00 + re_3_f2[3]
deriv_f2_mu02 <- deriv_f2_mu02 + re_3_f2[4]
deriv_f2_theta <- deriv_f2_theta + re_3_f2[5]
deriv_f1_f1 <- deriv_f1_f1 + re_3_f1[1]
deriv_f1_mu00 <- deriv_f1_mu00 + re_3_f1[2]
deriv_f1_mu02 <- deriv_f1_mu02 + re_3_f1[3]
deriv_f1_theta <- deriv_f1_theta + re_3_f1[4]
deriv_mu00_mu00 <- deriv_mu00_mu00 + re_3_mu00[1]
deriv_mu00_mu02 <- deriv_mu00_mu02 + re_3_mu00[2]
deriv_mu00_theta <- deriv_mu00_theta + re_3_mu00[3]
deriv_mu02_mu02 <- deriv_mu02_mu02 + re_3_mu02[1]
deriv_mu02_theta <- deriv_mu02_theta + re_3_mu02[2]
deriv_theta_theta <- deriv_theta_theta + re_3_theta[1]
}else{
}
}
hes <- matrix(0, 12, 12)
hes[1,] <- c(deriv_a0_a0, deriv_a0_a2, deriv_a0_b0, deriv_a0_b2, deriv_a0_q0, deriv_a0_q2, deriv_a0_f0, deriv_a0_f2, deriv_a0_f1, deriv_a0_mu00, deriv_a0_mu02, deriv_a0_theta)
hes[2,2:12] <- c(deriv_a2_a2, deriv_a2_b0, deriv_a2_b2, deriv_a2_q0, deriv_a2_q2, deriv_a2_f0, deriv_a2_f2, deriv_a2_f1, deriv_a2_mu00, deriv_a2_mu02, deriv_a2_theta)
hes[3,3:12] <- c(deriv_b0_b0, deriv_b0_b2, deriv_b0_q0, deriv_b0_q2, deriv_b0_f0, deriv_b0_f2, deriv_b0_f1, deriv_b0_mu00, deriv_b0_mu02, deriv_b0_theta)
hes[4,4:12] <- c(deriv_b2_b2, deriv_b2_q0, deriv_b2_q2, deriv_b2_f0, deriv_b2_f2, deriv_b2_f1, deriv_b2_mu00, deriv_b2_mu02, deriv_b2_theta)
hes[5,5:12] <- c(deriv_q0_q0, deriv_q0_q2, deriv_q0_f0, deriv_q0_f2, deriv_q0_f1, deriv_q0_mu00, deriv_q0_mu02, deriv_q0_theta)
hes[6,6:12] <- c(deriv_q2_q2, deriv_q2_f0, deriv_q2_f2, deriv_q2_f1, deriv_q2_mu00, deriv_q2_mu02, deriv_q2_theta)
hes[7,7:12] <- c(deriv_f0_f0, deriv_f0_f2, deriv_f0_f1, deriv_f0_mu00, deriv_f0_mu02, deriv_f0_theta)
hes[8,8:12] <- c(deriv_f2_f2, deriv_f2_f1, deriv_f2_mu00, deriv_f2_mu02, deriv_f2_theta)
hes[9,9:12] <- c(deriv_f1_f1, deriv_f1_mu00, deriv_f1_mu02, deriv_f1_theta)
hes[10,10:12] <- c(deriv_mu00_mu00, deriv_mu00_mu02, deriv_mu00_theta)
hes[11,11:12] <- c(deriv_mu02_mu02, deriv_mu02_theta)
hes[12,12] <- c(deriv_theta_theta)
dia <- diag(hes)
hes <- hes + t(hes)
diag(hes) <- dia
(-1)*hes
} |
fisher.pval <- function (k1, n1, k2, n2,
alternative=c("two.sided", "less", "greater"), log.p=FALSE) {
alternative <- match.arg(alternative)
if (any(k1 < 0) || any(k1 > n1) || any(n1 <= 0)) stop("k1 and n1 must be integers with 0 <= k1 <= n1")
if (any(k2 < 0) || any(k2 > n2) || any(n2 <= 0)) stop("k2 and n2 must be integers with 0 <= k2 <= n2")
if (any(k1 + k2 <= 0)) stop("either k1 or k2 must be non-zero")
l <- max(length(k1), length(n1), length(k2), length(n2))
if (length(k1) < l) k1 <- rep(k1, length.out=l)
if (length(n1) < l) n1 <- rep(n1, length.out=l)
if (length(k2) < l) k2 <- rep(k2, length.out=l)
if (length(n2) < l) n2 <- rep(n2, length.out=l)
k <- k1 + k2
if (alternative == "two.sided") {
if (log.p) {
pval <- pmin(phyper(k1 - 1, n1, n2, k, lower.tail=FALSE, log.p=TRUE), phyper(k1, n1, n2, k, lower.tail=TRUE, log.p=TRUE)) + log(2)
pval <- pmin(pval, 0)
} else {
pval <- 2 * pmin(phyper(k1 - 1, n1, n2, k, lower.tail=FALSE), phyper(k1, n1, n2, k, lower.tail=TRUE))
pval <- pmax(0, pmin(1, pval))
}
} else if (alternative == "greater") {
pval <- phyper(k1 - 1, n1, n2, k, lower.tail=FALSE, log.p=log.p)
} else if (alternative == "less") {
pval <- phyper(k1, n1, n2, k, lower.tail=TRUE, log.p=log.p)
}
pval
} |
dx2x <- deriv(~ x^2, "x")
print(dx2x)
mode(dx2x)
x <- -1:2
eval(dx2x)
trig.exp <- expression(sin(cos(x + y^2)))
( D.sc <- D(trig.exp, "x") )
all.equal(D(trig.exp[[1]], "x"), D.sc)
( dxy <- deriv(trig.exp, c("x", "y")) )
y <- 1
eval(dxy)
eval(D.sc)
deriv((y ~ sin(cos(x) * y)), c("x","y"), func = TRUE)
(fx <- deriv(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
function(b0, b1, th, x = 1:7){} ) )
fx(2, 3, 4)
D(quote(log1p(x^2)), "x")
stopifnot(identical(
D(quote(log1p(x^2)), "x"),
D(quote(log(1+x^2)), "x")))
D(quote(expm1(x^2)), "x")
stopifnot(identical(
D(quote(expm1(x^2)), "x") -> Dex1,
D(quote(exp(x^2)-1), "x")),
identical(Dex1, quote(exp(x^2) * (2 * x))))
D(quote(sinpi(x^2)), "x")
D(quote(cospi(x^2)), "x")
D(quote(tanpi(x^2)), "x")
stopifnot(identical(D(quote(log2 (x^2)), "x"),
quote(2 * x/(x^2 * log(2)))),
identical(D(quote(log10(x^2)), "x"),
quote(2 * x/(x^2 * log(10))))) |
dinvpareto <- function(x, shape, scale, log = FALSE)
.External(C_actuar_do_dpq, "dinvpareto", x, shape, scale, log)
pinvpareto <- function(q, shape, scale, lower.tail = TRUE, log.p = FALSE)
.External(C_actuar_do_dpq, "pinvpareto", q, shape, scale, lower.tail, log.p)
qinvpareto <- function(p, shape, scale, lower.tail = TRUE, log.p = FALSE)
.External(C_actuar_do_dpq, "qinvpareto", p, shape, scale, lower.tail, log.p)
rinvpareto <- function(n, shape, scale)
.External(C_actuar_do_random, "rinvpareto", n, shape, scale)
minvpareto <- function(order, shape, scale)
.External(C_actuar_do_dpq, "minvpareto", order, shape, scale, FALSE)
levinvpareto <- function(limit, shape, scale, order = 1)
.External(C_actuar_do_dpq, "levinvpareto", limit, shape, scale, order, FALSE) |
svc <- paws::shield()
test_that("describe_attack_statistics", {
expect_error(svc$describe_attack_statistics(), NA)
})
test_that("list_attacks", {
expect_error(svc$list_attacks(), NA)
})
test_that("list_attacks", {
expect_error(svc$list_attacks(MaxResults = 20), NA)
})
test_that("list_protection_groups", {
expect_error(svc$list_protection_groups(), NA)
})
test_that("list_protection_groups", {
expect_error(svc$list_protection_groups(MaxResults = 20), NA)
}) |
kern2 <- function(dep.y, reg.x, tol = 0.1, ftol = 0.1, gradients = FALSE, residuals = FALSE) {
gr = FALSE
resz = FALSE
if (gradients)
gr = TRUE
if (residuals)
resz = TRUE
bw = npregbw(ydat = as.vector(dep.y), xdat = reg.x,
tol = tol, ftol = ftol,regtype="ll", bwmethod="cv.aic" )
mod = npreg(bws = bw, gradients = gr, residuals = resz)
return(mod)
} |
library(aRpsDCA)
fitme.exponential.t <- seq(0, 5, 1 / 12)
fitme.exponential.Np <- exponential.Np(
1000,
as.nominal(0.70),
fitme.exponential.t
) * rnorm(n=length(fitme.exponential.t), mean=1, sd=0.1)
exponential.fit <- best.exponential.from.interval(
diff(fitme.exponential.Np), fitme.exponential.t[2:length(fitme.exponential.t)])
cat(paste("SSE:", exponential.fit$sse))
dev.new()
plot(fitme.exponential.Np ~ fitme.exponential.t, main="Exponential Fit",
col="blue", xlab="Time", ylab="Cumulative Production")
lines(arps.Np(exponential.fit$decline, fitme.exponential.t) ~ fitme.exponential.t,
col="red")
legend("topright", pch=c(1, NA), lty=c(NA, 1), col=c("blue", "red"), legend=c("Actual", "Fit"))
fitme.hyperbolic.t <- seq(0, 5, 1 / 12)
fitme.hyperbolic.Np <- hyperbolic.Np(
1000,
as.nominal(0.70),
1.9,
fitme.hyperbolic.t
) * rnorm(n=length(fitme.hyperbolic.t), mean=1, sd=0.1)
hyperbolic.fit <- best.hyperbolic.from.interval(
diff(fitme.hyperbolic.Np), fitme.hyperbolic.t[2:length(fitme.hyperbolic.t)])
cat(paste("SSE:", hyperbolic.fit$sse))
dev.new()
plot(fitme.hyperbolic.Np ~ fitme.hyperbolic.t, main="Hyperbolic Fit",
col="blue", xlab="Time", ylab="Cumulative Production")
lines(arps.Np(hyperbolic.fit$decline, fitme.hyperbolic.t) ~ fitme.hyperbolic.t,
col="red")
legend("topright", pch=c(1, NA), lty=c(NA, 1), col=c("blue", "red"), legend=c("Actual", "Fit"))
fitme.hyp2exp.t <- seq(0, 5, 1 / 12)
fitme.hyp2exp.Np <- hyp2exp.Np(
1000,
as.nominal(0.70),
1.9,
as.nominal(0.15),
fitme.hyp2exp.t
) * rnorm(n=length(fitme.hyp2exp.t), mean=1, sd=0.1)
hyp2exp.fit <- best.hyp2exp.from.interval(
diff(fitme.hyp2exp.Np), fitme.hyp2exp.t[2:length(fitme.hyp2exp.t)])
cat(paste("SSE:", hyp2exp.fit$sse))
dev.new()
plot(fitme.hyp2exp.Np ~ fitme.hyp2exp.t, main="Hyperbolic-to-Exponential Fit",
col="blue", xlab="Time", ylab="Cumulative Production")
lines(arps.Np(hyp2exp.fit$decline, fitme.hyp2exp.t) ~ fitme.hyp2exp.t,
col="red")
legend("topright", pch=c(1, NA), lty=c(NA, 1), col=c("blue", "red"), legend=c("Actual", "Fit"))
overall.best <- best.fit.from.interval(
diff(fitme.hyp2exp.Np), fitme.hyp2exp.t[2:length(fitme.hyp2exp.t)])
cat(paste("SSE:", overall.best$sse))
dev.new()
plot(fitme.hyp2exp.Np ~ fitme.hyp2exp.t, main="Overall Best Fit (h2e Data)",
col="blue", xlab="Time", ylab="Rate")
lines(arps.Np(overall.best$decline, fitme.hyp2exp.t) ~ fitme.hyp2exp.t,
col="red")
legend("topright", pch=c(1, NA), lty=c(NA, 1), col=c("blue", "red"), legend=c("Actual", "Fit")) |
NULL
browse_package <- function(package = NULL) {
stopifnot(is.null(package) || is_string(package))
if (is.null(package)) {
check_is_project()
}
urls <- character()
details <- list()
if (is.null(package) && uses_git()) {
grl <- github_remote_list(these = NULL)
ord <- c(
which(grl$remote == "origin"),
which(grl$remote == "upstream"),
which(!grl$remote %in% c("origin", "upstream"))
)
grl <- grl[ord, ]
grl <- set_names(grl$url, nm = grl$remote)
parsed <- parse_github_remotes(grl)
urls <- c(urls, glue_data(parsed, "https://{host}/{repo_owner}/{repo_name}"))
details <- c(details, map(parsed$name, ~ glue("{ui_value(.x)} remote")))
}
desc_urls_dat <- desc_urls(package, include_cran = TRUE)
urls <- c(urls, desc_urls_dat$url)
details <- c(
details,
map(
desc_urls_dat$desc_field,
~ if (is.na(.x)) "CRAN" else glue("{ui_field(.x)} field in DESCRIPTION")
)
)
if (length(urls) == 0) {
ui_oops("Can't find any URLs")
return(invisible(character()))
}
if (!is_interactive()) {
return(invisible(urls))
}
prompt <- "Which URL do you want to visit? (0 to exit)"
pretty <- purrr::map2(
format(urls, justify = "left"), details,
~ glue("{.x} ({.y})")
)
choice <- utils::menu(title = prompt, choices = pretty)
if (choice == 0) {
return(invisible(character()))
}
view_url(urls[choice])
}
browse_project <- function() browse_package(NULL)
browse_github <- function(package = NULL) {
view_url(github_url(package))
}
browse_github_issues <- function(package = NULL, number = NULL) {
view_url(github_url(package), "issues", number)
}
browse_github_pulls <- function(package = NULL, number = NULL) {
pull <- if (is.null(number)) "pulls" else "pull"
view_url(github_url(package), pull, number)
}
browse_github_actions <- function(package = NULL) {
view_url(github_url(package), "actions")
}
browse_travis <- function(package = NULL, ext = c("com", "org")) {
gh <- github_url(package)
ext <- arg_match(ext)
travis_url <- glue("travis-ci.{ext}")
view_url(sub("github.com", travis_url, gh))
}
browse_circleci <- function(package = NULL) {
gh <- github_url(package)
circle_url <- "circleci.com/gh"
view_url(sub("github.com", circle_url, gh))
}
browse_cran <- function(package = NULL) {
view_url(cran_home(package))
}
github_url <- function(package = NULL) {
stopifnot(is.null(package) || is_string(package))
if (is.null(package)) {
check_is_project()
url <- github_url_from_git_remotes()
if (!is.null(url)) {
return(url)
}
}
desc_urls_dat <- desc_urls(package)
if (is.null(desc_urls_dat)) {
if (is.null(package)) {
ui_stop("
Project {ui_value(project_name())} has no DESCRIPTION file and \\
has no GitHub remotes configured
No way to discover URLs")
} else {
ui_stop("
Can't find DESCRIPTION for package {ui_value(package)} locally \\
or on CRAN
No way to discover URLs")
}
}
desc_urls_dat <- desc_urls_dat[desc_urls_dat$is_github, ]
if (nrow(desc_urls_dat) > 0) {
parsed <- parse_github_remotes(desc_urls_dat$url[[1]])
return(glue_data_chr(parsed, "https://{host}/{repo_owner}/{repo_name}"))
}
if (is.null(package)) {
ui_stop("
Project {ui_value(project_name())} has no GitHub remotes configured \\
and has no GitHub URLs in DESCRIPTION")
}
ui_warn("
Package {ui_value(package)} has no GitHub URLs in DESCRIPTION
Trying the GitHub CRAN mirror")
glue_chr("https://github.com/cran/{package}")
}
cran_home <- function(package = NULL) {
package <- package %||% project_name()
glue_chr("https://cran.r-project.org/package={package}")
}
desc_urls <- function(package = NULL, include_cran = FALSE, desc = NULL) {
maybe_desc <- purrr::possibly(desc::desc, otherwise = NULL)
desc_from_cran <- FALSE
if (is.null(desc)) {
if (is.null(package)) {
desc <- maybe_desc(file = proj_get())
if (is.null(desc)) {
return()
}
} else {
desc <- maybe_desc(package = package)
if (is.null(desc)) {
cran_desc_url <-
glue("https://cran.rstudio.com/web/packages/{package}/DESCRIPTION")
suppressWarnings(
desc <- maybe_desc(text = readLines(cran_desc_url))
)
if (is.null(desc)) {
return()
}
desc_from_cran <- TRUE
}
}
}
url <- desc$get_urls()
bug_reports <- desc$get_field("BugReports", default = character())
cran <-
if (include_cran && desc_from_cran) cran_home(package) else character()
dat <- data.frame(
desc_field = c(
rep_len("URL", length.out = length(url)),
rep_len("BugReports", length.out = length(bug_reports)),
rep_len(NA, length.out = length(cran))
),
url = c(url, bug_reports, cran),
stringsAsFactors = FALSE
)
dat <- cbind(dat, re_match(dat$url, github_remote_regex))
dat$is_github <- !is.na(dat$.match) & grepl("github", dat$host)
dat[c("url", "desc_field", "is_github")]
} |
spip_binary_path <- function() {
bin_name <- paste("spip", Sys.info()["sysname"], sep = "-")
if(Sys.info()["sysname"] == "Windows") {
bin_name <- paste(bin_name, ".exe", sep = "")
}
file.path(system.file(package = "CKMRpop"), "bin", bin_name)
} |
NULL
.lightsail$allocate_static_ip_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIpName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$allocate_static_ip_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_certificate_to_distribution_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_certificate_to_distribution_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_disk_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string")), instanceName = structure(logical(0), tags = list(type = "string")), diskPath = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_disk_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_instances_to_load_balancer_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), instanceNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_instances_to_load_balancer_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_load_balancer_tls_certificate_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_load_balancer_tls_certificate_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_static_ip_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIpName = structure(logical(0), tags = list(type = "string")), instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$attach_static_ip_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$close_instance_public_ports_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(portInfo = structure(list(fromPort = structure(logical(0), tags = list(type = "integer")), toPort = structure(logical(0), tags = list(type = "integer")), protocol = structure(logical(0), tags = list(type = "string")), cidrs = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), cidrListAliases = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$close_instance_public_ports_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$copy_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(sourceSnapshotName = structure(logical(0), tags = list(type = "string")), sourceResourceName = structure(logical(0), tags = list(type = "string")), restoreDate = structure(logical(0), tags = list(type = "string")), useLatestRestorableAutoSnapshot = structure(logical(0), tags = list(type = "boolean")), targetSnapshotName = structure(logical(0), tags = list(type = "string")), sourceRegion = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$copy_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_certificate_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(certificateName = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string")), subjectAlternativeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_certificate_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(certificate = structure(list(certificateArn = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string")), certificateDetail = structure(list(arn = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), serialNumber = structure(logical(0), tags = list(type = "string")), subjectAlternativeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), domainValidationRecords = structure(list(structure(list(domainName = structure(logical(0), tags = list(type = "string")), resourceRecord = structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), requestFailureReason = structure(logical(0), tags = list(type = "string")), inUseResourceCount = structure(logical(0), tags = list(type = "integer")), keyAlgorithm = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), issuedAt = structure(logical(0), tags = list(type = "timestamp")), issuerCA = structure(logical(0), tags = list(type = "string")), notBefore = structure(logical(0), tags = list(type = "timestamp")), notAfter = structure(logical(0), tags = list(type = "timestamp")), eligibleToRenew = structure(logical(0), tags = list(type = "string")), renewalSummary = structure(list(domainValidationRecords = structure(list(structure(list(domainName = structure(logical(0), tags = list(type = "string")), resourceRecord = structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), renewalStatus = structure(logical(0), tags = list(type = "string")), renewalStatusReason = structure(logical(0), tags = list(type = "string")), updatedAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), revokedAt = structure(logical(0), tags = list(type = "timestamp")), revocationReason = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), supportCode = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_cloud_formation_stack_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instances = structure(list(structure(list(sourceName = structure(logical(0), tags = list(type = "string")), instanceType = structure(logical(0), tags = list(type = "string")), portInfoSource = structure(logical(0), tags = list(type = "string")), userData = structure(logical(0), tags = list(type = "string")), availabilityZone = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_cloud_formation_stack_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_contact_method_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(protocol = structure(logical(0), tags = list(type = "string")), contactEndpoint = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_contact_method_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_container_service_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), power = structure(logical(0), tags = list(type = "string")), scale = structure(logical(0), tags = list(type = "integer")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), publicDomainNames = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "map")), deployment = structure(list(containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_container_service_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(containerService = structure(list(containerServiceName = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), power = structure(logical(0), tags = list(type = "string")), powerId = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), scale = structure(logical(0), tags = list(type = "integer")), currentDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), nextDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), isDisabled = structure(logical(0), tags = list(type = "boolean")), principalArn = structure(logical(0), tags = list(type = "string")), privateDomainName = structure(logical(0), tags = list(type = "string")), publicDomainNames = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "map")), url = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_container_service_deployment_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_container_service_deployment_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(containerService = structure(list(containerServiceName = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), power = structure(logical(0), tags = list(type = "string")), powerId = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), scale = structure(logical(0), tags = list(type = "integer")), currentDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), nextDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), isDisabled = structure(logical(0), tags = list(type = "boolean")), principalArn = structure(logical(0), tags = list(type = "string")), privateDomainName = structure(logical(0), tags = list(type = "string")), publicDomainNames = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "map")), url = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_container_service_registry_login_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_container_service_registry_login_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(registryLogin = structure(list(username = structure(logical(0), tags = list(type = "string")), password = structure(logical(0), tags = list(type = "string")), expiresAt = structure(logical(0), tags = list(type = "timestamp")), registry = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_disk_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string")), availabilityZone = structure(logical(0), tags = list(type = "string")), sizeInGb = structure(logical(0), tags = list(type = "integer")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(addOnType = structure(logical(0), tags = list(type = "string")), autoSnapshotAddOnRequest = structure(list(snapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_disk_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_disk_from_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string")), diskSnapshotName = structure(logical(0), tags = list(type = "string")), availabilityZone = structure(logical(0), tags = list(type = "string")), sizeInGb = structure(logical(0), tags = list(type = "integer")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(addOnType = structure(logical(0), tags = list(type = "string")), autoSnapshotAddOnRequest = structure(list(snapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), sourceDiskName = structure(logical(0), tags = list(type = "string")), restoreDate = structure(logical(0), tags = list(type = "string")), useLatestRestorableAutoSnapshot = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_disk_from_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_disk_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string")), diskSnapshotName = structure(logical(0), tags = list(type = "string")), instanceName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_disk_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_distribution_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string")), origin = structure(list(name = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string")), protocolPolicy = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), defaultCacheBehavior = structure(list(behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), cacheBehaviorSettings = structure(list(defaultTTL = structure(logical(0), tags = list(type = "long")), minimumTTL = structure(logical(0), tags = list(type = "long")), maximumTTL = structure(logical(0), tags = list(type = "long")), allowedHTTPMethods = structure(logical(0), tags = list(type = "string")), cachedHTTPMethods = structure(logical(0), tags = list(type = "string")), forwardedCookies = structure(list(option = structure(logical(0), tags = list(type = "string")), cookiesAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedHeaders = structure(list(option = structure(logical(0), tags = list(type = "string")), headersAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedQueryStrings = structure(list(option = structure(logical(0), tags = list(type = "boolean")), queryStringsAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure")), cacheBehaviors = structure(list(structure(list(path = structure(logical(0), tags = list(type = "string")), behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), bundleId = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_distribution_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distribution = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), alternativeDomainNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), status = structure(logical(0), tags = list(type = "string")), isEnabled = structure(logical(0), tags = list(type = "boolean")), domainName = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), origin = structure(list(name = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string")), protocolPolicy = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), originPublicDNS = structure(logical(0), tags = list(type = "string")), defaultCacheBehavior = structure(list(behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), cacheBehaviorSettings = structure(list(defaultTTL = structure(logical(0), tags = list(type = "long")), minimumTTL = structure(logical(0), tags = list(type = "long")), maximumTTL = structure(logical(0), tags = list(type = "long")), allowedHTTPMethods = structure(logical(0), tags = list(type = "string")), cachedHTTPMethods = structure(logical(0), tags = list(type = "string")), forwardedCookies = structure(list(option = structure(logical(0), tags = list(type = "string")), cookiesAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedHeaders = structure(list(option = structure(logical(0), tags = list(type = "string")), headersAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedQueryStrings = structure(list(option = structure(logical(0), tags = list(type = "boolean")), queryStringsAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure")), cacheBehaviors = structure(list(structure(list(path = structure(logical(0), tags = list(type = "string")), behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), ableToUpdateBundle = structure(logical(0), tags = list(type = "boolean")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_domain_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domainName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_domain_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_domain_entry_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domainName = structure(logical(0), tags = list(type = "string")), domainEntry = structure(list(id = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), target = structure(logical(0), tags = list(type = "string")), isAlias = structure(logical(0), tags = list(type = "boolean")), type = structure(logical(0), tags = list(type = "string")), options = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(deprecated = TRUE, type = "map"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_domain_entry_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_instance_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceSnapshotName = structure(logical(0), tags = list(type = "string")), instanceName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_instance_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_instances_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), availabilityZone = structure(logical(0), tags = list(type = "string")), customImageName = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), blueprintId = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string")), userData = structure(logical(0), tags = list(type = "string")), keyPairName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(addOnType = structure(logical(0), tags = list(type = "string")), autoSnapshotAddOnRequest = structure(list(snapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_instances_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_instances_from_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), attachedDiskMapping = structure(list(structure(list(structure(list(originalDiskPath = structure(logical(0), tags = list(type = "string")), newDiskName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "map")), availabilityZone = structure(logical(0), tags = list(type = "string")), instanceSnapshotName = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string")), userData = structure(logical(0), tags = list(type = "string")), keyPairName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(addOnType = structure(logical(0), tags = list(type = "string")), autoSnapshotAddOnRequest = structure(list(snapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), sourceInstanceName = structure(logical(0), tags = list(type = "string")), restoreDate = structure(logical(0), tags = list(type = "string")), useLatestRestorableAutoSnapshot = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_instances_from_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_key_pair_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPairName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_key_pair_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPair = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), fingerprint = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), publicKeyBase64 = structure(logical(0), tags = list(type = "string")), privateKeyBase64 = structure(logical(0), tags = list(type = "string")), operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_load_balancer_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), instancePort = structure(logical(0), tags = list(type = "integer")), healthCheckPath = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), certificateDomainName = structure(logical(0), tags = list(type = "string")), certificateAlternativeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_load_balancer_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_load_balancer_tls_certificate_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), certificateDomainName = structure(logical(0), tags = list(type = "string")), certificateAlternativeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_load_balancer_tls_certificate_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), availabilityZone = structure(logical(0), tags = list(type = "string")), relationalDatabaseBlueprintId = structure(logical(0), tags = list(type = "string")), relationalDatabaseBundleId = structure(logical(0), tags = list(type = "string")), masterDatabaseName = structure(logical(0), tags = list(type = "string")), masterUsername = structure(logical(0), tags = list(type = "string")), masterUserPassword = structure(logical(0), tags = list(type = "string", sensitive = TRUE)), preferredBackupWindow = structure(logical(0), tags = list(type = "string")), preferredMaintenanceWindow = structure(logical(0), tags = list(type = "string")), publiclyAccessible = structure(logical(0), tags = list(type = "boolean")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_relational_database_from_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), availabilityZone = structure(logical(0), tags = list(type = "string")), publiclyAccessible = structure(logical(0), tags = list(type = "boolean")), relationalDatabaseSnapshotName = structure(logical(0), tags = list(type = "string")), relationalDatabaseBundleId = structure(logical(0), tags = list(type = "string")), sourceRelationalDatabaseName = structure(logical(0), tags = list(type = "string")), restoreTime = structure(logical(0), tags = list(type = "timestamp")), useLatestRestorableTime = structure(logical(0), tags = list(type = "boolean")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_relational_database_from_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_relational_database_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), relationalDatabaseSnapshotName = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$create_relational_database_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_alarm_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(alarmName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_alarm_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_auto_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string")), date = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_auto_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_certificate_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(certificateName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_certificate_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_contact_method_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(protocol = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_contact_method_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_container_image_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), image = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_container_image_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_container_service_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_container_service_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_disk_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string")), forceDeleteAddOns = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_disk_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_disk_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_disk_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_distribution_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_distribution_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_domain_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domainName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_domain_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_domain_entry_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domainName = structure(logical(0), tags = list(type = "string")), domainEntry = structure(list(id = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), target = structure(logical(0), tags = list(type = "string")), isAlias = structure(logical(0), tags = list(type = "boolean")), type = structure(logical(0), tags = list(type = "string")), options = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(deprecated = TRUE, type = "map"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_domain_entry_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_instance_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string")), forceDeleteAddOns = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_instance_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_instance_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_instance_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_key_pair_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPairName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_key_pair_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_known_host_keys_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_known_host_keys_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_load_balancer_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_load_balancer_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_load_balancer_tls_certificate_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), force = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_load_balancer_tls_certificate_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), skipFinalSnapshot = structure(logical(0), tags = list(type = "boolean")), finalRelationalDatabaseSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_relational_database_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$delete_relational_database_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_certificate_from_distribution_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_certificate_from_distribution_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_disk_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_disk_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_instances_from_load_balancer_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), instanceNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_instances_from_load_balancer_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_static_ip_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIpName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$detach_static_ip_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$disable_add_on_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(addOnType = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$disable_add_on_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$download_default_key_pair_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$download_default_key_pair_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(publicKeyBase64 = structure(logical(0), tags = list(type = "string")), privateKeyBase64 = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$enable_add_on_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string")), addOnRequest = structure(list(addOnType = structure(logical(0), tags = list(type = "string")), autoSnapshotAddOnRequest = structure(list(snapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$enable_add_on_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$export_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(sourceSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$export_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_active_names_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_active_names_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(activeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_alarms_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(alarmName = structure(logical(0), tags = list(type = "string")), pageToken = structure(logical(0), tags = list(type = "string")), monitoredResourceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_alarms_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(alarms = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), monitoredResourceInfo = structure(list(arn = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), comparisonOperator = structure(logical(0), tags = list(type = "string")), evaluationPeriods = structure(logical(0), tags = list(type = "integer")), period = structure(logical(0), tags = list(type = "integer")), threshold = structure(logical(0), tags = list(type = "double")), datapointsToAlarm = structure(logical(0), tags = list(type = "integer")), treatMissingData = structure(logical(0), tags = list(type = "string")), statistic = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), unit = structure(logical(0), tags = list(type = "string")), contactProtocols = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), notificationTriggers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), notificationEnabled = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_auto_snapshots_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_auto_snapshots_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), autoSnapshots = structure(list(structure(list(date = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), status = structure(logical(0), tags = list(type = "string")), fromAttachedDisks = structure(list(structure(list(path = structure(logical(0), tags = list(type = "string")), sizeInGb = structure(logical(0), tags = list(type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_blueprints_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(includeInactive = structure(logical(0), tags = list(type = "boolean")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_blueprints_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(blueprints = structure(list(structure(list(blueprintId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), group = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), isActive = structure(logical(0), tags = list(type = "boolean")), minPower = structure(logical(0), tags = list(type = "integer")), version = structure(logical(0), tags = list(type = "string")), versionCode = structure(logical(0), tags = list(type = "string")), productUrl = structure(logical(0), tags = list(type = "string")), licenseUrl = structure(logical(0), tags = list(type = "string")), platform = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_bundles_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(includeInactive = structure(logical(0), tags = list(type = "boolean")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_bundles_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(bundles = structure(list(structure(list(price = structure(logical(0), tags = list(type = "float")), cpuCount = structure(logical(0), tags = list(type = "integer")), diskSizeInGb = structure(logical(0), tags = list(type = "integer")), bundleId = structure(logical(0), tags = list(type = "string")), instanceType = structure(logical(0), tags = list(type = "string")), isActive = structure(logical(0), tags = list(type = "boolean")), name = structure(logical(0), tags = list(type = "string")), power = structure(logical(0), tags = list(type = "integer")), ramSizeInGb = structure(logical(0), tags = list(type = "float")), transferPerMonthInGb = structure(logical(0), tags = list(type = "integer")), supportedPlatforms = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_certificates_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(certificateStatuses = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), includeCertificateDetails = structure(logical(0), tags = list(type = "boolean")), certificateName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_certificates_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(certificates = structure(list(structure(list(certificateArn = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string")), certificateDetail = structure(list(arn = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), serialNumber = structure(logical(0), tags = list(type = "string")), subjectAlternativeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), domainValidationRecords = structure(list(structure(list(domainName = structure(logical(0), tags = list(type = "string")), resourceRecord = structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), requestFailureReason = structure(logical(0), tags = list(type = "string")), inUseResourceCount = structure(logical(0), tags = list(type = "integer")), keyAlgorithm = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), issuedAt = structure(logical(0), tags = list(type = "timestamp")), issuerCA = structure(logical(0), tags = list(type = "string")), notBefore = structure(logical(0), tags = list(type = "timestamp")), notAfter = structure(logical(0), tags = list(type = "timestamp")), eligibleToRenew = structure(logical(0), tags = list(type = "string")), renewalSummary = structure(list(domainValidationRecords = structure(list(structure(list(domainName = structure(logical(0), tags = list(type = "string")), resourceRecord = structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), renewalStatus = structure(logical(0), tags = list(type = "string")), renewalStatusReason = structure(logical(0), tags = list(type = "string")), updatedAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), revokedAt = structure(logical(0), tags = list(type = "timestamp")), revocationReason = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), supportCode = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_cloud_formation_stack_records_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_cloud_formation_stack_records_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(cloudFormationStackRecords = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), sourceInfo = structure(list(structure(list(resourceType = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), destinationInfo = structure(list(id = structure(logical(0), tags = list(type = "string")), service = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_contact_methods_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(protocols = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_contact_methods_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(contactMethods = structure(list(structure(list(contactEndpoint = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), protocol = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_api_metadata_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_api_metadata_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(metadata = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_images_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_images_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(containerImages = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), digest = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_log_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), containerName = structure(logical(0), tags = list(type = "string")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), filterPattern = structure(logical(0), tags = list(type = "string")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_log_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(logEvents = structure(list(structure(list(createdAt = structure(logical(0), tags = list(type = "timestamp")), message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_service_deployments_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_service_deployments_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(deployments = structure(list(structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_service_metric_data_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), period = structure(logical(0), tags = list(type = "integer")), statistics = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_service_metric_data_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(metricName = structure(logical(0), tags = list(type = "string")), metricData = structure(list(structure(list(average = structure(logical(0), tags = list(type = "double")), maximum = structure(logical(0), tags = list(type = "double")), minimum = structure(logical(0), tags = list(type = "double")), sampleCount = structure(logical(0), tags = list(type = "double")), sum = structure(logical(0), tags = list(type = "double")), timestamp = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_service_powers_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_service_powers_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(powers = structure(list(structure(list(powerId = structure(logical(0), tags = list(type = "string")), price = structure(logical(0), tags = list(type = "float")), cpuCount = structure(logical(0), tags = list(type = "float")), ramSizeInGb = structure(logical(0), tags = list(type = "float")), name = structure(logical(0), tags = list(type = "string")), isActive = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_services_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_container_services_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(containerServices = structure(list(structure(list(containerServiceName = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), power = structure(logical(0), tags = list(type = "string")), powerId = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), scale = structure(logical(0), tags = list(type = "integer")), currentDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), nextDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), isDisabled = structure(logical(0), tags = list(type = "boolean")), principalArn = structure(logical(0), tags = list(type = "string")), privateDomainName = structure(logical(0), tags = list(type = "string")), publicDomainNames = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "map")), url = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disk_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disk_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(disk = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean")), iops = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), attachmentState = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), gbInUse = structure(logical(0), tags = list(deprecated = TRUE, type = "integer"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disk_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disk_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskSnapshot = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), progress = structure(logical(0), tags = list(type = "string")), fromDiskName = structure(logical(0), tags = list(type = "string")), fromDiskArn = structure(logical(0), tags = list(type = "string")), fromInstanceName = structure(logical(0), tags = list(type = "string")), fromInstanceArn = structure(logical(0), tags = list(type = "string")), isFromAutoSnapshot = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disk_snapshots_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disk_snapshots_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(diskSnapshots = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), progress = structure(logical(0), tags = list(type = "string")), fromDiskName = structure(logical(0), tags = list(type = "string")), fromDiskArn = structure(logical(0), tags = list(type = "string")), fromInstanceName = structure(logical(0), tags = list(type = "string")), fromInstanceArn = structure(logical(0), tags = list(type = "string")), isFromAutoSnapshot = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disks_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_disks_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(disks = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean")), iops = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), attachmentState = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), gbInUse = structure(logical(0), tags = list(deprecated = TRUE, type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distribution_bundles_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distribution_bundles_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(bundles = structure(list(structure(list(bundleId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), price = structure(logical(0), tags = list(type = "float")), transferPerMonthInGb = structure(logical(0), tags = list(type = "integer")), isActive = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distribution_latest_cache_reset_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distribution_latest_cache_reset_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(status = structure(logical(0), tags = list(type = "string")), createTime = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distribution_metric_data_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), period = structure(logical(0), tags = list(type = "integer")), unit = structure(logical(0), tags = list(type = "string")), statistics = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distribution_metric_data_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(metricName = structure(logical(0), tags = list(type = "string")), metricData = structure(list(structure(list(average = structure(logical(0), tags = list(type = "double")), maximum = structure(logical(0), tags = list(type = "double")), minimum = structure(logical(0), tags = list(type = "double")), sampleCount = structure(logical(0), tags = list(type = "double")), sum = structure(logical(0), tags = list(type = "double")), timestamp = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distributions_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_distributions_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributions = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), alternativeDomainNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), status = structure(logical(0), tags = list(type = "string")), isEnabled = structure(logical(0), tags = list(type = "boolean")), domainName = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string")), certificateName = structure(logical(0), tags = list(type = "string")), origin = structure(list(name = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string")), protocolPolicy = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), originPublicDNS = structure(logical(0), tags = list(type = "string")), defaultCacheBehavior = structure(list(behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), cacheBehaviorSettings = structure(list(defaultTTL = structure(logical(0), tags = list(type = "long")), minimumTTL = structure(logical(0), tags = list(type = "long")), maximumTTL = structure(logical(0), tags = list(type = "long")), allowedHTTPMethods = structure(logical(0), tags = list(type = "string")), cachedHTTPMethods = structure(logical(0), tags = list(type = "string")), forwardedCookies = structure(list(option = structure(logical(0), tags = list(type = "string")), cookiesAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedHeaders = structure(list(option = structure(logical(0), tags = list(type = "string")), headersAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedQueryStrings = structure(list(option = structure(logical(0), tags = list(type = "boolean")), queryStringsAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure")), cacheBehaviors = structure(list(structure(list(path = structure(logical(0), tags = list(type = "string")), behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), ableToUpdateBundle = structure(logical(0), tags = list(type = "boolean")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_domain_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domainName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_domain_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domain = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), domainEntries = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), target = structure(logical(0), tags = list(type = "string")), isAlias = structure(logical(0), tags = list(type = "boolean")), type = structure(logical(0), tags = list(type = "string")), options = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(deprecated = TRUE, type = "map"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_domains_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_domains_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domains = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), domainEntries = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), target = structure(logical(0), tags = list(type = "string")), isAlias = structure(logical(0), tags = list(type = "boolean")), type = structure(logical(0), tags = list(type = "string")), options = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(deprecated = TRUE, type = "map"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_export_snapshot_records_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_export_snapshot_records_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(exportSnapshotRecords = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), sourceInfo = structure(list(resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), fromResourceName = structure(logical(0), tags = list(type = "string")), fromResourceArn = structure(logical(0), tags = list(type = "string")), instanceSnapshotInfo = structure(list(fromBundleId = structure(logical(0), tags = list(type = "string")), fromBlueprintId = structure(logical(0), tags = list(type = "string")), fromDiskInfo = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), path = structure(logical(0), tags = list(type = "string")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), diskSnapshotInfo = structure(list(sizeInGb = structure(logical(0), tags = list(type = "integer"))), tags = list(type = "structure"))), tags = list(type = "structure")), destinationInfo = structure(list(id = structure(logical(0), tags = list(type = "string")), service = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instance = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), blueprintId = structure(logical(0), tags = list(type = "string")), blueprintName = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), isStaticIp = structure(logical(0), tags = list(type = "boolean")), privateIpAddress = structure(logical(0), tags = list(type = "string")), publicIpAddress = structure(logical(0), tags = list(type = "string")), ipv6Address = structure(logical(0), tags = list(type = "string")), hardware = structure(list(cpuCount = structure(logical(0), tags = list(type = "integer")), disks = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean")), iops = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), attachmentState = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), gbInUse = structure(logical(0), tags = list(deprecated = TRUE, type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list")), ramSizeInGb = structure(logical(0), tags = list(type = "float"))), tags = list(type = "structure")), networking = structure(list(monthlyTransfer = structure(list(gbPerMonthAllocated = structure(logical(0), tags = list(type = "integer"))), tags = list(type = "structure")), ports = structure(list(structure(list(fromPort = structure(logical(0), tags = list(type = "integer")), toPort = structure(logical(0), tags = list(type = "integer")), protocol = structure(logical(0), tags = list(type = "string")), accessFrom = structure(logical(0), tags = list(type = "string")), accessType = structure(logical(0), tags = list(type = "string")), commonName = structure(logical(0), tags = list(type = "string")), accessDirection = structure(logical(0), tags = list(type = "string")), cidrs = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), cidrListAliases = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), state = structure(list(code = structure(logical(0), tags = list(type = "integer")), name = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), username = structure(logical(0), tags = list(type = "string")), sshKeyName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_access_details_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string")), protocol = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_access_details_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(accessDetails = structure(list(certKey = structure(logical(0), tags = list(type = "string")), expiresAt = structure(logical(0), tags = list(type = "timestamp")), ipAddress = structure(logical(0), tags = list(type = "string")), password = structure(logical(0), tags = list(type = "string")), passwordData = structure(list(ciphertext = structure(logical(0), tags = list(type = "string")), keyPairName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), privateKey = structure(logical(0), tags = list(type = "string")), protocol = structure(logical(0), tags = list(type = "string")), instanceName = structure(logical(0), tags = list(type = "string")), username = structure(logical(0), tags = list(type = "string")), hostKeys = structure(list(structure(list(algorithm = structure(logical(0), tags = list(type = "string")), publicKey = structure(logical(0), tags = list(type = "string")), witnessedAt = structure(logical(0), tags = list(type = "timestamp")), fingerprintSHA1 = structure(logical(0), tags = list(type = "string")), fingerprintSHA256 = structure(logical(0), tags = list(type = "string")), notValidBefore = structure(logical(0), tags = list(type = "timestamp")), notValidAfter = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_metric_data_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), period = structure(logical(0), tags = list(type = "integer")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string")), statistics = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_metric_data_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(metricName = structure(logical(0), tags = list(type = "string")), metricData = structure(list(structure(list(average = structure(logical(0), tags = list(type = "double")), maximum = structure(logical(0), tags = list(type = "double")), minimum = structure(logical(0), tags = list(type = "double")), sampleCount = structure(logical(0), tags = list(type = "double")), sum = structure(logical(0), tags = list(type = "double")), timestamp = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_port_states_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_port_states_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(portStates = structure(list(structure(list(fromPort = structure(logical(0), tags = list(type = "integer")), toPort = structure(logical(0), tags = list(type = "integer")), protocol = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), cidrs = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), cidrListAliases = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceSnapshot = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), state = structure(logical(0), tags = list(type = "string")), progress = structure(logical(0), tags = list(type = "string")), fromAttachedDisks = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean")), iops = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), attachmentState = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), gbInUse = structure(logical(0), tags = list(deprecated = TRUE, type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list")), fromInstanceName = structure(logical(0), tags = list(type = "string")), fromInstanceArn = structure(logical(0), tags = list(type = "string")), fromBlueprintId = structure(logical(0), tags = list(type = "string")), fromBundleId = structure(logical(0), tags = list(type = "string")), isFromAutoSnapshot = structure(logical(0), tags = list(type = "boolean")), sizeInGb = structure(logical(0), tags = list(type = "integer"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_snapshots_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_snapshots_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceSnapshots = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), state = structure(logical(0), tags = list(type = "string")), progress = structure(logical(0), tags = list(type = "string")), fromAttachedDisks = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean")), iops = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), attachmentState = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), gbInUse = structure(logical(0), tags = list(deprecated = TRUE, type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list")), fromInstanceName = structure(logical(0), tags = list(type = "string")), fromInstanceArn = structure(logical(0), tags = list(type = "string")), fromBlueprintId = structure(logical(0), tags = list(type = "string")), fromBundleId = structure(logical(0), tags = list(type = "string")), isFromAutoSnapshot = structure(logical(0), tags = list(type = "boolean")), sizeInGb = structure(logical(0), tags = list(type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_state_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instance_state_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(state = structure(list(code = structure(logical(0), tags = list(type = "integer")), name = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instances_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_instances_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instances = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), blueprintId = structure(logical(0), tags = list(type = "string")), blueprintName = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), isStaticIp = structure(logical(0), tags = list(type = "boolean")), privateIpAddress = structure(logical(0), tags = list(type = "string")), publicIpAddress = structure(logical(0), tags = list(type = "string")), ipv6Address = structure(logical(0), tags = list(type = "string")), hardware = structure(list(cpuCount = structure(logical(0), tags = list(type = "integer")), disks = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), addOns = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), snapshotTimeOfDay = structure(logical(0), tags = list(type = "string")), nextSnapshotTimeOfDay = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), sizeInGb = structure(logical(0), tags = list(type = "integer")), isSystemDisk = structure(logical(0), tags = list(type = "boolean")), iops = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), attachmentState = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), gbInUse = structure(logical(0), tags = list(deprecated = TRUE, type = "integer"))), tags = list(type = "structure"))), tags = list(type = "list")), ramSizeInGb = structure(logical(0), tags = list(type = "float"))), tags = list(type = "structure")), networking = structure(list(monthlyTransfer = structure(list(gbPerMonthAllocated = structure(logical(0), tags = list(type = "integer"))), tags = list(type = "structure")), ports = structure(list(structure(list(fromPort = structure(logical(0), tags = list(type = "integer")), toPort = structure(logical(0), tags = list(type = "integer")), protocol = structure(logical(0), tags = list(type = "string")), accessFrom = structure(logical(0), tags = list(type = "string")), accessType = structure(logical(0), tags = list(type = "string")), commonName = structure(logical(0), tags = list(type = "string")), accessDirection = structure(logical(0), tags = list(type = "string")), cidrs = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), cidrListAliases = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), state = structure(list(code = structure(logical(0), tags = list(type = "integer")), name = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), username = structure(logical(0), tags = list(type = "string")), sshKeyName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_key_pair_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPairName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_key_pair_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPair = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), fingerprint = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_key_pairs_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_key_pairs_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPairs = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), fingerprint = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancer_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancer_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancer = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), dnsName = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), protocol = structure(logical(0), tags = list(type = "string")), publicPorts = structure(list(structure(logical(0), tags = list(type = "integer"))), tags = list(type = "list")), healthCheckPath = structure(logical(0), tags = list(type = "string")), instancePort = structure(logical(0), tags = list(type = "integer")), instanceHealthSummary = structure(list(structure(list(instanceName = structure(logical(0), tags = list(type = "string")), instanceHealth = structure(logical(0), tags = list(type = "string")), instanceHealthReason = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), tlsCertificateSummaries = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), configurationOptions = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancer_metric_data_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), period = structure(logical(0), tags = list(type = "integer")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string")), statistics = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancer_metric_data_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(metricName = structure(logical(0), tags = list(type = "string")), metricData = structure(list(structure(list(average = structure(logical(0), tags = list(type = "double")), maximum = structure(logical(0), tags = list(type = "double")), minimum = structure(logical(0), tags = list(type = "double")), sampleCount = structure(logical(0), tags = list(type = "double")), sum = structure(logical(0), tags = list(type = "double")), timestamp = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancer_tls_certificates_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancer_tls_certificates_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(tlsCertificates = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), loadBalancerName = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean")), status = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string")), domainValidationRecords = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), type = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string")), validationStatus = structure(logical(0), tags = list(type = "string")), domainName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), failureReason = structure(logical(0), tags = list(type = "string")), issuedAt = structure(logical(0), tags = list(type = "timestamp")), issuer = structure(logical(0), tags = list(type = "string")), keyAlgorithm = structure(logical(0), tags = list(type = "string")), notAfter = structure(logical(0), tags = list(type = "timestamp")), notBefore = structure(logical(0), tags = list(type = "timestamp")), renewalSummary = structure(list(renewalStatus = structure(logical(0), tags = list(type = "string")), domainValidationOptions = structure(list(structure(list(domainName = structure(logical(0), tags = list(type = "string")), validationStatus = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure")), revocationReason = structure(logical(0), tags = list(type = "string")), revokedAt = structure(logical(0), tags = list(type = "timestamp")), serial = structure(logical(0), tags = list(type = "string")), signatureAlgorithm = structure(logical(0), tags = list(type = "string")), subject = structure(logical(0), tags = list(type = "string")), subjectAlternativeNames = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancers_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_load_balancers_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancers = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), dnsName = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), protocol = structure(logical(0), tags = list(type = "string")), publicPorts = structure(list(structure(logical(0), tags = list(type = "integer"))), tags = list(type = "list")), healthCheckPath = structure(logical(0), tags = list(type = "string")), instancePort = structure(logical(0), tags = list(type = "integer")), instanceHealthSummary = structure(list(structure(list(instanceName = structure(logical(0), tags = list(type = "string")), instanceHealth = structure(logical(0), tags = list(type = "string")), instanceHealthReason = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), tlsCertificateSummaries = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), configurationOptions = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_operation_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operationId = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_operation_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_operations_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_operations_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_operations_for_resource_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_operations_for_resource_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageCount = structure(logical(0), tags = list(deprecated = TRUE, type = "string")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_regions_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(includeAvailabilityZones = structure(logical(0), tags = list(type = "boolean")), includeRelationalDatabaseAvailabilityZones = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_regions_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(regions = structure(list(structure(list(continentCode = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), displayName = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), availabilityZones = structure(list(structure(list(zoneName = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), relationalDatabaseAvailabilityZones = structure(list(structure(list(zoneName = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabase = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), relationalDatabaseBlueprintId = structure(logical(0), tags = list(type = "string")), relationalDatabaseBundleId = structure(logical(0), tags = list(type = "string")), masterDatabaseName = structure(logical(0), tags = list(type = "string")), hardware = structure(list(cpuCount = structure(logical(0), tags = list(type = "integer")), diskSizeInGb = structure(logical(0), tags = list(type = "integer")), ramSizeInGb = structure(logical(0), tags = list(type = "float"))), tags = list(type = "structure")), state = structure(logical(0), tags = list(type = "string")), secondaryAvailabilityZone = structure(logical(0), tags = list(type = "string")), backupRetentionEnabled = structure(logical(0), tags = list(type = "boolean")), pendingModifiedValues = structure(list(masterUserPassword = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), backupRetentionEnabled = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure")), engine = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), latestRestorableTime = structure(logical(0), tags = list(type = "timestamp")), masterUsername = structure(logical(0), tags = list(type = "string")), parameterApplyStatus = structure(logical(0), tags = list(type = "string")), preferredBackupWindow = structure(logical(0), tags = list(type = "string")), preferredMaintenanceWindow = structure(logical(0), tags = list(type = "string")), publiclyAccessible = structure(logical(0), tags = list(type = "boolean")), masterEndpoint = structure(list(port = structure(logical(0), tags = list(type = "integer")), address = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), pendingMaintenanceActions = structure(list(structure(list(action = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), currentApplyDate = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))), tags = list(type = "list")), caCertificateIdentifier = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_blueprints_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_blueprints_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(blueprints = structure(list(structure(list(blueprintId = structure(logical(0), tags = list(type = "string")), engine = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), engineDescription = structure(logical(0), tags = list(type = "string")), engineVersionDescription = structure(logical(0), tags = list(type = "string")), isEngineDefault = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_bundles_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_bundles_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(bundles = structure(list(structure(list(bundleId = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), price = structure(logical(0), tags = list(type = "float")), ramSizeInGb = structure(logical(0), tags = list(type = "float")), diskSizeInGb = structure(logical(0), tags = list(type = "integer")), transferPerMonthInGb = structure(logical(0), tags = list(type = "integer")), cpuCount = structure(logical(0), tags = list(type = "integer")), isEncrypted = structure(logical(0), tags = list(type = "boolean")), isActive = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_events_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), durationInMinutes = structure(logical(0), tags = list(type = "integer")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_events_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseEvents = structure(list(structure(list(resource = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), message = structure(logical(0), tags = list(type = "string")), eventCategories = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_log_events_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), logStreamName = structure(logical(0), tags = list(type = "string")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), startFromHead = structure(logical(0), tags = list(type = "boolean")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_log_events_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceLogEvents = structure(list(structure(list(createdAt = structure(logical(0), tags = list(type = "timestamp")), message = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextBackwardToken = structure(logical(0), tags = list(type = "string")), nextForwardToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_log_streams_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_log_streams_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(logStreams = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_master_user_password_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), passwordVersion = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_master_user_password_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(masterUserPassword = structure(logical(0), tags = list(type = "string", sensitive = TRUE)), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_metric_data_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), period = structure(logical(0), tags = list(type = "integer")), startTime = structure(logical(0), tags = list(type = "timestamp")), endTime = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string")), statistics = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_metric_data_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(metricName = structure(logical(0), tags = list(type = "string")), metricData = structure(list(structure(list(average = structure(logical(0), tags = list(type = "double")), maximum = structure(logical(0), tags = list(type = "double")), minimum = structure(logical(0), tags = list(type = "double")), sampleCount = structure(logical(0), tags = list(type = "double")), sum = structure(logical(0), tags = list(type = "double")), timestamp = structure(logical(0), tags = list(type = "timestamp")), unit = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_parameters_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_parameters_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(parameters = structure(list(structure(list(allowedValues = structure(logical(0), tags = list(type = "string")), applyMethod = structure(logical(0), tags = list(type = "string")), applyType = structure(logical(0), tags = list(type = "string")), dataType = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), isModifiable = structure(logical(0), tags = list(type = "boolean")), parameterName = structure(logical(0), tags = list(type = "string")), parameterValue = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_snapshot_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_snapshot_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseSnapshot = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), engine = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), sizeInGb = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseName = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseArn = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseBundleId = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseBlueprintId = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_snapshots_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_database_snapshots_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseSnapshots = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), engine = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), sizeInGb = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseName = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseArn = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseBundleId = structure(logical(0), tags = list(type = "string")), fromRelationalDatabaseBlueprintId = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_databases_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_relational_databases_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabases = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), relationalDatabaseBlueprintId = structure(logical(0), tags = list(type = "string")), relationalDatabaseBundleId = structure(logical(0), tags = list(type = "string")), masterDatabaseName = structure(logical(0), tags = list(type = "string")), hardware = structure(list(cpuCount = structure(logical(0), tags = list(type = "integer")), diskSizeInGb = structure(logical(0), tags = list(type = "integer")), ramSizeInGb = structure(logical(0), tags = list(type = "float"))), tags = list(type = "structure")), state = structure(logical(0), tags = list(type = "string")), secondaryAvailabilityZone = structure(logical(0), tags = list(type = "string")), backupRetentionEnabled = structure(logical(0), tags = list(type = "boolean")), pendingModifiedValues = structure(list(masterUserPassword = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), backupRetentionEnabled = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure")), engine = structure(logical(0), tags = list(type = "string")), engineVersion = structure(logical(0), tags = list(type = "string")), latestRestorableTime = structure(logical(0), tags = list(type = "timestamp")), masterUsername = structure(logical(0), tags = list(type = "string")), parameterApplyStatus = structure(logical(0), tags = list(type = "string")), preferredBackupWindow = structure(logical(0), tags = list(type = "string")), preferredMaintenanceWindow = structure(logical(0), tags = list(type = "string")), publiclyAccessible = structure(logical(0), tags = list(type = "boolean")), masterEndpoint = structure(list(port = structure(logical(0), tags = list(type = "integer")), address = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), pendingMaintenanceActions = structure(list(structure(list(action = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), currentApplyDate = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))), tags = list(type = "list")), caCertificateIdentifier = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_static_ip_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIpName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_static_ip_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIp = structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), ipAddress = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_static_ips_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(pageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$get_static_ips_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIps = structure(list(structure(list(name = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), supportCode = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), ipAddress = structure(logical(0), tags = list(type = "string")), attachedTo = structure(logical(0), tags = list(type = "string")), isAttached = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))), tags = list(type = "list")), nextPageToken = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$import_key_pair_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(keyPairName = structure(logical(0), tags = list(type = "string")), publicKeyBase64 = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$import_key_pair_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$is_vpc_peered_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$is_vpc_peered_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(isPeered = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$open_instance_public_ports_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(portInfo = structure(list(fromPort = structure(logical(0), tags = list(type = "integer")), toPort = structure(logical(0), tags = list(type = "integer")), protocol = structure(logical(0), tags = list(type = "string")), cidrs = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), cidrListAliases = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$open_instance_public_ports_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$peer_vpc_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$peer_vpc_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$put_alarm_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(alarmName = structure(logical(0), tags = list(type = "string")), metricName = structure(logical(0), tags = list(type = "string")), monitoredResourceName = structure(logical(0), tags = list(type = "string")), comparisonOperator = structure(logical(0), tags = list(type = "string")), threshold = structure(logical(0), tags = list(type = "double")), evaluationPeriods = structure(logical(0), tags = list(type = "integer")), datapointsToAlarm = structure(logical(0), tags = list(type = "integer")), treatMissingData = structure(logical(0), tags = list(type = "string")), contactProtocols = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), notificationTriggers = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), notificationEnabled = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$put_alarm_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$put_instance_public_ports_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(portInfos = structure(list(structure(list(fromPort = structure(logical(0), tags = list(type = "integer")), toPort = structure(logical(0), tags = list(type = "integer")), protocol = structure(logical(0), tags = list(type = "string")), cidrs = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), cidrListAliases = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "list")), instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$put_instance_public_ports_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$reboot_instance_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$reboot_instance_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$reboot_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$reboot_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$register_container_image_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), label = structure(logical(0), tags = list(type = "string")), digest = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$register_container_image_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(containerImage = structure(list(image = structure(logical(0), tags = list(type = "string")), digest = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$release_static_ip_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(staticIpName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$release_static_ip_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$reset_distribution_cache_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$reset_distribution_cache_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(status = structure(logical(0), tags = list(type = "string")), createTime = structure(logical(0), tags = list(type = "timestamp")), operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$send_contact_method_verification_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(protocol = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$send_contact_method_verification_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$start_instance_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$start_instance_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$start_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$start_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$stop_instance_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(instanceName = structure(logical(0), tags = list(type = "string")), force = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$stop_instance_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$stop_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), relationalDatabaseSnapshotName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$stop_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$tag_resource_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string")), resourceArn = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$tag_resource_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$test_alarm_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(alarmName = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$test_alarm_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$unpeer_vpc_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$unpeer_vpc_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$untag_resource_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(resourceName = structure(logical(0), tags = list(type = "string")), resourceArn = structure(logical(0), tags = list(type = "string")), tagKeys = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$untag_resource_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_container_service_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(serviceName = structure(logical(0), tags = list(type = "string")), power = structure(logical(0), tags = list(type = "string")), scale = structure(logical(0), tags = list(type = "integer")), isDisabled = structure(logical(0), tags = list(type = "boolean")), publicDomainNames = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "map"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_container_service_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(containerService = structure(list(containerServiceName = structure(logical(0), tags = list(type = "string")), arn = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), resourceType = structure(logical(0), tags = list(type = "string")), tags = structure(list(structure(list(key = structure(logical(0), tags = list(type = "string")), value = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), power = structure(logical(0), tags = list(type = "string")), powerId = structure(logical(0), tags = list(type = "string")), state = structure(logical(0), tags = list(type = "string")), scale = structure(logical(0), tags = list(type = "integer")), currentDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), nextDeployment = structure(list(version = structure(logical(0), tags = list(type = "integer")), state = structure(logical(0), tags = list(type = "string")), containers = structure(list(structure(list(image = structure(logical(0), tags = list(type = "string")), command = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list")), environment = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map")), ports = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "map"))), tags = list(type = "structure"))), tags = list(type = "map")), publicEndpoint = structure(list(containerName = structure(logical(0), tags = list(type = "string")), containerPort = structure(logical(0), tags = list(type = "integer")), healthCheck = structure(list(healthyThreshold = structure(logical(0), tags = list(type = "integer")), unhealthyThreshold = structure(logical(0), tags = list(type = "integer")), timeoutSeconds = structure(logical(0), tags = list(type = "integer")), intervalSeconds = structure(logical(0), tags = list(type = "integer")), path = structure(logical(0), tags = list(type = "string")), successCodes = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure")), createdAt = structure(logical(0), tags = list(type = "timestamp"))), tags = list(type = "structure")), isDisabled = structure(logical(0), tags = list(type = "boolean")), principalArn = structure(logical(0), tags = list(type = "string")), privateDomainName = structure(logical(0), tags = list(type = "string")), publicDomainNames = structure(list(structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "map")), url = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_distribution_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string")), origin = structure(list(name = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string")), protocolPolicy = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), defaultCacheBehavior = structure(list(behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), cacheBehaviorSettings = structure(list(defaultTTL = structure(logical(0), tags = list(type = "long")), minimumTTL = structure(logical(0), tags = list(type = "long")), maximumTTL = structure(logical(0), tags = list(type = "long")), allowedHTTPMethods = structure(logical(0), tags = list(type = "string")), cachedHTTPMethods = structure(logical(0), tags = list(type = "string")), forwardedCookies = structure(list(option = structure(logical(0), tags = list(type = "string")), cookiesAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedHeaders = structure(list(option = structure(logical(0), tags = list(type = "string")), headersAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure")), forwardedQueryStrings = structure(list(option = structure(logical(0), tags = list(type = "boolean")), queryStringsAllowList = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(type = "list"))), tags = list(type = "structure"))), tags = list(type = "structure")), cacheBehaviors = structure(list(structure(list(path = structure(logical(0), tags = list(type = "string")), behavior = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list")), isEnabled = structure(logical(0), tags = list(type = "boolean"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_distribution_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_distribution_bundle_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(distributionName = structure(logical(0), tags = list(type = "string")), bundleId = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_distribution_bundle_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operation = structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_domain_entry_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(domainName = structure(logical(0), tags = list(type = "string")), domainEntry = structure(list(id = structure(logical(0), tags = list(type = "string")), name = structure(logical(0), tags = list(type = "string")), target = structure(logical(0), tags = list(type = "string")), isAlias = structure(logical(0), tags = list(type = "boolean")), type = structure(logical(0), tags = list(type = "string")), options = structure(list(structure(logical(0), tags = list(type = "string"))), tags = list(deprecated = TRUE, type = "map"))), tags = list(type = "structure"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_domain_entry_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_load_balancer_attribute_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(loadBalancerName = structure(logical(0), tags = list(type = "string")), attributeName = structure(logical(0), tags = list(type = "string")), attributeValue = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_load_balancer_attribute_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_relational_database_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), masterUserPassword = structure(logical(0), tags = list(type = "string", sensitive = TRUE)), rotateMasterUserPassword = structure(logical(0), tags = list(type = "boolean")), preferredBackupWindow = structure(logical(0), tags = list(type = "string")), preferredMaintenanceWindow = structure(logical(0), tags = list(type = "string")), enableBackupRetention = structure(logical(0), tags = list(type = "boolean")), disableBackupRetention = structure(logical(0), tags = list(type = "boolean")), publiclyAccessible = structure(logical(0), tags = list(type = "boolean")), applyImmediately = structure(logical(0), tags = list(type = "boolean")), caCertificateIdentifier = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_relational_database_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_relational_database_parameters_input <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(relationalDatabaseName = structure(logical(0), tags = list(type = "string")), parameters = structure(list(structure(list(allowedValues = structure(logical(0), tags = list(type = "string")), applyMethod = structure(logical(0), tags = list(type = "string")), applyType = structure(logical(0), tags = list(type = "string")), dataType = structure(logical(0), tags = list(type = "string")), description = structure(logical(0), tags = list(type = "string")), isModifiable = structure(logical(0), tags = list(type = "boolean")), parameterName = structure(logical(0), tags = list(type = "string")), parameterValue = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
}
.lightsail$update_relational_database_parameters_output <- function(...) {
args <- c(as.list(environment()), list(...))
shape <- structure(list(operations = structure(list(structure(list(id = structure(logical(0), tags = list(type = "string")), resourceName = structure(logical(0), tags = list(type = "string")), resourceType = structure(logical(0), tags = list(type = "string")), createdAt = structure(logical(0), tags = list(type = "timestamp")), location = structure(list(availabilityZone = structure(logical(0), tags = list(type = "string")), regionName = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure")), isTerminal = structure(logical(0), tags = list(type = "boolean")), operationDetails = structure(logical(0), tags = list(type = "string")), operationType = structure(logical(0), tags = list(type = "string")), status = structure(logical(0), tags = list(type = "string")), statusChangedAt = structure(logical(0), tags = list(type = "timestamp")), errorCode = structure(logical(0), tags = list(type = "string")), errorDetails = structure(logical(0), tags = list(type = "string"))), tags = list(type = "structure"))), tags = list(type = "list"))), tags = list(type = "structure"))
return(populate(args, shape))
} |
define_strategy <- function(...,
transition = define_transition(),
starting_values = define_starting_values()) {
states <- define_state_list_(list(...))
define_strategy_(
transition = transition,
states = states,
starting_values = starting_values
)
}
define_strategy_ <- function(transition, states, starting_values) {
starting_values <- check_starting_values(
x = starting_values,
ref = get_state_value_names(states)
)
if (! get_state_number(states) == get_state_number(transition)) {
stop(sprintf(
"Number of state in model input (%i) differ from number of state in transition object (%i).",
get_state_number(states),
length(get_state_names(transition))
))
}
if (! identical(
as.vector(sort(get_state_names(states))),
as.vector(sort(get_state_names(transition)))
)) {
stop("State names differ from transition object.")
}
structure(
list(
transition = transition,
states = states,
starting_values = starting_values
), class = "uneval_model")
}
get_transition <- function(x){
UseMethod("get_transition")
}
get_transition.default <- function(x){
x$transition
}
set_transition <- function(x, m) {
UseMethod("set_transition")
}
set_transition.default <- function(x, m) {
x$transition <- m
x
}
get_states <- function(x){
UseMethod("get_states")
}
get_states.default <- function(x) {
x$states
}
set_states <- function(x, s) {
UseMethod("set_states")
}
set_states.default <- function(x, s) {
x$states <- s
x
}
get_state_value_names.uneval_model <- function(x) {
get_state_value_names(get_states(x))
}
get_state_names.uneval_model <- function(x, ...) {
get_state_names(get_states(x))
} |
lavutils_mplus_readdifftest <- function(file="deriv.dat") {
raw <- scan(file, quiet=TRUE)
T1 <- raw[1]
ngroups <- as.integer(raw[2])
ndat <- as.integer(raw[3])
npar <- as.integer(raw[4])
pstar <- npar*(npar+1)/2
offset <- 4L
delta_raw <- raw[offset + seq_len(npar*ndat)]
Delta <- matrix(delta_raw, nrow=ndat, ncol=npar, byrow=TRUE)
offset <- 4L + npar*ndat
p1_raw <- raw[offset + seq_len(pstar)]
P1 <- lav_matrix_lower2full(p1_raw)
offset <- 4L + npar*ndat + pstar
nacov_raw <- raw[offset + seq_len(pstar)]
V1 <- lav_matrix_lower2full(nacov_raw)
list(T1=T1, ngroups=ngroups, ndat=ndat, npar=npar, pstar=pstar,
Delta=Delta, P1=P1, V1=V1)
} |
add_raster_tile_layer <- function(
deckgl,
id = "raster-tiles",
tileServer = "https://c.tile.openstreetmap.org/",
properties = list(),
...
) {
properties <- utils::modifyList(raster_tile_properties(tileServer), properties)
add_layer(deckgl, "TileLayer", id, data = NULL, properties = properties, ...)
}
raster_tile_properties <- function(tile_server) {
list(
opacity = 1,
minZoom = 0,
maxZoom = 19,
tileServer = tile_server,
renderSubLayers = JS("deckglWidget.renderMapTiles")
)
} |
read_eq <- function(...) {
xx <- enexprs(...)
ll <- length(xx)
res <- vector("list", ll)
for (i in seq_along(xx)) {
children <- as.list(xx[[i]])
for (c in seq_along(children)) {
if (rlang::is_call(children[[c]])) {
children[[c]] <- vapply(as.list(children[[c]])[-1], function(x) {
expr_text(x)
}, character(1))
} else if (is.symbol(children[[c]])) {
children[[c]] <- expr_text(children[[c]])
}
}
res[[i]] <- children
}
res
}
format_trans <- function(x) {
forw <- c("`%>%`", "`>`")
back <- c("`%<%`", "`<`")
direc_df <- data.frame(
direction = c(forw, back),
names = c(rep("forward", 2), rep("backword", 2)),
stringsAsFactors = F
)
direct <- direc_df$names[match(x[[1]], direc_df$direction)]
key_old <- x[[2]]
key_new <- x[[3]]
list(
direction = direct,
old = key_old,
new = key_new
)
} |
iClick.VisAssetPrice <- function(dat,color4="r2b",color5="jet") {
Sys.setlocale(category = "LC_ALL", locale = "English_United States.1252")
yr0=unique(lubridate::year(index(dat)))
if (length(yr0)>11) {dat=dat[paste0(c(last(yr0)-10),"::",last(yr0))]} else {dat=dat}
y=timeSeries::as.timeSeries(zoo::as.zoo(dat))
if (ncol(y)>=2){print("Only univariate time series data is allowed");stop}
YMD=time(y)
yr=unique(lubridate::year(YMD))
charvec <- timeDate::timeCalendar(m = 12, d = 15:31, y = yr[1]-1, FinCenter = "GMT")
fake=timeSeries::as.timeSeries(rnorm(length(charvec)),charvec)
colnames(fake)=colnames(y)
x=rbind(fake,y)
names(x)=names(y)
YMD=time(x)
yr=unique(lubridate::year(YMD))
full.Date=as.Date(seq(from=YMD[1],to=YMD[length(YMD)],by="1 day"))
date=as.POSIXlt(paste(full.Date,"02:00:00"),"GMT")
full.Data=timeSeries::as.timeSeries(data.frame(date,1));
data.Date=as.POSIXlt(paste(YMD,"02:00:00"),"GMT")
real.Data=timeSeries::as.timeSeries(data.frame(data.Date,unclass(x)))
newData=cbind(full.Data,real.Data)[,-1]
dat=data.frame(date,unclass(newData))
dataRefreshCode <- function(...) {
type = as.integer(.oneClickCalendarPlot(obj.name = "plotType"))
if (type == 1) {
summaryTable=as.matrix(fBasics::basicStats(y)[-c(10:12),])
rownames(summaryTable)=rownames(fBasics::basicStats(y))[-c(10:12)]
print(summaryTable)
}
if (type == 2) {
seriesPlotX(y,ylab="Price", col = "indianred2")
}
if (type == 3) {
print(cutAndStack(y, number=6, overlap = 0.1))
}
if (type == 4) {
dev.new();print(calendarHeat(y,color=color4))
}
if (type == 5) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[2]),cols =color5,year=yr[2])
}
if (type == 6) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[3]),cols=color5,year=yr[3])
}
if (type == 7) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[4]),cols = color5,year=yr[4])
}
if (type == 8) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[5]),cols = color5,year=yr[4])
}
if (type == 9) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[6]),cols = color5,year=yr[6])
}
if (type == 10) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[7]),cols = color5,year=yr[7])
}
if (type == 11) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[8]),cols = color5,year=yr[8])
}
if (type == 12) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[9]),cols = color5,year=yr[9])
}
if (type == 13) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[10]),cols = color5,year=yr[10])
}
if (type == 14) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[11]),cols = color5,year=yr[11])
}
if (type == 15) {dev.new();openair::calendarPlot(dat,pollutant=names(dat)[2],main=paste(names(dat),"in", yr[12]),cols = color5,year=yr[12])
}
}
nAssets = dim(x)[2]
V0=c("1 Descriptive Statistics Table",
"2 Price Series Plot",
"3 Breaking Plot",
"4 Calender Heatmap, up to 6 years only")
no=5:((length(yr)-1)+4)
V1=paste(no," Calender Plot, year ", yr[-1],sep="")
.oneClickCalendarPlot(
dataRefreshCode,
names = c("Selected Asset"),
minima = c( 0),
maxima = c( nAssets),
resolutions = c( 1),
starts = c( 0),
button.functions = list(
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "1")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "2")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "3")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "4")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "5")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "6")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "7")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "8")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "9")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "10")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "11")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "12")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "13")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "14")
dataRefreshCode()},
function(...){
.oneClickCalendarPlot(obj.name = "plotType", obj.value = "15")
dataRefreshCode()}
),
button.names =c(V0,V1),
title = "1-Click Visualization: Asset Price"
)
.oneClickCalendarPlot(obj.name = "type", obj.value = "1", no = 1)
invisible()
}
.oneClickCalendarPlot.env = new.env()
.oneClickCalendarPlot <-
function(names, minima, maxima, resolutions, starts,button.functions, button.names, no, set.no.value, obj.name, obj.value,reset.function, title)
{
if(!exists(".oneClickCalendarPlot.env")) {
.oneClickCalendarPlot.env <<- new.env()
}
if(!missing(obj.name)){
if(!missing(obj.value)) {
assign(obj.name, obj.value, envir = .oneClickCalendarPlot.env)
} else {
obj.value <- get(obj.name, envir = .oneClickCalendarPlot.env)
}
return(obj.value)
}
if(missing(title)) {
title = "Control Widget"
}
myPane <- tktoplevel()
tkwm.title(myPane, title)
tkwm.geometry(myPane, "+0+0")
framed.button <- ttkframe(myPane,padding=c(3,3,12,12))
tkpack(framed.button, fill = "x")
if (missing(button.names)) {
button.names <- NULL
}
for (i in seq(button.names)) {
button.fun <-button.functions[[i]]
plotButtons<-tkbutton(framed.button, text = button.names[i], command = button.fun, anchor = "nw",relief="ridge",width = "45")
tkconfigure(plotButtons,foreground="blue",font=tkfont.create(size=10,weight="bold"))
tkpack(plotButtons,fill = "x", pady=1)
}
quitCMD = function() {
tkdestroy(myPane)
}
quitButton<-tkbutton(framed.button, text = "Quit", command = quitCMD, anchor = "center",relief="ridge",width = "8")
tkbind(myPane,"Q", function() tcl(quitButton,"invoke"))
tkfocus(quitButton)
tkconfigure(quitButton,foreground="indianred2", font=tkfont.create(weight="bold",size=10))
tkconfigure(quitButton,underline=0)
tkpack(quitButton, side = "right",fill = "x",ipady=3)
assign(".oneClickCalendarPlot.values.old", starts, envir = .oneClickCalendarPlot.env)
invisible(myPane)
} |
context("cro new tests")
a = set_val_lab(1:5, c(a = 1, b = 2, d = 3))
var_lab(a) = "My a"
expect_identical(cro(mrset(a)), cro(a)) |
strstrip <- function(string, side = c("both", "left", "right")) {
string <- .verifyChar(string)
side <- match.arg(side)
pattern <- switch(side, left = "^\\s+", right = "\\s+$", both = "^\\s+|\\s+$")
OUT <- gsub(pattern, "", string)
return(OUT)
} |
HJBiplotPage <- function(X, parent, notebook, envir) {
Dim1 <- Dim2 <- Variable <- Label <- xend <- yend <- NULL
Plot <- function(graph) {
if(!is.null(graph$reload)) {
plot(env$save$plot)
return(NULL)
}
t <- match.fun(graph$theme)
if(graph$cluster > 1) {
X$data[is.na(X$data)] <- 0
kcluster <- kmeans(X$data, graph$cluster)
kcluster <- kcluster$cluster
kcluster <- c(rep(0, ncol(X$data)), kcluster)
plotdf <- cbind(plotdf, kcluster)
plotdf$kcluster <- factor(plotdf$kcluster)
}
if(graph$dim %in% c("dim1", "dim2")) {
w <- plotdf[which(plotdf$Variable == "Rows"),]
w <- w[order(w[[(if(graph$dim == "dim1") "Con1" else "Con2")]], decreasing = TRUE),]
w <- rbind(plotdf[which(plotdf$Variable == "Columns"),], w[1:graph$limit,])
}else {
w <- plotdf[1:(graph$limit+ncol(X$data)),]
}
line_alpha <- 0.50
vector_alpha <- 0.75
if(graph$alpha == 1) {
vector_alpha <- 1
line_alpha <- 1
}
plot <- ggplot(plotdf) +
geom_vline(xintercept = 0, lty = "dashed", alpha = line_alpha) +
geom_hline(yintercept = 0, lty = "dashed", alpha = line_alpha) +
geom_segment(data = plotdf[which(w$Variable == "Columns"),],
aes(x = 0, y = 0, xend = Dim1, yend = Dim2), arrow = arrow(length = unit(0.2, "cm")),
alpha = vector_alpha, color = graph$vcolor, size = graph$vsize) +
scale_shape_manual(values = c(4, 17))
plot <- plot + geom_point(data = w, aes(x = Dim1, y = Dim2,
col = (if(graph$cluster < 2) Variable else kcluster), shape = Variable,
label = Label), size = graph$psize)
g_text <- if(graph$repel == TRUE && requireNamespace("ggrepel", quietly = TRUE)) ggrepel::geom_text_repel else geom_text
if(graph$vtext == TRUE)
plot <- plot + g_text(data = w[which(w$Variable == "Columns"),],
aes(x = Dim1, y = Dim2, col = (if(graph$cluster < 2) Variable else kcluster), shape = Variable,
label = Label), vjust = -0.5)
if(graph$ptext == TRUE)
plot <- plot + g_text(data = w[which(w$Variable == "Rows"),],
aes(x = Dim1, y = Dim2, col = (if(graph$cluster < 2) Variable else kcluster), shape = Variable,
label = Label), vjust = -0.5)
if(graph$distance != "") {
r <- biplot$ColCoordinates[graph$distance,]
slope <- r[2] / r[1]
distance <- Distance(biplot$RowCoordinates[1:graph$limit,], slope = slope)
console(cmds = "slope", envir = environment())
console(cmds = "distance", envir = environment())
plot <- plot + geom_abline(intercept = 0, slope = slope, linetype = "dashed", color = graph$vcolor, alpha = vector_alpha) +
geom_segment(data = distance, aes(x = Dim1, y = Dim2, xend = xend, yend = yend),
inherit.aes = FALSE, linetype = "dotted") + coord_fixed()
}
plot <- plot +
labs(x = paste0("Dim 1 (", round(biplot$inertia[1]), "%)"),
y = paste0("Dim 2 (", round(biplot$inertia[2]), "%)"),
title = graph$title)
color <- c(graph$vcolor, graph$pcolor)
if(graph$cluster > 1)
color <- c(graph$vcolor, brewer.pal(n = graph$cluster, name = graph$palette))
plot <- plot + scale_color_manual(values = color)
plot <- plot + t() + theme(legend.position = "none")
env$save$plot <- plot
assign(name, env$save, envir = toprint)
plot(plot)
}
biplot <- tryCatch({
HJBiplot(X$data)
}, error = function(cond) {
tkmessageBox(title = "Error", message = "Error:", icon = "error", detail = "Some error occurred verify your data.", type = "ok")
})
plotdf <- as.data.frame(biplot)
plotdf$Variable <- factor(plotdf$Variable)
console(cmds = "head(X$data)", envir = environment())
console(cmds = "head(biplot)", envir = environment())
console(cmds = "head(plotdf)", envir = environment())
name <- as.character(runif(1))
env = environment()
env$save <- list()
env$save$name <- "HJ-Biplot"
env$save$table <- plotdf
class(env$save) <- "save"
assign(name, env$save, envir = toprint)
PageGUI("HJ-Biplot", Plot, id = as.character(match.call()[[1]]), envir = envir, theme = "theme_white", limit = 100, vector_color = "
title = "HJ-Biplot", vector_text = " ", point_text = " ", vector_size = 1, point_size = 2, repel = " ", dim = "all",
parent = parent, notebook = notebook, to = nrow(X$data), distances = c(colnames(X$data), ""), cluster = 1, palette = "Dark2")
} |
excess_stats <- function(start, end, obs, mu, cov, pop, frequency,
fhat = NULL, X = NULL, betacov = NULL){
mu <- matrix(mu, nrow = 1)
observed <- sum(obs)
expected <- sum(mu)
excess <- observed - expected
sd <- sqrt(mu %*% cov %*% t(mu))
res <- data.frame(
start = start,
end = end,
obs_death_rate = observed / sum(pop) * frequency * 1000,
exp_death_rate = expected / sum(pop) * frequency * 1000,
sd_death_rate = sd / sum(pop) * frequency * 1000,
observed = observed,
expected = expected,
excess = excess,
sd = sd)
if(!is.null(fhat)){
res$fitted <- mu %*% fhat
res$se <- sqrt(mu %*% X %*% betacov %*% t(X) %*% t(mu))
}
return(res)
} |
Standard_Normalization = function(x) {
x = as.matrix(x);
mean = apply(x, 2, mean)
sd = apply(x, 2, sd)
sd[sd==0] = 1
xNorm = t((t(x) - mean) / sd)
return(xNorm)
} |
layout_multilevel <- function(x, layout = igraph::layout_with_fr){
if (!inherits(x, 'igraph')){
stop("Not a graph object")
} else {
if (is_multilevel(x)){
l = igraph::norm_coords(layout(x))
lay_multi = matrix(nrow = nrow(l), ncol = ncol(l))
lay_multi[ ,1] = l[ ,1]
for (i in 1:nrow(lay_multi)){
if (igraph::V(x)$type[i] == TRUE){
if (l[i,2] >= 0){
lay_multi[i,2] = l[i,2] * 1
} else {
lay_multi[i,2] = l[i,2] * -1
}
} else {
if (l[i,2] < 0){
lay_multi[i,2] = l[i,2] * 1
} else {
lay_multi[i,2] = l[i,2] * -1
}
}
}
return(openPlot(lay_multi))
} else {
stop("The network is not multilevel")
}
}
} |
context("Test: getKingdoms()")
test_that("The getKingdoms() interface works properly..",{
skip_on_cran()
skip_on_travis()
expect_equal(
getKingdoms(),
c(
"archaea",
"bacteria",
"fungi",
"invertebrate",
"plant",
"protozoa",
"vertebrate_mammalian",
"vertebrate_other",
"viral"
)
)
}) |
multslapmeg<-function(pathlist, fixed, random, grouping, subject, method = "BH", data){
if(missing(fixed)) stop('The argument fixed must be specified for all models!')
if(missing(random)) stop('The argument random must be specified for all models!')
if(class(pathlist)!="list") stop("Pathlist argument should be a list!")
if(length(pathlist)<2) stop("Only one pathway is defined!")
if(fixed[[1]]!="~") stop("The Fixed formula is not correctly specified! Check the vignette for help.")
if(length(fixed)>2) stop("The Fixed formula is not correctly specified! Check the vignette for help.")
if(! method %in% c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"))
stop("P-value correction method is not correctly specified! Check ?p.adjust.")
fixed_forms<-sapply(pathlist,
function(x) paste0(paste0(x,collapse="+"),"~",Reduce(paste, deparse(fixed[[2]]))))
fixed_forms<-lapply(fixed_forms, function(f) as.formula(f))
slapmeg<-sapply(fixed_forms, function(forms) {
mod<-slapmeg(forms, random, grouping, subject, data)
return(list(mod$Globaltest[1], mod$slapmethod)) })
psize<-sapply(pathlist, function(x) length(x))
adj.ps<-round(p.adjust(slapmeg[[1]], method), 4)
if(is.null(names(pathlist))) {
path.nom<-paste0("Path", 1:length(adj.ps))} else
path.nom<-names(pathlist)
res<-data.frame(path.nom, adj.ps, psize, slapmeg[[2]],row.names = NULL)
colnames(res)<-c("Path.Name",paste0("adj.P","(",paste(method),")"),"Path.size","method")
class(res) <-c("mslapmeg")
return(res)
} |
hist.mcSimulation <- function(x, breaks=100, col=NULL, xlab=NULL, main=paste("Histogram of " , xlab), ...,
colorQuantile =c("GREY", "YELLOW", "ORANGE", "DARK GREEN", "ORANGE", "YELLOW", "GREY"),
colorProbability=c(1.00, 0.95, 0.75, 0.55, 0.45, 0.25, 0.05),
resultName=NULL){
if( is.list(x$y) ){
if( !is.null(resultName) ){
result<-x$y[[resultName]]
if( is.null(xlab) )
xlab<-resultName
} else {
if(length(names(x$y))==1){
result<-unlist(x$y)
if( is.null(xlab) )
xlab<-names(x$y)[[1]]
}
else
stop("No component of the model function chosen!")
}
if( main==paste("Histogram of " , xlab))
main<-paste("Histogram of " , xlab, " Monte Carlo Simulation")
} else {
result<-x$y
}
if(!isTRUE(is.null(colorQuantile))){
resultNames<-NULL
if( length(colorQuantile) != length(colorProbability) )
stop("length(colorQuantile) != length(colorProbability)")
histPrepare<-hist(result, breaks=breaks, plot=FALSE)
probability<-cumsum(histPrepare$density * diff(histPrepare$breaks))
color<-c()
for( i in seq(along=probability) ){
for( j in seq(along=colorQuantile) )
if(probability[i] < colorProbability[j]) color[i]<-colorQuantile[j]
}
} else
color=col
hist(result, breaks=breaks, col=color, xlab=xlab, main=main,...)
} |
RGWAS.twostep <- function(pheno, geno, ZETA = NULL, package.MM = "gaston",
covariate = NULL, covariate.factor = NULL,
structure.matrix = NULL, n.PC = 0, min.MAF = 0.02,
n.core = 1, parallel.method = "mclapply",
check.size = 40, check.gene.size = 4, kernel.percent = 0.1, GWAS.res.first = NULL,
P3D = TRUE, test.method.1 = "normal", test.method.2 = "LR",
kernel.method = "linear", kernel.h = "tuned", haplotype = TRUE,
num.hap = NULL, test.effect.1 = "additive", test.effect.2 = "additive",
window.size.half = 5, window.slide = 1, chi0.mixture = 0.5, optimizer = "nlminb",
gene.set = NULL, weighting.center = TRUE, weighting.other = NULL,
sig.level = 0.05, method.thres = "BH", plot.qq.1 = TRUE, plot.Manhattan.1 = TRUE,
plot.qq.2 = TRUE, plot.Manhattan.2 = TRUE, plot.method = 1,
plot.col1 = c("dark blue", "cornflowerblue"), plot.col2 = 1,
plot.col3 = c("red3", "orange3"), plot.type = "p",
plot.pch = 16, saveName = NULL, main.qq.1 = NULL,
main.man.1 = NULL, main.qq.2 = NULL, main.man.2 = NULL,
plot.add.last = FALSE, return.EMM.res = FALSE,
thres = TRUE, skip.check = FALSE, verbose = TRUE,
verbose2 = FALSE, count = TRUE, time = TRUE) {
start <- Sys.time()
if (is.null(GWAS.res.first)) {
if (verbose) {
print("The 1st step: Performing 1st GWAS (for screening)!")
}
if (length(test.effect.1) >= 2) {
stop("Sorry, you can assign only one test effect for the 1st GWAS!!")
}
if (test.method.1 == "normal") {
GWAS.res.first <- RGWAS.normal(pheno = pheno, geno = geno, ZETA = ZETA,
package.MM = package.MM, covariate = covariate,
covariate.factor = covariate.factor,
structure.matrix = structure.matrix, n.PC = n.PC,
min.MAF = min.MAF, P3D = P3D, n.core = n.core,
parallel.method = parallel.method, sig.level = sig.level,
method.thres = method.thres, plot.qq = plot.qq.1,
plot.Manhattan = plot.Manhattan.1, plot.method = plot.method,
plot.col1 = plot.col1, plot.col2 = plot.col2,
plot.type = plot.type, plot.pch = plot.pch, saveName = saveName,
optimizer = optimizer, main.qq = main.qq.1, main.man = main.man.1,
plot.add.last = FALSE, return.EMM.res = FALSE, thres = FALSE,
skip.check = skip.check, verbose = verbose,
verbose2 = verbose2, count = count, time = time)
} else {
GWAS.res.first <- RGWAS.multisnp(pheno = pheno, geno = geno, ZETA = ZETA,
package.MM = package.MM, covariate = covariate,
covariate.factor = covariate.factor,
structure.matrix = structure.matrix,
n.PC = n.PC, min.MAF = min.MAF,
test.method = test.method.1,
n.core = n.core, parallel.method = parallel.method,
kernel.method = kernel.method, kernel.h = kernel.h,
haplotype = haplotype, num.hap = num.hap,
test.effect = test.effect.1, window.size.half = window.size.half,
window.slide = window.slide, chi0.mixture = chi0.mixture,
gene.set = gene.set, weighting.center = weighting.center,
weighting.other = weighting.other, sig.level = sig.level,
method.thres = method.thres, plot.qq = FALSE,
plot.Manhattan = FALSE, plot.method = plot.method,
plot.col1 = plot.col1, plot.col2 = plot.col2,
plot.type = plot.type, plot.pch = plot.pch, saveName = saveName,
main.qq = main.qq.2, main.man = main.man.2, plot.add.last = FALSE,
return.EMM.res = FALSE, optimizer = optimizer,
thres = FALSE, skip.check = skip.check, verbose = verbose,
verbose2 = verbose2, count = count, time = time)
}
} else {
if (verbose) {
print("The 1st step has already finished because you input 'GWAS.res.first'.")
}
}
n.pheno <- ncol(GWAS.res.first) - 3
trait.names <- colnames(GWAS.res.first)[4:(4 + n.pheno - 1)]
map <- geno[, 1:3]
if ((kernel.method == "linear") & (length(test.effect.2) >= 2)) {
thresholds <- matrix(NA, nrow = length(test.effect.2), ncol = n.pheno)
thresholds.correction <- matrix(NA, nrow = length(test.effect.2), ncol = n.pheno)
rownames(thresholds) <- rep("normal", length(test.effect.2))
rownames(thresholds.correction) <- test.effect.2
colnames(thresholds) <- colnames(thresholds.correction) <- trait.names
} else {
thresholds <- thresholds.correction <- matrix(NA, nrow = 1, ncol = n.pheno)
rownames(thresholds) <- "normal"
rownames(thresholds.correction) <- kernel.method
colnames(thresholds) <- colnames(thresholds.correction) <- trait.names
}
if ((kernel.method == "linear") & (length(test.effect.2) >= 2)) {
res.all <- rep(list(GWAS.res.first), length(test.effect.2))
} else {
res.all <- GWAS.res.first
}
for (pheno.no in 1:n.pheno) {
trait.name <- trait.names[pheno.no]
pheno.now <- pheno[, c(1, pheno.no + 1)]
GWAS.res.first.now <- GWAS.res.first[, c(1:3, pheno.no + 3)]
pval.first <- GWAS.res.first[, pheno.no + 3]
ord.pval.first <- order(pval.first, decreasing = TRUE)
ord.pval.ker.percent.0 <- ord.pval.first[1:round(length(pval.first) * (kernel.percent / 100), 0)]
ord.pval.ker.percent <- as.numeric(rownames(GWAS.res.first)[ord.pval.ker.percent.0])
if (is.null(gene.set)) {
check.obj <- "SNPs"
check.size.half <- check.size / 2
checks.mat <- matrix(NA, nrow = length(ord.pval.ker.percent) * (check.size + 1), ncol = length(ord.pval.ker.percent))
for (check.no in 1:length(ord.pval.ker.percent)) {
check <- sort(ord.pval.ker.percent)[check.no]
checks.now <- (check - check.size.half):(check + check.size.half)
checks.mat[, check.no] <- checks.now
}
checks <- unique(c(checks.mat))
checks <- checks[(checks >= 1) & (checks <= max(as.numeric(rownames(GWAS.res.first))))]
n.checks <- length(checks)
pseudo.chr <- rep(NA, n.checks)
pseudo.chr[1] <- 1
for (k in 2:n.checks) {
pseudo.chr.now <- pseudo.chr[k - 1]
check.diff <- checks[k] - checks[k - 1]
if (check.diff == 1) {
pseudo.chr[k] <- pseudo.chr.now
} else {
pseudo.chr[k] <- pseudo.chr.now + 1
}
}
pseudo.marker <- as.character(map[checks, 1])
pseudo.pos <- map[checks, 3]
pseudo.map <- data.frame(marker = pseudo.marker, chr = pseudo.chr,
pos = pseudo.pos)
rownames(pseudo.map) <- checks
M.check <- geno[checks, -c(1:3)]
geno.check <- cbind(pseudo.map, M.check)
gene.set.now <- NULL
} else {
check.obj <- "genes"
if (test.method.1 != "normal") {
check.size.half <- check.gene.size / 2
checks.mat <- matrix(NA, nrow = length(ord.pval.ker.percent) * (check.gene.size + 1), ncol = length(ord.pval.ker.percent))
for (check.no in 1:length(ord.pval.ker.percent)) {
check <- sort(ord.pval.ker.percent)[check.no]
checks.now <- (check - check.size.half):(check + check.size.half)
checks.mat[, check.no] <- checks.now
}
checks <- unique(c(checks.mat))
checks <- checks[(checks >= 1) & (checks <= max(as.numeric(rownames(GWAS.res.first))))]
n.checks <- length(checks)
gene.names <- as.character(unique(gene.set[, 1]))
gene.names.now <- gene.names[checks]
} else {
check.size.half <- check.size / 2
checks.mat <- matrix(NA, nrow = length(ord.pval.ker.percent) * (check.size + 1), ncol = length(ord.pval.ker.percent))
for (check.no in 1:length(ord.pval.ker.percent)) {
check <- sort(ord.pval.ker.percent)[check.no]
checks.now <- (check - check.size.half):(check + check.size.half)
checks.mat[, check.no] <- checks.now
}
checks <- unique(c(checks.mat))
checks <- checks[(checks >= 1) & (checks <= max(as.numeric(rownames(GWAS.res.first))))]
match.gene.list <- match(as.character(gene.set[, 2]), as.character(map[checks, 1]))
gene.names.now <- unique(as.character(gene.set[!is.na(match.gene.list), 1]))
n.checks <- length(gene.names.now)
}
gene.set.now <- gene.set[as.character(gene.set[, 1]) %in% gene.names.now, ]
geno.check <- geno
}
if (verbose) {
print(paste("The 2nd step: Recalculating -log10(p) of", trait.name, "for", n.checks, check.obj, "by kernel-based (mutisnp) GWAS."))
}
RGWAS.multisnp.res.0 <- RGWAS.multisnp(pheno = pheno.now, geno = geno.check,
ZETA = ZETA, package.MM = package.MM,
covariate = covariate, covariate.factor = covariate.factor,
structure.matrix = structure.matrix, n.PC = n.PC,
min.MAF = min.MAF, test.method = test.method.2,
n.core = n.core, parallel.method = parallel.method,
kernel.method = kernel.method, kernel.h = kernel.h,
haplotype = haplotype, num.hap = num.hap,
test.effect = test.effect.2, window.size.half = window.size.half,
window.slide = window.slide, chi0.mixture = chi0.mixture,
gene.set = gene.set.now, weighting.center = weighting.center,
weighting.other = weighting.other, sig.level = sig.level,
method.thres = method.thres, plot.qq = FALSE, plot.Manhattan = FALSE,
plot.method = plot.method, plot.col1 = plot.col1,
plot.col2 = plot.col2, plot.type = plot.type,
plot.pch = plot.pch, saveName = saveName,
main.qq = main.qq.2, main.man = main.man.2,
plot.add.last = FALSE, return.EMM.res = TRUE,
optimizer = optimizer, thres = FALSE, skip.check = TRUE,
verbose = verbose, count = count, time = time)
RGWAS.multisnp.res <- RGWAS.multisnp.res.0$D
EMM.res0 <- RGWAS.multisnp.res.0$EMM.res
if ((kernel.method == "linear") & (length(test.effect.2) >= 2)) {
GWAS.res.merge.list <- lapply(RGWAS.multisnp.res, function(x) {
colnames(x) <- colnames(GWAS.res.first.now)
if (is.null(gene.set)) {
x[, 1:3] <- map[match(rownames(x), rownames(map)), ]
}
GWAS.res.merge.0 <- rbind(x, GWAS.res.first.now)
GWAS.res.merge <- GWAS.res.merge.0[!duplicated(as.character(GWAS.res.merge.0[, 1])), ]
ord.GWAS.res.merge <- order(GWAS.res.merge[, 2], GWAS.res.merge[, 3])
res.correction <- GWAS.res.merge[ord.GWAS.res.merge, ]
check.here <- match(1:nrow(x), ord.GWAS.res.merge)
return(list(res = res.correction, check = check.here))
})
res.corrections <- rep(list(NA), length(test.effect.2))
for (test.effect.no in 1:length(test.effect.2)) {
res.correction <- (GWAS.res.merge.list[[test.effect.no]])[[1]]
res.corrections[[test.effect.no]] <- res.correction
check.here <- (GWAS.res.merge.list[[test.effect.no]])[[2]]
pval.correction <- res.correction[, 4]
if (plot.qq.2) {
if (verbose) {
print("Now Plotting (Q-Q plot). Please Wait.")
}
if (is.null(saveName)) {
if (length(grep("RStudio", names(dev.cur()))) == 0) {
if (dev.cur() == dev.next()) {
dev.new()
}
else {
dev.set(dev.next())
}
}
qq(pval.correction)
if (is.null(main.qq.2)) {
title(main = trait.name)
} else {
title(main = main.qq.2)
}
} else {
png(paste0(saveName, trait.name, "_qq_kernel.png"))
qq(pval.correction)
if (is.null(main.qq.2)) {
title(main = trait.name)
} else {
title(main = main.qq.2)
}
dev.off()
}
}
if (plot.Manhattan.2) {
if (verbose) {
print("Now Plotting (Manhattan plot). Please Wait.")
}
if (is.null(saveName)) {
if (length(grep("RStudio", names(dev.cur()))) == 0) {
if (dev.cur() == dev.next()) {
dev.new()
}
else {
dev.set(dev.next())
}
}
if (plot.method == 1) {
manhattan(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col1 = plot.col1,
plot.type = plot.type, plot.pch = plot.pch)
if (!is.null(plot.col3)) {
manhattan.plus(input = res.correction, checks = check.here,
plot.col1 = plot.col1, plot.col3 = plot.col3,
plot.type = plot.type, plot.pch = plot.pch)
}
} else {
manhattan2(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col2 = plot.col2,
plot.type = plot.type, plot.pch = plot.pch)
}
if (is.null(main.man.2)) {
title(main = trait.name)
} else {
title(main = main.man.2)
}
} else {
png(paste0(saveName, trait.name, "_manhattan_kernel.png"), width = 800)
if (plot.method == 1) {
manhattan(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col1 = plot.col1,
plot.type = plot.type, plot.pch = plot.pch)
if (!is.null(plot.col3)) {
manhattan.plus(input = res.correction, checks = check.here,
plot.col1 = plot.col1, plot.col3 = plot.col3,
plot.type = plot.type, plot.pch = plot.pch)
}
} else {
manhattan2(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col2 = plot.col2,
plot.type = plot.type, plot.pch = plot.pch)
}
if (is.null(main.man.2)) {
title(main = trait.name)
} else {
title(main = main.man.2)
}
if (!(plot.add.last & (pheno.no == n.pheno))) {
dev.off()
}
}
}
threshold <- try(CalcThreshold(GWAS.res.first.now, sig.level = sig.level, method = method.thres), silent = TRUE)
threshold.correction <- try(CalcThreshold(res.correction, sig.level = sig.level, method = method.thres), silent = TRUE)
if ("try-error" %in% class(threshold)) {
threshold <- NA
}
if ("try-error" %in% class(threshold.correction)) {
threshold.correction <- NA
}
thresholds[test.effect.no, pheno.no] <- threshold
thresholds.correction[test.effect.no, pheno.no] <- threshold.correction
}
for (test.effect.no in 1:length(test.effect.2)) {
colnames(res.corrections[[test.effect.no]])[1:3] <-
colnames(res.all[[test.effect.no]])[1:3] <- c("marker", "chrom", "pos")
res.all[[test.effect.no]] <- merge(res.all[[test.effect.no]],
res.corrections[[test.effect.no]],
by.x = c("marker", "chrom", "pos"),
by.y = c("marker", "chrom", "pos"),
all.x = T, all.y = T)
colnames(res.all[[test.effect.no]])[ncol(res.all[[test.effect.no]])] <-
paste0(trait.name, "_correction")
res.all[[test.effect.no]] <- (res.all[[test.effect.no]])[order(res.all[[test.effect.no]][, 2],
res.all[[test.effect.no]][, 3]), ]
}
} else {
colnames(RGWAS.multisnp.res) <- colnames(GWAS.res.first.now)
if (is.null(gene.set)) {
RGWAS.multisnp.res[, 1:3] <- map[match(rownames(RGWAS.multisnp.res), rownames(map)), ]
}
GWAS.res.merge.0 <- rbind(RGWAS.multisnp.res, GWAS.res.first.now)
GWAS.res.merge <- GWAS.res.merge.0[!duplicated(as.character(GWAS.res.merge.0[, 1])), ]
ord.GWAS.res.merge <- order(GWAS.res.merge[, 2], GWAS.res.merge[, 3])
res.correction <- GWAS.res.merge[ord.GWAS.res.merge, ]
check.here <- match(1:nrow(RGWAS.multisnp.res), ord.GWAS.res.merge)
pval.correction <- res.correction[, 4]
if (plot.qq.2) {
if (verbose) {
print("Now Plotting (Q-Q plot). Please Wait.")
}
if (is.null(saveName)) {
if (length(grep("RStudio", names(dev.cur()))) == 0) {
if (dev.cur() == dev.next()) {
dev.new()
} else {
dev.set(dev.next())
}
}
qq(pval.correction)
if (is.null(main.qq.2)) {
title(main = trait.name)
} else {
title(main = main.qq.2)
}
} else {
png(paste0(saveName, trait.name, "_qq_kernel.png"))
qq(pval.correction)
if (is.null(main.qq.2)) {
title(main = trait.name)
} else {
title(main = main.qq.2)
}
dev.off()
}
}
if (plot.Manhattan.2) {
if (verbose) {
print("Now Plotting (Manhattan plot). Please Wait.")
}
if (is.null(saveName)) {
if (length(grep("RStudio", names(dev.cur()))) == 0) {
if (dev.cur() == dev.next()) {
dev.new()
} else {
dev.set(dev.next())
}
}
if (plot.method == 1) {
manhattan(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col1 = plot.col1,
plot.type = plot.type, plot.pch = plot.pch)
if (!is.null(plot.col3)) {
manhattan.plus(input = res.correction, checks = check.here,
plot.col1 = plot.col1, plot.col3 = plot.col3,
plot.type = plot.type, plot.pch = plot.pch)
}
} else {
manhattan2(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col2 = plot.col2,
plot.type = plot.type, plot.pch = plot.pch)
}
if (is.null(main.man.2)) {
title(main = trait.name)
} else {
title(main = main.man.2)
}
} else {
png(paste0(saveName, trait.name, "_manhattan_kernel.png"), width = 800)
if (plot.method == 1) {
manhattan(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col1 = plot.col1,
plot.type = plot.type, plot.pch = plot.pch)
if (!is.null(plot.col3)) {
manhattan.plus(input = res.correction, checks = check.here,
plot.col1 = plot.col1, plot.col3 = plot.col3,
plot.type = plot.type, plot.pch = plot.pch)
}
} else {
manhattan2(input = res.correction, sig.level = sig.level, method.thres = method.thres, plot.col2 = plot.col2,
plot.type = plot.type, plot.pch = plot.pch)
}
if (is.null(main.man.2)) {
title(main = trait.name)
} else {
title(main = main.man.2)
}
if (!(plot.add.last & (pheno.no == n.pheno))) {
dev.off()
}
}
}
threshold <- try(CalcThreshold(GWAS.res.first[, c(1:3, pheno.no + 3)], sig.level = sig.level, method = method.thres), silent = TRUE)
threshold.correction <- try(CalcThreshold(res.correction, sig.level = sig.level, method= method.thres), silent = TRUE)
if ("try-error" %in% class(threshold)) {
threshold <- NA
}
if ("try-error" %in% class(threshold.correction)) {
threshold.correction <- NA
}
thresholds[, pheno.no] <- threshold
thresholds.correction[, pheno.no] <- threshold.correction
colnames(res.correction)[1:3] <- colnames(res.all)[1:3] <- c("marker", "chrom", "pos")
res.all <- merge(res.all, res.correction, by.x = c("marker", "chrom", "pos"),
by.y = c("marker", "chrom", "pos"), all.x = T, all.y = T)
colnames(res.all)[ncol(res.all)] <- paste0(trait.name, "_correction")
res.all <- res.all[order(res.all[, 2], res.all[, 3]), ]
}
}
thresholds.list <- list(first = thresholds, second = thresholds.correction)
if (thres) {
end <- Sys.time()
if (time) {
print(end - start)
}
if (return.EMM.res) {
return(list(D = res.all, thres = thresholds.list,
EMM.res = EMM.res0))
} else {
return(list(D = res.all, thres = thresholds.list))
}
} else {
end <- Sys.time()
if (time) {
print(end - start)
}
if (return.EMM.res) {
return(list(D = res.all, EMM.res = EMM.res0))
} else {
return(res.all)
}
}
} |
[
{
"title": "Annotables: R data package for annotating/converting Gene IDs",
"href": "http://www.gettinggeneticsdone.com/2015/11/annotables-convert-gene-ids.html"
},
{
"title": "implementing reproducible research [short book review]",
"href": "https://xianblog.wordpress.com/2014/07/15/implementing-reproducible-research-short-book-review/"
},
{
"title": "Get ROAuth to work on Windows 7",
"href": "https://web.archive.org/web/http://www.gagetheory.com/2012/03/10/get-roauth-to-work-on-windows-7/"
},
{
"title": "A simple Big Data analysis using the RevoScaleR package in Revolution R",
"href": "http://blog.revolutionanalytics.com/2011/05/big-data-analysis-in-revolution-r.html"
},
{
"title": "It was twenty years ago today…",
"href": "http://dirk.eddelbuettel.com/blog/2015/09/08/"
},
{
"title": "Bringing R to the Enterprise – new white paper available",
"href": "https://blogs.oracle.com/R/entry/bringing_r_to_the_enterprise"
},
{
"title": "Non-parametric Methods",
"href": "http://www.r-tutor.com/elementary-statistics/non-parametric-methods"
},
{
"title": "Indexing Nested Lists",
"href": "https://rappster.wordpress.com/2011/11/20/indexing-nested-lists/"
},
{
"title": "Can You Beat the Market with Modern Portfolio Theory? (Part 1)",
"href": "https://web.archive.org/web/http://www.speakingstatistically.com/2011/06/can-you-beat-market-with-modern.html"
},
{
"title": "Text analysis of Trump’s tweets confirms he writes only the (angrier) Android half",
"href": "http://varianceexplained.org/r/trump-tweets/"
},
{
"title": "Multilevel Models and Political Advertising",
"href": "http://badhessian.org/2015/08/multilevel-models-and-political-advertising/"
},
{
"title": "Sunsets in Google Calendar using R",
"href": "https://hilaryparker.com/2014/05/27/sunsets-in-google-calendar-using-r/"
},
{
"title": "Understanding the *apply() functions and then others in R by asking questions",
"href": "http://www.manio.org/blog/understanding-the-apply-functions-and-then-others-in-by-asking-questions/?utm_source=rss&utm_medium=rss&utm_campaign=understanding-the-apply-functions-and-then-others-in-by-asking-questions"
},
{
"title": "A Story of Life and Death. On CRAN. With Packages.",
"href": "http://dirk.eddelbuettel.com/blog/2011/11/27/"
},
{
"title": "random sudokus",
"href": "https://xianblog.wordpress.com/2013/06/04/random-sudokus-2/"
},
{
"title": "Factor Attribution to improve performance of the 1-Month Reversal Strategy",
"href": "https://systematicinvestor.wordpress.com/2012/07/17/factor-attribution-to-improve-performance-of-the-1-month-reversal-strategy/"
},
{
"title": "Interview with a Data Scientist (Hadley Wickham)",
"href": "http://blog.danielemaasit.com/2015/08/02/interview-with-a-data-scientist-hadley-wickham/"
},
{
"title": "Soap analytics: Text mining “Goede tijden slechte tijden” plot summaries….",
"href": "https://longhowlam.wordpress.com/2015/08/08/soap-analytics-text-mining-goede-tijden-slechte-tijden-plot-summaries/"
},
{
"title": "Hassle-free data from HTML tables with the htmltable package",
"href": "http://www.r-datacollection.com/blog/Hassle-free-data-from-HTML-tables-with-the-htmltable-package/"
},
{
"title": "Numerical Integration/Differentiation in R: FTIR Spectra",
"href": "https://casoilresource.lawr.ucdavis.edu/"
},
{
"title": "Win Your Fantasy Football Draft with These Shiny Apps: 2014 Update",
"href": "http://fantasyfootballanalytics.net/2014/07/fantasy-football-draft-optimizer-shiny-app-2014-update.html"
},
{
"title": "Data Mining In Excel: Lecture Notes and Cases",
"href": "https://rdatamining.wordpress.com/2012/07/10/data-mining-in-excel-lecture-notes-and-cases/"
},
{
"title": "Statistics and Computing and ABC",
"href": "https://xianblog.wordpress.com/2011/02/23/statistics-and-computing-and-abc/"
},
{
"title": "More fun with the Failed States Index (and the State Fragility Index)",
"href": "https://web.archive.org/web/http://nortalktoowise.com/2011/07/more-fun-with-the-failed-states-index-and-the-state-fragility-index/"
},
{
"title": "A simple test to predict coronary artery disease",
"href": "http://blog.revolutionanalytics.com/2011/01/a-simple-test-to-predict-coronary-artery-disease.html"
},
{
"title": "Reader suggestions on alternative ways to create combination dotplot/boxplot",
"href": "https://feedproxy.google.com/~r/SASandR/~3/7h0QobT4opo/reader-suggestions-on-alternative-ways.html"
},
{
"title": "What makes us happy? Let’s look at data to find out.",
"href": "http://www.vikparuchuri.com/blog/what-makes-people-happy/"
},
{
"title": "Reshape 2 Exercises",
"href": "http://r-exercises.com/2016/08/26/reshape-2-exercises/"
},
{
"title": "Two Y-Axes",
"href": "https://kieranhealy.org/blog/archives/2016/01/16/two-y-axes/"
},
{
"title": "Spotting Potential Battles in F1 Races",
"href": "https://blog.ouseful.info/2015/06/10/spotting-potential-battles-in-f1-races/"
},
{
"title": "A detailed guide to memory usage in R",
"href": "http://blog.revolutionanalytics.com/2013/11/a-detailed-guide-to-memory-usage-in-r.html"
},
{
"title": "Getting Historical Weather Data in R and SAP HANA",
"href": "http://allthingsr.blogspot.com/2012/04/getting-historical-weather-data-in-r.html"
},
{
"title": "JJ Allaire, the useR! 2014 interview",
"href": "http://datascience.la/jj-allaire-the-user-2014-interview/"
},
{
"title": "Music Data Hackathon 2012 – Beginner’s view",
"href": "http://machine-master.blogspot.com/2012/07/music-data-hackaton-2012-beginners-view.html"
},
{
"title": "R Tutorial Series: 2011 ANOVA Article Data",
"href": "https://feedproxy.google.com/~r/RTutorialSeries/~3/xbytgM5u2mk/r-tutorial-series-2011-anova-article.html"
},
{
"title": "Getting Started with Git, EGit, Eclipse, and GitHub: Version Control for R Projects",
"href": "http://jeromyanglim.blogspot.com/2010/11/getting-started-with-git-egit-eclipse.html"
},
{
"title": "Download and Parse NAREIT Data",
"href": "https://tradeblotter.wordpress.com/2012/03/02/download-and-parse-nareit-data/"
},
{
"title": "Out now: Agenda of the [R] Kenntnis-Tage 2016",
"href": "http://blog.eoda.de/2016/07/08/out-now-agenda-of-the-r-kenntnis-tage-2016/"
},
{
"title": "Review of Distance Course: Graduate Certificate in Statistics offered at Sheffield [completed: 3 June 2012]",
"href": "http://vasishth-statistics.blogspot.com/2011/12/part-1-of-2-review-of-graduate.html"
},
{
"title": "Coefplot: New Package for Plotting Model Coefficients",
"href": "http://blog.revolutionanalytics.com/2012/01/new-package-for-plotting-model-coefficients.html"
},
{
"title": "A new R trick … for me at least",
"href": "http://oddhypothesis.blogspot.com/2013/08/a-new-r-trick-for-me-at-least.html"
},
{
"title": "Recent developments in the drug war",
"href": "https://blog.diegovalle.net/2010/12/recent-developments-in-drug-war.html"
},
{
"title": "Introduction to PloTA library in the Systematic Investor Toolbox",
"href": "https://systematicinvestor.wordpress.com/2011/10/04/introduction-to-plota-library-in-the-systematic-investor-toolbox/"
},
{
"title": "The average Stripe employee! Congrats to Alyssa!",
"href": "https://hopstat.wordpress.com/2015/01/03/the-average-stripe-employee-congrats-to-alyssa/"
},
{
"title": "Data sanity checks: Data Proofer (and R analogues?)",
"href": "http://civilstat.com/2016/05/data-sanity-checks-data-proofer-and-r-analogues/"
},
{
"title": "Must-Have R Packages for Social Scientists",
"href": "http://drewconway.com/zia/?p=1614"
},
{
"title": "Designing Data Apps with R at Periscopic",
"href": "http://blog.revolutionanalytics.com/2012/09/data-apps-periscopic.html"
},
{
"title": "Solving Big Problems with Oracle R Enterprise, Part I",
"href": "https://blogs.oracle.com/R/entry/solving_big_problems_with_oracle"
},
{
"title": "Learning SAS",
"href": "http://www.rcasts.com/2011/07/learning-sas.html"
},
{
"title": "You can Hadoop it! It’s elastic! Boogie woogie woog-ie!",
"href": "http://www.cerebralmastication.com/2010/02/you-can-hadoop-it-its-elastic-boogie-woogie-woog-ie/"
}
] |
listObsNotVerbose <- function(i, x, uniquevarlist, nObs) {
mismatchesHead <- head(x$mismatches[[uniquevarlist[i]]], nObs)
mismatchesTail <- tail(x$mismatches[[uniquevarlist[i]]], nObs)
mismatchesHead$rowNo <- as.numeric(rownames(mismatchesHead))
mismatchesTail$rowNo <- as.numeric(rownames(mismatchesTail))
obslist <- unique(rbind(mismatchesHead, mismatchesTail))
obslist[,1] <- as.character(obslist[,1])
obslist[,2] <- as.character(obslist[,2])
rownames(obslist) <- NULL
obslist <- unique(obslist[c(length(obslist), 1:length(obslist) - 1)])
obslist <- obslist[order(obslist[, 1]) ,]
}
listObsVerbose <- function(i, x) {
mismatches <- x$mismatches[[i]]
mismatches$rowNo <- as.numeric(rownames(mismatches))
rownames(mismatches) <-NULL
obslist <- unique(mismatches[c(length(mismatches), 1:length(mismatches) - 1)])
obslist <- obslist[order(obslist[, 1]), ]
}
allVarMatchMessage <- function(x){
newLine <-"\n"
cat("All compared variables match", newLine,
"Number of rows compared:",
rcompObjItemLength(x$rowMatching$inboth), newLine,
"Number of columns compared:",
rcompObjItemLength(x$colMatching$inboth))
} |
ztable.modelSummary=function(x,digits=NULL,...){
count=ncol(x)/4
count
modelNames=attr(x,"modelNames")
selected=c()
align=c("c")
for(i in 1:count){
if(i<count) x[[paste0("s",i)]]=""
start=(i-1)*4+1
selected=c(selected,start:(start+3))
align=c(align,c("c","c","c","r"))
if(i<count) {
selected=c(selected,ncol(x))
align=c(align,"c")
}
}
x1 <- x %>% select(selected)
class(x1)="data.frame"
align=paste0(align,collapse = "")
z=ztable::ztable(x1,align=align,...)
newnames=c()
newModelNames=c()
ncgroup=c()
for(i in 1:count){
newnames=c(newnames,c("Coef","SE","t","p"))
newModelNames=c(newModelNames,modelNames[i])
ncgroup=c(ncgroup,4)
if(i<count) {
newnames=c(newnames,"")
newModelNames=c(newModelNames,"")
ncgroup=c(ncgroup,1)
}
}
z <- z %>%
addcgroup(cgroup=newModelNames,n.cgroup=ncgroup) %>%
addcgroup(cgroup="Consequent",n.cgroup=ncol(x1),top=TRUE) %>%
hlines(add=nrow(z$x)-5)
colnames(z$x)=newnames
for(i in 1:count){
for(j in 1:5){
z=spanCol(z,row=nrow(x1)+1-(j-1),from=2+(i-1)*5,to=5+(i-1)*5)
}
}
z
} |
`plot.mvloc` <-
function(x, est2=NULL, est3 = NULL, X=NULL, ...)
{
plotMvloc(est1=x, est2=est2, est3 = est3, X=X, ...)
} |
align_local <- function(a, b, match = 2L, mismatch = -1L, gap = -1L,
edit_mark = "
assert_that(identical(class(a), class(b)))
UseMethod("align_local", a)
}
align_local.TextReuseTextDocument <- function(a, b, match = 2L, mismatch = -1L,
gap = -1L, edit_mark = "
progress = interactive()) {
align_local(content(a), content(b), match = match, mismatch = mismatch,
gap = gap, edit_mark = edit_mark)
}
align_local.default <- function(a, b, match = 2L, mismatch = -1L, gap = -1L,
edit_mark = "
assert_that(is.string(a),
is.string(b),
is_integer_like(match),
is_integer_like(mismatch),
is_integer_like(gap),
is.string(edit_mark))
if (match <= 0 || mismatch > 0 || gap > 0 || !(str_length(edit_mark) == 1)) {
stop("The scoring parameters should have the following characteristics:\n",
" - `match` should be a positive integer\n",
" - `mismatch` should be a negative integer or zero\n",
" - `gap` should be a negative integer or zero\n",
" - `edit_mark` should be a single character\n")
}
match <- as.integer(match)
mismatch <- as.integer(mismatch)
gap <- as.integer(gap)
a_orig <- tokenize_words(a, lowercase = FALSE)
b_orig <- tokenize_words(b, lowercase = FALSE)
a <- str_to_lower(a_orig)
b <- str_to_lower(b_orig)
n_rows <- length(b) + 1
n_cols <- length(a) + 1
if (n_rows * n_cols < 1e7) progress <- FALSE
if (progress) {
message("Preparing a matrix with ",
prettyNum(n_rows * n_cols, big.mark = ","),
" elements.")
}
m <- matrix(0L, n_rows, n_cols)
if (progress) message("Computing the optimal local alignment.")
m <- sw_matrix(m, a, b, match, mismatch, gap, progress)
alignment_score <- max(m)
max_match <- which(m == alignment_score, arr.ind = TRUE, useNames = FALSE)
if (nrow(max_match) > 1) {
warning("Multiple optimal local alignments found; selecting only one of them.",
call. = FALSE)
}
if (progress) message("Extracting the local alignment.")
a_out <- vector(mode = "character", length = max(max_match))
b_out <- vector(mode = "character", length = max(max_match))
a_out[] <- NA_character_
b_out[] <- NA_character_
row_i <- max_match[1, 1]
col_i <- max_match[1, 2]
out_i <- 1L
b_out[out_i] <- b_orig[row_i - 1]
a_out[out_i] <- a_orig[col_i - 1]
out_i = out_i + 1L
while (m[row_i - 1, col_i - 1] != 0) {
up <- m[row_i - 1, col_i]
left <- m[row_i, col_i - 1]
diagn <- m[row_i - 1, col_i - 1]
max_cell <- max(up, left, diagn)
if (up == max_cell) {
row_i <- row_i - 1
bword <- b_orig[row_i - 1]
b_out[out_i] <- bword
a_out[out_i] <- mark_chars(bword, edit_mark)
} else if (left == max_cell) {
col_i <- col_i - 1
aword <- a_orig[col_i - 1]
b_out[out_i] <- mark_chars(aword, edit_mark)
a_out[out_i] <- aword
} else if (diagn == max_cell) {
row_i <- row_i - 1
col_i <- col_i - 1
bword <- b_orig[row_i - 1]
aword <- a_orig[col_i - 1]
if (str_to_lower(aword) == str_to_lower(bword)) {
b_out[out_i] <- bword
a_out[out_i] <- aword
} else {
b_out[out_i] <- bword
a_out[out_i] <- mark_chars(bword, edit_mark)
out_i <- out_i + 1
b_out[out_i] <- mark_chars(aword, edit_mark)
a_out[out_i] <- aword
}
}
out_i <- out_i + 1
}
b_out <- str_c(rev(b_out[!is.na(b_out)]), collapse = " ")
a_out <- str_c(rev(a_out[!is.na(a_out)]), collapse = " ")
alignment <- list(a_edits = a_out, b_edits = b_out, score = alignment_score)
class(alignment) <- c("textreuse_alignment", "list")
alignment
}
print.textreuse_alignment <- function(x, ...) {
cat("TextReuse alignment\n")
cat("Alignment score:", x$score, "\n")
cat("Document A:\n")
cat(str_wrap(x$a_edits, width = 72))
cat("\n\nDocument B:\n")
cat(str_wrap(x$b_edits, width = 72))
invisible(x)
} |
bootstrap.svisit <-
function(object, B, type=c("nonpar", "param"), seed=NULL, ...) {
type <- match.arg(type)
CALL <- object$call
CALL$data <- as.name("mfi")
ini <- coef(object)
CALL$inits <- as.name("ini")
mf <- model.frame(object)
n <- object$nobs
if (exists("mfi", envir=parent.frame())) {
assign("tmp1", get("mfi", envir=parent.frame()))
on.exit(assign("mfi", tmp1, envir=parent.frame()), add=TRUE)
}
if (exists("ini", envir=parent.frame())) {
assign("tmp2", get("ini", envir=parent.frame()))
on.exit(assign("ini", tmp2, envir=parent.frame()), add=TRUE)
}
assign("ini", ini, envir=parent.frame())
if (type == "nonpar") {
if (!is.null(seed))
set.seed(seed)
b <- lapply(1:B, function(i) sample(1:n, n, replace=TRUE))
bfun <- function(i) {
assign("mfi", mf[i,], envir=parent.frame())
mod <- eval(CALL, envir=parent.frame())
if (inherits(object, "svabu_nb"))
c(coef(mod), log.sigma=mod$var$est) else coef(mod)
}
} else {
mfi <- mf
rid <- attr(attr(mf, "terms"), "response")
sim <- simulate(object, B, seed)
b <- 1:B
bfun <- function(i) {
mf[,rid] <- sim[,i]
assign("mfi", mf, envir=parent.frame())
mod <- eval(CALL, envir=parent.frame())
if (inherits(object, "svabu_nb"))
c(coef(mod), log.sigma=mod$var$est) else coef(mod)
}
}
rval <- pbapply::pblapply(b, bfun)
rm(list="ini", envir=parent.frame())
rval <- matrix(unlist(rval), length(rval[[1]]), B)
cfs <- if (inherits(object, "svabu_nb"))
c(coef(object), log.sigma=object$var$est) else coef(object)
rval <- cbind(cfs, rval)
attr(rval, "type") <- type
attr(rval, "ini") <- ini
attr(object, "bootstrap") <- rval
object
} |
locglmfit_private<-function( xfit, r, m, x, h, returnH, link, guessing,
lapsing, K, p, ker, maxiter, tol ) {
epanechnikov<-function( x, m, s ) {
X <- x / s;
X[which( abs( X ) > 1 )] <- 1;
return( 0.75 * ( 1 - X^2 ) / s );
}
triangular<-function( x, m, s ) {
X <- x / s;
X[which( abs( X ) > 1 )] <- 1;
return( ( 1 - abs( X ) ) / s );
}
tricube<-function( x, m, s ) {
X <- x / s;
X[which( abs( X ) > 1 )] <- 1;
return( ( ( 1 - abs( X )^3 )^3 )/ s );
}
bisquare<-function( x, m, s ){
X <- x / s;
X[which( abs( X ) > 1 )] <- 1;
return( ( (1 - abs( X )^2 )^2) / s );
}
uniform<-function( x, m, s ) {
X <- x / s;
return( ( abs( X ) <= 1 ) / 2 );
}
if( link != "weibull_link_private" && link != "revweibull_link_private" ) {
linkuser <- eval( call( link, guessing, lapsing ) );
}
else{
linkuser <- eval( call( link, K, guessing, lapsing ) );
}
linkl <- linkuser$linkfun;
linki <- linkuser$linkinv;
linkd <- linkuser$mu.eta
nr<-length( r );
nx<-length( xfit );
value <- NULL;
pfit <- NULL;
etafit <- NULL;
if( returnH ) H <- NULL;
diffx<-as.vector( t( matrix( rep( xfit, nr ), nx, nr ) )
- matrix( rep( x, nx ), nr, nx ) );
if( length( h ) == 1 ) {
kerx <- eval( call( ker, diffx, 0, h ) );
}
else {
h_mat <- as.vector(t( matrix( rep( h, nr ), nx, nr ) ) )
kerx <- eval( call( ker, diffx, 0, h_mat ) );
}
tmpX0 <- matrix( rep( diffx, p + 1 ), nr * nx, p + 1 )^
t( matrix( rep( (0:p) , nr * nx), p + 1, nr * nx ) )
mu0 <- ( r + .5 ) / ( m + 1 );
eta0 <- linkl( mu0 );
Z0 <- rep( eta0, nx );
mu_eta <- linkd( eta0 );
W <- diag( rep( mu_eta / ( sqrt( mu0 * ( 1 - mu0 )/m ) ), nx ) );
KerX <- diag( sqrt( kerx ) );
WK <- W * KerX;
KM <- rep( r / m, nx );
X0 <- matrix( 0, nr * nx, ( p + 1 ) * nx );
for( l in 1:nx ) {
X0[(1:nr+(l-1)*nr),(1:(p+1)+(l-1)*(p+1))] = tmpX0[((1:nr)+(l-1)*nr),];
}
X <- WK %*% X0;
Y <- WK %*% Z0;
DetXX <- det(t( X ) %*% X)
warncount <- c(0,0)
if( abs(DetXX) < 1e-14){
warncount[1] <- 1
}
beta<- try(qr.solve( t( X ) %*% X) %*% ( t( X ) %*% Y ),TRUE);
if (inherits(beta,"try-error")){
beta <- matrix(-50,nx*(p+1),1)
eta <- X0 %*% beta;
value$H <- matrix(NA,nx,nr)
}else{
iternum <- 0;
etadiff <- tol + 1;
eta <- X0 %*% beta;
mu_raw <- rep( mu0, nx );
M <- rep( m, nx );
score <- 1;
epsilon <- 1/(50*max(m));
while ( ( iternum < maxiter ) && ( etadiff > tol ) && ( score ) ) {
mu_old <- mu_raw;
eta_old <- eta;
mu <- linki( eta );
mu_raw <- mu;
mu[which( mu >= 1 - lapsing -epsilon )] <- 1 - lapsing -epsilon;
mu[( mu <= guessing + epsilon )] <- guessing+ epsilon ;
mu_eta <- linkd( linkl( mu ) );
z <- eta + ( KM - mu ) / mu_eta;
WK <- diag( mu_eta / ( sqrt( mu * ( 1 - mu ) / M ) ) ) * KerX;
X <- WK %*% X0;
Y <- WK %*% z;
beta <- qr.solve( t( X ) %*% X ) %*% ( t( X ) %*% Y );
eta1 <- beta[seq(1, (p+1)*nx, by=(p+1))]
eta <- (X0 %*% beta);
iternum <- iternum + 1;
mudiff <- max( max( abs( mu_old - mu_raw ) ) );
etadiff <- max( max( abs( eta_old - eta ) ) );
score <- !( ( mudiff < tol ) && ( max( abs( eta1 ) ) > 50 ) );
}
if( maxiter == iternum ) {
warncount[2] <- 1
}
if( returnH ) {
tmpH <- solve( t( X ) %*% X ) %*% ( t( X ) %*% WK );
tmpH <- tmpH[seq(1, (p+1)*nx, by=(p+1)),];
H <- matrix( 0, nx, nr );
for(i in 1:nx) {
H[i,] <- tmpH[i,(1:nr)+(i-1)*nr];
}
value$H <- H;
}
}
etafit <- beta[seq(1, (p+1)*nx, by=(p+1))];
pfit <- linki( etafit );
value$pfit <- pfit
value$etafit <- etafit
value$warncount <- warncount
return( value );
} |
"tau_t_1"
"f_t_1"
"g_t_1"
"p_t_1"
"beta_1"
"alpha_1"
"sigma_matrix_1"
"m_matrix_1" |
civis_ml_sparse_logistic <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
penalty = c("l2", "l1"),
dual = FALSE,
tol = 1e-8,
C = 499999950,
fit_intercept = TRUE,
intercept_scaling = 1,
class_weight = NULL,
random_state = 42,
solver = c("liblinear", "newton-cg", "lbfgs", "sag"),
max_iter = 100,
multi_class = c("ovr", "multinomial"),
fit_params = NULL,
cross_validation_parameters = NULL,
calibration = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "sparse_logistic"
penalty <- match.arg(penalty)
solver <- match.arg(solver)
multi_class <- match.arg(multi_class)
params <- list(
penalty = penalty,
dual = dual,
tol = tol,
C = C,
fit_intercept = fit_intercept,
intercept_scaling = intercept_scaling,
random_state = random_state,
solver = solver,
max_iter = max_iter,
multi_class = multi_class
)
if (!is.null(class_weight)) {
if (is.character(class_weight)) {
stopifnot(class_weight == "balanced")
} else {
stopifnot(is.list(class_weight))
}
params$class_weight <- class_weight
}
l1_solvers <- c("liblinear")
if (penalty == "l1" & !(solver %in% l1_solvers)) {
stop(paste0("The l1 penalty is not supported for ", solver, "."))
}
multinomial_solvers <- c("newton-cg", "sag", "lbfgs")
if (multi_class == "multinomial" & !(solver %in% multinomial_solvers)) {
stop(paste0(solver, " does not support multinomial loss."))
}
dual_solvers <- c("liblinear")
if (dual & !(solver %in% dual_solvers)) {
stop(paste0(solver, " does not support the dual formulation."))
}
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
calibration = calibration, oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_sparse_linear_regressor <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
fit_intercept = TRUE,
normalize = FALSE,
fit_params = NULL,
cross_validation_parameters = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "sparse_linear_regressor"
params <- list(
fit_intercept = fit_intercept,
normalize = normalize
)
if (!fit_intercept & normalize) {
warning("fit_intercept = FALSE, ignoring normalize.")
}
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_sparse_ridge_regressor <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
alpha = 1.0,
fit_intercept = TRUE,
normalize = FALSE,
max_iter = NULL,
tol = 0.001,
solver = c('auto', 'svd', 'cholesky', 'lsqr', 'sparse_cg', 'sag'),
random_state = 42,
fit_params = NULL,
cross_validation_parameters = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "sparse_ridge_regressor"
params <- list(
alpha = alpha,
fit_intercept = fit_intercept,
normalize = normalize,
max_iter = max_iter,
tol = tol,
solver = match.arg(solver),
random_state = random_state
)
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_gradient_boosting_classifier <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
loss = c('deviance', 'exponential'),
learning_rate = 0.1,
n_estimators = 500,
subsample = 1.0,
criterion = c('friedman_mse', 'mse', 'mae'),
min_samples_split = 2,
min_samples_leaf = 1,
min_weight_fraction_leaf = 0.0,
max_depth = 2,
min_impurity_split = 1e-7,
random_state = 42,
max_features = 'sqrt',
max_leaf_nodes = NULL,
presort = c('auto', TRUE, FALSE),
fit_params = NULL,
cross_validation_parameters = NULL,
calibration = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "gradient_boosting_classifier"
params <- list(
loss = match.arg(loss),
learning_rate = learning_rate,
n_estimators = n_estimators,
subsample = subsample,
criterion = match.arg(criterion),
min_samples_split = min_samples_split,
min_samples_leaf = min_samples_leaf,
min_weight_fraction_leaf = min_weight_fraction_leaf,
max_depth = max_depth,
min_impurity_split = min_impurity_split,
random_state = random_state,
max_leaf_nodes = max_leaf_nodes,
presort = match.arg(presort)
)
if (is.character(max_features)) {
stopifnot(max_features %in% c("sqrt", "auto", "log2"))
}
params$max_features <- max_features
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
calibration = calibration, oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_gradient_boosting_regressor <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
loss = c('ls', 'lad', 'huber', 'quantile'),
learning_rate = 0.1,
n_estimators = 500,
subsample = 1.0,
criterion = c('friedman_mse', 'mse', 'mae'),
min_samples_split = 2,
min_samples_leaf = 1,
min_weight_fraction_leaf = 0.0,
max_depth = 2,
min_impurity_split = 1e-7,
random_state = 42,
max_features = 'sqrt',
alpha = 0.9,
max_leaf_nodes = NULL,
presort = c('auto', TRUE, FALSE),
fit_params = NULL,
cross_validation_parameters = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "gradient_boosting_regressor"
params <- list(
loss = match.arg(loss),
learning_rate = learning_rate,
n_estimators = n_estimators,
subsample = subsample,
criterion = match.arg(criterion),
min_samples_split = min_samples_split,
min_samples_leaf = min_samples_leaf,
min_weight_fraction_leaf = min_weight_fraction_leaf,
max_depth = max_depth,
min_impurity_split = min_impurity_split,
random_state = random_state,
alpha = alpha,
max_leaf_nodes = max_leaf_nodes,
presort = match.arg(presort)
)
if (is.character(max_features)) {
stopifnot(max_features %in% c("sqrt", "auto", "log2"))
}
params$max_features <- max_features
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_random_forest_classifier <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
n_estimators = 500,
criterion = c('gini', 'entropy'),
max_depth = NULL,
min_samples_split = 2,
min_samples_leaf = 1,
min_weight_fraction_leaf = 0.0,
max_features = 'sqrt',
max_leaf_nodes = NULL,
min_impurity_split = 1e-7,
bootstrap = TRUE,
random_state = 42,
class_weight = NULL,
fit_params = NULL,
cross_validation_parameters = NULL,
calibration = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "random_forest_classifier"
params <- list(
n_estimators = n_estimators,
criterion = match.arg(criterion),
max_depth = max_depth,
min_samples_split = min_samples_split,
min_samples_leaf = min_samples_leaf,
min_weight_fraction_leaf = min_weight_fraction_leaf,
max_leaf_nodes = max_leaf_nodes,
min_impurity_split = min_impurity_split,
bootstrap = bootstrap,
random_state = random_state
)
if (is.character(max_features)) {
stopifnot(max_features %in% c("sqrt", "auto", "log2"))
}
params$max_features <- max_features
if (!is.null(class_weight)) {
if (is.character(class_weight)) {
stopifnot(class_weight == "balanced")
} else {
stopifnot(is.list(class_weight))
}
params$class_weight <- class_weight
}
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
calibration = calibration, oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_random_forest_regressor <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
n_estimators = 500,
criterion = c('mse', 'mae'),
max_depth = NULL,
min_samples_split = 2,
min_samples_leaf = 1,
min_weight_fraction_leaf = 0.0,
max_features = 'sqrt',
max_leaf_nodes = NULL,
min_impurity_split = 1e-7,
bootstrap = TRUE,
random_state = 42,
fit_params = NULL,
cross_validation_parameters = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "random_forest_regressor"
params <- list(
n_estimators = n_estimators,
criterion = match.arg(criterion),
max_depth = max_depth,
min_samples_split = min_samples_split,
min_samples_leaf = min_samples_leaf,
min_weight_fraction_leaf = min_weight_fraction_leaf,
max_leaf_nodes = max_leaf_nodes,
min_impurity_split = min_impurity_split,
bootstrap = bootstrap,
random_state = random_state
)
if (is.character(max_features)) {
stopifnot(max_features %in% c("sqrt", "auto", "log2"))
}
params$max_features <- max_features
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_extra_trees_classifier <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
n_estimators = 500,
criterion = c('gini', 'entropy'),
max_depth = NULL,
min_samples_split = 2,
min_samples_leaf = 1,
min_weight_fraction_leaf = 0.0,
max_features = 'sqrt',
max_leaf_nodes = NULL,
min_impurity_split = 1e-7,
bootstrap = FALSE,
random_state = 42,
class_weight = NULL,
fit_params = NULL,
cross_validation_parameters = NULL,
calibration = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "extra_trees_classifier"
params <- list(
n_estimators = n_estimators,
criterion = match.arg(criterion),
max_depth = max_depth,
min_samples_split = min_samples_split,
min_samples_leaf = min_samples_leaf,
min_weight_fraction_leaf = min_weight_fraction_leaf,
max_leaf_nodes = max_leaf_nodes,
min_impurity_split = min_impurity_split,
bootstrap = bootstrap,
random_state = random_state
)
if (is.character(max_features)) {
stopifnot(max_features %in% c("sqrt", "auto", "log2"))
}
params$max_features <- max_features
if (!is.null(class_weight)) {
if (is.character(class_weight)) {
stopifnot(class_weight == "balanced")
} else {
stopifnot(is.list(class_weight))
}
params$class_weight <- class_weight
}
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
calibration = calibration, oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
}
civis_ml_extra_trees_regressor <- function(x,
dependent_variable,
primary_key = NULL,
excluded_columns = NULL,
n_estimators = 500,
criterion = c('mse', 'mae'),
max_depth = NULL,
min_samples_split = 2,
min_samples_leaf = 1,
min_weight_fraction_leaf = 0.0,
max_features = 'sqrt',
max_leaf_nodes = NULL,
min_impurity_split = 1e-7,
bootstrap = FALSE,
random_state = 42,
fit_params = NULL,
cross_validation_parameters = NULL,
oos_scores_table = NULL,
oos_scores_db = NULL,
oos_scores_if_exists = c("fail", "append", "drop", "truncate"),
model_name = NULL,
cpu_requested = NULL,
memory_requested = NULL,
disk_requested = NULL,
notifications = NULL,
polling_interval = NULL,
verbose = FALSE,
civisml_version = "prod") {
model_type <- "extra_trees_regressor"
params <- list(
n_estimators = n_estimators,
criterion = match.arg(criterion),
max_depth = max_depth,
min_samples_split = min_samples_split,
min_samples_leaf = min_samples_leaf,
min_weight_fraction_leaf = min_weight_fraction_leaf,
max_leaf_nodes = max_leaf_nodes,
min_impurity_split = min_impurity_split,
bootstrap = bootstrap,
random_state = random_state
)
if (is.character(max_features)) {
stopifnot(max_features %in% c("sqrt", "auto", "log2"))
}
params$max_features <- max_features
civis_ml(x = x, dependent_variable = dependent_variable,
model_type = model_type, primary_key = primary_key,
excluded_columns = excluded_columns, parameters = params,
fit_params = fit_params,
cross_validation_parameters = cross_validation_parameters,
oos_scores_table = oos_scores_table,
oos_scores_db = oos_scores_db,
oos_scores_if_exists = oos_scores_if_exists, model_name = model_name,
cpu_requested = cpu_requested, memory_requested = memory_requested,
disk_requested = disk_requested, notifications = notifications,
polling_interval = polling_interval, verbose = verbose, civisml_version = civisml_version)
} |
context("solarized")
test_that("theme_solarized_works", {
expect_is(theme_solarized(), "theme")
expect_is(theme_solarized(light = FALSE), "theme")
})
test_that("theme_solarized_2_works", {
expect_is(theme_solarized_2(), "theme")
expect_is(theme_solarized_2(light = FALSE), "theme")
})
test_that("scale_colour_solarized works", {
expect_is(scale_colour_solarized(), "ScaleDiscrete")
})
test_that("scale_color_solarized works", {
expect_eqNe(scale_colour_solarized(), scale_color_solarized())
})
test_that("scale_fill_solarized works", {
expect_is(scale_fill_solarized(), "ScaleDiscrete")
})
test_that("solarized_pal works", {
pal <- solarized_pal()
expect_is(pal, "function")
n <- 5L
values <- pal(n)
expect_is(values, "character")
expect_eqNe(length(values), n)
}) |
simdiffT=function(N,a,mv,sv,ter,vp=1,max.iter=19999,eps=1e-15){
rt=p=matrix(,N,1)
for(jj in 1:N){
drift=rnorm(1,mv,sv)
p[jj]=exp(a*drift)/(1+exp(a*drift))
M=pi*vp^2/a^2 * (exp(a*drift/(2*vp^2))+exp(-a*drift/(2*vp^2))) * 1/ (drift^2/(2*vp^2)+pi^2*vp^2 / (2*a^2))
lmb = drift^2/(2*vp^2) +pi^2*vp^2/(2*a^2)
ou=c()
rej=0
while(length(ou)<1){
v=runif(1); u=runif(1);
FF=pi^2*vp^4 * 1/(pi^2*vp^4+drift^2*a^2)
sh1=1
sh2=0
sh3=0
i=0
while(abs(sh1-sh2)>eps | abs(sh2-sh3)>eps){
sh1=sh2
sh2=sh3
i=i+1
sh3= sh2 + (2*i+1)*(-1)^i*(1-u)^(FF*(2*i+1)^2)
}
eval=1+(1-u)^-FF * sh3
if(v<=eval) ou=c(ou,1/lmb*abs(log(1-u)))
else rej=rej+1
if(rej==max.iter) stop("Rejection algorithm failed. Increase the 'max.iter' argument or try different true parameter values.")
}
rt[jj]=ou+ter
}
x=(p>matrix(runif(N)))*1
return(list(rt=rt,x=x))
} |
plot.light_profile <- function(x, swap_dim = FALSE, facet_scales = "free_x",
rotate_x = x$type != "partial dependence",
show_points = TRUE, ...) {
value_name <- getOption("flashlight.value_name")
label_name <- getOption("flashlight.label_name")
q1_name <- getOption("flashlight.q1_name")
q3_name <- getOption("flashlight.q3_name")
type_name <- getOption("flashlight.type_name")
data <- x$data
nby <- length(x$by)
multi <- is.light_profile_multi(x)
ndim <- nby + multi
if (ndim > 2L) {
stop("Plot method not defined for more than two by variables or
multiflashlight with more than one by variable.")
}
if (length(x$v) >= 2L) {
stop("No plot method defined for two or higher dimensional grids.")
}
if (x$stats == "quartiles") {
p <- ggplot(x$data, aes_string(y = value_name, x = x$v,
ymin = q1_name, ymax = q3_name))
} else {
p <- ggplot(x$data, aes_string(y = value_name, x = x$v))
}
if (ndim == 0L) {
if (x$stats == "quartiles") {
p <- p + geom_crossbar(...)
}
else {
p <- p + geom_line(aes(group = 1), ...)
if (show_points) {
p <- p + geom_point(...)
}
}
} else if (ndim == 1L) {
first_dim <- if (multi) label_name else x$by[1]
if (!swap_dim) {
if (x$stats == "quartiles") {
p <- p +
geom_crossbar(aes_string(color = first_dim), position = "dodge", ...)
} else {
p <- p +
geom_line(aes_string(color = first_dim, group = first_dim), ...)
if (show_points) {
p <- p + geom_point(aes_string(color = first_dim), ...)
}
}
} else {
p <- p +
facet_wrap(reformulate(first_dim), scales = facet_scales)
if (x$stats == "quartiles") {
p <- p + geom_crossbar(...)
} else {
p <- p + geom_line(aes(group = 1), ...)
if (show_points) {
p <- p + geom_point(...)
}
}
}
} else {
second_dim <- if (multi) label_name else x$by[2]
wrap_var <- if (swap_dim) x$by[1] else second_dim
col_var <- if (swap_dim) second_dim else x$by[1]
if (x$stats == "quartiles") {
p <- p +
geom_crossbar(aes_string(color = col_var), position = "dodge", ...)
} else {
p <- p + geom_line(aes_string(color = col_var, group = col_var), ...)
if (show_points) {
p <- p + geom_point(aes_string(color = col_var), ...)
}
}
p <- p + facet_wrap(wrap_var, scales = facet_scales)
}
if (rotate_x) {
p <- p +
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1))
}
p + ylab(x$type)
} |
expected <- structure(8.33333333333333, units = "mins", .Names = "a", class = "difftime")
test(id=0, code={
argv <- structure(list(x = structure(500, units = "secs", class = "difftime", .Names = "a"),
value = "mins"), .Names = c("x", "value"))
do.call('units<-', argv);
}, o = expected);
|
rgcca <- function(A, C = 1-diag(length(A)), tau = rep(1, length(A)), ncomp = rep(1, length(A)), scheme = "centroid", scale = TRUE , init="svd", bias = TRUE, tol = 1e-8, verbose=TRUE) {
if (any(ncomp < 1)) stop("Compute at least one component per block!")
pjs <- sapply(A, NCOL)
nb_row <- NROW(A[[1]])
if (any(ncomp-pjs > 0)) stop("For each block, choose a number of components smaller than the number of variables!")
if (mode(scheme) != "function") {
if ((scheme != "horst" ) & (scheme != "factorial") & (scheme != "centroid")) {
stop("Choose one of the three following schemes: horst, centroid, factorial or design the g function")
}
if (verbose) cat("Computation of the RGCCA block components based on the", scheme, "scheme \n")
}
if (mode(scheme) == "function" & verbose) {
cat("Computation of the RGCCA block components based on the g scheme \n")
}
if (scale == TRUE) {
A = lapply(A, function(x) scale2(x, bias = bias))
A = lapply(A, function(x) x/sqrt(NCOL(x)))
}
if (!is.numeric(tau) & verbose) {
cat("Optimal Shrinkage intensity paramaters are estimated \n")
}
else {
if (is.numeric(tau) & verbose) {
cat("Shrinkage intensity paramaters are chosen manually \n")
}
}
AVE_X = list()
AVE_outer <- vector()
ndefl <- ncomp-1
N <- max(ndefl)
nb_ind <- NROW(A[[1]])
J <- length(A)
primal_dual = rep("primal", J)
primal_dual[which(nb_row<pjs)] = "dual"
if (N == 0) {
result <- rgccak(A, C, tau=tau , scheme=scheme, init = init, bias = bias, tol = tol, verbose=verbose)
Y <- NULL
for (b in 1:J) Y[[b]] <- result$Y[,b, drop = FALSE]
for (j in 1:J) AVE_X[[j]] = mean(cor(A[[j]], Y[[j]])^2)
AVE_outer <- sum(pjs * unlist(AVE_X))/sum(pjs)
AVE <- list(AVE_X = AVE_X,
AVE_outer = AVE_outer,
AVE_inner = result$AVE_inner)
a <- lapply(result$a, cbind)
for (b in 1:J) {
rownames(a[[b]]) = colnames(A[[b]])
rownames(Y[[b]]) = rownames(A[[b]])
colnames(Y[[b]]) = "comp1"
}
out <- list(Y=Y, a =a, astar=a, C=C,
tau=result$tau, scheme=scheme,
ncomp=ncomp, crit=result$crit,
primal_dual = primal_dual,
AVE=AVE)
class(out) <- "rgcca"
return(out)
}
Y <- NULL
crit = list()
AVE_inner <- rep(NA,max(ncomp))
R <- A
P <- a <- astar <- NULL
if (is.numeric(tau)) tau_mat = tau
else tau_mat = matrix(NA, max(ncomp), J)
for (b in 1:J) P[[b]] <- a[[b]] <- astar[[b]] <- matrix(NA,pjs[[b]],N+1)
for (b in 1:J) Y[[b]] <- matrix(NA,nb_ind,N+1)
for (n in 1:N) {
if (verbose) cat(paste0("Computation of the RGCCA block components
if(is.vector(tau))
rgcca.result <- rgccak(R, C, tau = tau , scheme=scheme, init = init, bias = bias, tol = tol, verbose=verbose)
else
rgcca.result <- rgccak(R, C, tau = tau[n, ] , scheme=scheme, init = init, bias = bias, tol = tol, verbose=verbose)
if (!is.numeric(tau)) tau_mat[n, ] = rgcca.result$tau
AVE_inner[n] <- rgcca.result$AVE_inner
crit[[n]] <- rgcca.result$crit
for (b in 1:J) Y[[b]][,n] <- rgcca.result$Y[ , b]
defla.result <- defl.select(rgcca.result$Y, R, ndefl, n, nbloc = J)
R <- defla.result$resdefl
for (b in 1:J) P[[b]][,n] <- defla.result$pdefl[[b]]
for (b in 1:J) a[[b]][,n] <- rgcca.result$a[[b]]
if (n==1) {
for (b in 1:J) astar[[b]][,n] <- rgcca.result$a[[b]]
}
else {
for (b in 1:J) astar[[b]][,n] <- rgcca.result$a[[b]] - astar[[b]][,(1:n-1), drop=F] %*% drop( t(a[[b]][,n]) %*% P[[b]][,1:(n-1),drop=F] )
}
}
if (verbose) cat(paste0("Computation of the RGCCA block components
if(is.vector(tau))
rgcca.result <- rgccak(R, C, tau = tau , scheme=scheme, init = init, bias = bias, tol = tol, verbose=verbose)
else
rgcca.result <- rgccak(R, C, tau = tau[N+1, ] , scheme=scheme, init = init, bias = bias, tol = tol, verbose=verbose)
crit[[N+1]] <- rgcca.result$crit
if (!is.numeric(tau)) tau_mat[N+1, ] = rgcca.result$tau
AVE_inner[max(ncomp)] <- rgcca.result$AVE_inner
for (b in 1:J) {
Y[[b]][,N+1] <- rgcca.result$Y[ ,b]
a[[b]][,N+1] <- rgcca.result$a[[b]]
astar[[b]][,N+1] <- rgcca.result$a[[b]] - astar[[b]][,(1:N),drop=F] %*% drop( t(a[[b]][,(N+1)]) %*% P[[b]][,1:(N),drop=F] )
rownames(a[[b]]) = rownames(astar[[b]]) = colnames(A[[b]])
rownames(Y[[b]]) = rownames(A[[b]])
colnames(Y[[b]]) = paste0("comp", 1:max(ncomp))
}
shave.matlist <- function(mat_list, nb_cols) mapply(function(m, nbcomp) m[, 1:nbcomp, drop = FALSE], mat_list, nb_cols,SIMPLIFY=FALSE)
shave.veclist <- function(vec_list, nb_elts) mapply(function(m, nbcomp) m[1:nbcomp], vec_list, nb_elts, SIMPLIFY=FALSE)
for (j in 1:J) AVE_X[[j]] = apply(cor(A[[j]], Y[[j]])^2, 2, mean)
outer = matrix(unlist(AVE_X), nrow = max(ncomp))
for (j in 1:max(ncomp)) AVE_outer[j] <- sum(pjs * outer[j, ])/sum(pjs)
Y = shave.matlist(Y, ncomp)
AVE_X = shave.veclist(AVE_X, ncomp)
AVE <- list(AVE_X = AVE_X,
AVE_outer_model = AVE_outer,
AVE_inner_model = AVE_inner)
out <- list(Y = shave.matlist(Y, ncomp),
a = shave.matlist(a, ncomp),
astar = shave.matlist(astar, ncomp),
C = C, tau = tau_mat,
scheme = scheme, ncomp=ncomp, crit = crit,
primal_dual = primal_dual,
AVE = AVE)
class(out) <- "rgcca"
return(out)
} |
plot_puberty_stages <- function(data) {
plot <- maturation_cm(data) %>%
ggplot2::ggplot(ggplot2::aes(x = `Maturity Offset (years)`, y = `% Adult Height`, label = Athlete)) +
ggplot2::annotate("rect", xmin = -Inf, xmax = 4.5, ymin = 100, ymax = 102, fill = "black") +
ggplot2::annotate("rect", xmin = -Inf, xmax = 4.5, ymin = -Inf, ymax = 88, fill = "gray", alpha = 0.4) +
ggplot2::annotate("rect", xmin = -Inf, xmax = 4.5, ymin = 88, ymax = 95, fill = "gray", alpha = 0.6) +
ggplot2::annotate("rect", xmin = -Inf, xmax = 4.5, ymin = 95, ymax = 100, fill = "gray", alpha = 0.8) +
ggplot2::annotate("rect", xmin = 4.5, xmax = Inf, ymin = -Inf, ymax = Inf, fill = "white") +
ggplot2::annotate("text", x = 0, y = 101, label = "Growth Spurt", size = 3, color = "white") +
ggplot2::annotate("text", x = -2.7, y = 101, label = "Pre-Puberty", size = 3, color = "white") +
ggplot2::annotate("text", x = 2.7, y = 101, label = "Post-Puberty", size = 3, color = "white") +
ggplot2::annotate("text", x = -4, y = 85, label = "< 88%", size = 3, color = "black") +
ggplot2::annotate("text", x = -4, y = 91.5, label = "88-95%", size = 3, color = "black") +
ggplot2::annotate("text", x = -4, y = 97.5, label = "> 95%", size = 3, color = "black") +
ggplot2::geom_vline(xintercept = -1, color = "white") +
ggplot2::geom_vline(xintercept = 1, color = "white") +
ggrepel::geom_text_repel(nudge_x = 6, direction = "y", angle = 0, hjust = -1, segment.size = 0.01, point.padding = 1, segment.alpha = 0.1, size = 3, color = "black") +
ggplot2::geom_point(size = 2.5, alpha = 0.5, color = "red", shape = 21) +
ggplot2::ylim (83, 102) +
ggplot2::scale_x_continuous(limits = c(-4,5.5), breaks = seq(-4, 4, by = 1)) +
ggplot2::ylab("% Adult Height \n") + ggplot2::xlab("\n Maturity Offset (Years)") +
ggplot2::ggtitle("\n % Predicted Adult Height", subtitle = " Maturity Offset \n") +
ggplot2::theme_light() +
ggplot2::theme(panel.grid = ggplot2::element_blank(),
panel.border = ggplot2::element_blank(),
axis.title.x = ggplot2::element_text(color = "grey", hjust = 0.8),
axis.title.y = ggplot2::element_text(color = "grey", hjust = 0.8),
axis.text.y = ggplot2::element_blank(),
axis.ticks.y = ggplot2::element_blank(),
plot.subtitle = ggplot2::element_text(color = "darkgray"),
legend.title = ggplot2::element_blank())
plot
} |
gemOLGFTwoFirms <- function(...) sdm2(...) |
context("filterKinMatrix")
library(testthat)
ped <- nprcgenekeepr::qcPed
ped$gen <- findGeneration(ped$id, ped$sire, ped$dam)
kmat <- kinship(ped$id, ped$sire, ped$dam, ped$gen,
sparse = FALSE)
ids <- ped$id[c(189, 192, 194, 195)]
ncols <- ncol(kmat)
nrows <- nrow(kmat)
kmatFiltered <- filterKinMatrix(ids, kmat)
test_that("filterKinMatrix retains the correct rows and columns", {
expect_equal(kmatFiltered[1, 2], kmat[189, 192])
expect_equal(kmatFiltered[1, 3], kmat[189, 194])
expect_equal(kmatFiltered[1, 4], kmat[189, 195])
expect_equal(kmatFiltered[2, 3], kmat[192, 194])
})
ids <- c("C1ICXL", "2KULR3", "RI0O7F", "7M51X5", "170ZTZ", "Y7PPEZ",
"CFPEEU", "ZC5SCR", "218FOV", "2IXJ2N", "CAST4W", "JGPN6K", "HOYW0S",
"DD1U77", "0DAV0I", "HLI95R", "TZ5NUB", "DR5GXB", "EUG3WE", "FHV13N",
"OUM6QF", "6Z7MD9", "309VM2", "8KM1MP", "I9TQ0T", "INGWI7")
kmatFiltered <- filterKinMatrix(ids, kmat)
test_that("filterKinMatrix leaves the correct rows", {
expect_equal(nrow(kmatFiltered), length(ids))
expect_equal(ncol(kmatFiltered), length(ids))
expect_equal(kmat[(seq_len(nrow(kmat)))[rownames(kmat) %in% ids[20:23]],
(seq_len(ncol(kmat)))[colnames(kmat) %in% ids[20:23]]],
kmatFiltered[20:23, 20:23])
}
) |
geomcp <- function(X,penalty='MBIC',pen.value=0,test.stat='Normal',msl=2,nquantiles=1,MAD=FALSE,ref.vec='Default',ref.vec.value=0){
if(!is.matrix(X)){
if(is.data.frame(X)){
X <- as.matrix(X)
}else{
stop("Data type must be a matrix or data frame")
}
}
if(length(X[1,])<2){
stop('Univariate changepoint analysis is not supported')
}
if(anyNA(X)){
stop("Missing value: NA is not allowed in the data")
}
if(!is.numeric(X)){
stop("Only numeric data allowed")
}
penalty <- toupper(penalty)
if(!(penalty %in% c('MBIC','BIC','SIC','MANUAL','HANNAN-QUINN'))){
stop('Univariate penalty choice not recognized; should be "MBIC", "BIC", "SIC","Hannan-Quinn" or "Manual"')
}else if(penalty=='MANUAL'){
penalty <- 'Manual'
}else if(penalty=='HANNAN-QUINN'){
penalty <- 'Hannan-Quinn'
}
test.stat <- toupper(test.stat)
if(!((test.stat=='NORMAL')||(test.stat=="EMPIRICAL"))){
stop('Invalid test statistic, must be Normal or Empirical')
}else if(test.stat=='NORMAL'){
test.stat='Normal'
}else{
test.stat='Empirical'
}
if(msl<1|msl>floor(length(X[,1])/2)){
stop('Minimum segment length must be between 1 and half the no. of time points (rounded down)')
}
nquantiles <- as.integer(nquantiles)
if((nquantiles<1)){
stop("Number of quantiles must be a positive integer")
}
if((nquantiles==1)&&(test.stat=='Empirical')){
nquantiles <- ceiling(4*log(length(X[,1])))
}
if((nquantiles!=1)&&(test.stat=='Normal')){
nquantiles <- 1
warning('nquantiles is not used with a Normal test statistic')
}
if(!is.logical(MAD)){
stop('MAD should be logical; TRUE or FALSE.')
}
ref.vec <- toupper(ref.vec)
if(ref.vec=='DEFAULT'){
ref.vec.value <- rep(1,length(X[1,]))
ref.vec <- 'Default'
}else if(ref.vec=='MANUAL'){
if(!is.numeric(ref.vec.value)){
stop("Reference vector value should be a vector of type numeric")
}else if(length(ref.vec.value)!=length(X[1,])){
stop('Length of reference vector is not the same as number of series in data')
}else if(isTRUE(all.equal(ref.vec.value,rep(0,length(X[1,]))))){
stop('Reference vector cannot be the origin as angle undefined.')
}else{
ref.vec <- 'Manual'
}
}else{
stop('Reference vector type not recognized; should be "Default" or "Manual".')
}
X.original <- X
if(MAD){
X <- apply(X,2,function(x){(x-median(x))/mad(x)})
if(sum(is.nan(X))>0){
stop('Unable to perform MAD transformation')
}
}
min.X <- apply(X,2,min)-ref.vec.value
X <- t(apply(X,1,function(x){x-min.X}))
X.dist <- distance.mapping(X,ref.vec.value)
X.ang <- angle.mapping(X,ref.vec.value)
if(test.stat=='Normal'){
dist.cpts.ans <- cpt.meanvar(X.dist,penalty=penalty,pen.value=pen.value,method='PELT',param.estimates=FALSE,minseglen=msl,class=TRUE)
ang.cpts.ans <- cpt.meanvar(X.ang,penalty=penalty,pen.value=pen.value,method='PELT',param.estimates=FALSE,minseglen=msl,class=TRUE)
}
else if(test.stat=='Empirical'){
dist.cpts.ans <- cpt.np(X.dist,penalty=penalty,pen.value=pen.value,method='PELT',minseglen=msl,nquantiles=nquantiles,class=TRUE)
ang.cpts.ans <- cpt.np(X.ang,penalty=penalty,pen.value=pen.value,method='PELT',minseglen=msl,nquantiles=nquantiles,class=TRUE)
}
out <- class_input(data.set=X.original,distance=X.dist,angle=X.ang,penalty=penalty,pen.value=pen.value(dist.cpts.ans),test.stat=test.stat,msl=msl,nquantiles=nquantiles,dist.cpts=cpts(dist.cpts.ans),ang.cpts=cpts(ang.cpts.ans))
return(out)
} |
unseiji_ST61_C <- list(
rt.y = 20,
ecj = c(3, 4.5),
section.y = c(0:5, 6.33, 7.67, 9.00, 10.33, 11.67, 13:20),
t.start = 0.375,
t.end = 12.1,
section = data.frame(
age = c(0.7, 1.3, 1.8, 2.4, 3.0, 3.7,
4.5, 5.3, 6.0, 6.8, 7.6, 8.3,
8.9, 9.5, 10.0, 10.6, 11.2, 11.8),
d13C = c(-19.2, -18.7, -18.9, -19.0, -19.1, -19.2,
-19.3, -19.3, -19.3, -19.2, -19.1, -19.1,
-19.1, -19.1, -19.1, -19.3, -19.5, -19.6),
d15N = c(12.9, 12.5, 12.1, 12.1, 12.4, 11.9,
11.7, 11.4, 11.5, 11.5, 11.4, 11.5,
11.7, 11.6, 11.7, 11.9, 12.1, 12.6)))
unseiji_ST61_M1 <- list(
rt.y = 18,
ecj = c(5, 5.5),
section.y = c(0:15, 18),
t.start = 0.0,
t.end = 10.0,
section = data.frame(
age = c(0.3, 0.8, 1.4, 1.9, 2.5, 3.1,
3.6, 4.2, 4.7, 5.3, 5.8, 6.4,
6.9, 7.5, 8.1, 9.2),
d13C = c(-18.9, -19.1, -19.0, -18.7, -18.9, -18.8,
-19.0, -19.1, -19.1, -19.0, -19.2, -19.3,
-19.2, -19.3, -19.4, -19.4),
d15N = c(14.5, 12.6, 12.2, 12.2, 12.4, 12.1,
12.0, 11.7, 11.4, 11.6, 11.7, 11.7,
11.6, 12.0, 12.3, 14.1))) |
"absval.iwres.vs.ipred" <-
function(object,
ylb = "|iWRES|",
type="p",
ids = FALSE,
idsdir = "up",
smooth = TRUE,
...) {
if(is.null(xvardef("iwres",object)) ||
is.null(xvardef("ipred",object))) {
cat("The required variables are not set in the data base\n")
return()
}
xplot <- xpose.plot.default(xvardef("ipred",object),
xvardef("iwres",object),
ylb = ylb,
funy = "abs",
type= type,
ids = ids,
idsdir=idsdir,
smooth=smooth,
object,
...)
return(xplot)
} |
g2tests_perm <- function(data,x,y,dc,nperm) {
.Call(Rfast_g2tests_perm,data,x,y,dc,nperm)
}
g2Test_univariate <- function(data,dc) {
.Call(Rfast_g2Test_univariate,data,dc)
}
g2Test_perm <- function(data,x,y,cs,dc,nperm) {
.Call(Rfast_g2Test_perm,data,x,y,cs,dc,nperm)
}
g2tests <- function(data,x,y,dc) {
.Call(Rfast_g2tests,data,x,y,dc)
}
g2Test_univariate_perm <- function(data,dc,nperm) {
.Call(Rfast_g2Test_univariate_perm,data,dc,nperm)
}
g2Test <- function(data,x,y,cs,dc) {
.Call(Rfast_g2Test,data,x,y,cs,dc)
} |
zijderveld <- function(dec, inc, int, xh = "WE", xv = xh, centre = F,
xlim = NA, ylim = NA, unit = NA,
xlab = "", ylab = "",
labels = NA, nlabels = 1,
h = list(pch = 19),
v = list(pch = 21, bg = "white"),
f = list(pch = 21, bg = "white", cex = 1.5),
t = list(pos = 3, offset = 0.5),
l = list(),
anchored = T,
style = "branches",
tcl = 0.2,
orientation = TRUE,
scientific = NA,
decimals = 10,
add = FALSE)
{
cart <- transphere(dec = dec, inc = inc, int = int)
if(xh == "SN"){
xhi <- cart$x
yhi <- -cart$y
} else if(xh == "WE"){
xhi <- cart$y
yhi <- cart$x
} else {
stop("The xh parameter should be 'SN' or 'WE'.")
}
yvi <- -cart$z
if(xv == "SN"){
xvi <- cart$x
} else if (xv == "WE"){
xvi <- cart$y
} else if(xv == "modified"){
xvi <- sqrt(cart$x^2 + cart$y^2)
} else {
stop("The xh parameter should be 'SN', 'WE' or 'modified'.")
}
if(!add){
if(orientation){
if(xh == xv){
if(xh == "WE") {
xcap <- c("W","E")
ycap <- c("S, Down", "N, Up")
} else if(xh == "SN"){
xcap <- c("S","N")
ycap <- c("E, Down", "W, Up")
}
} else {
if(xv == "WE") {
xcap <- c("S, W","N, E")
ycap <- c("E, Down", "W, Up")
} else if(xv == "SN"){
xcap <- c("W, S","E, N")
ycap <- c("S, Down", "N, Up")
} else if(xv == "modified"){
if(xh == "WE") {
xcap <- c("W, mod","E, mod")
ycap <- c("S, Down", "N, Up")
} else if(xh == "SN"){
xcap <- c("S, mod","N, mod")
ycap <- c("E, Down", "W, Up")
}
}
}
}
if(centre){
xmax <- max(abs(c(xhi,xvi)))
xtlim <- c(-xmax,xmax)
} else {
xmax <- max(c(xhi,xvi,0))
xmin <- min(c(xhi,xvi,0))
xtlim <- c(xmin,xmax)
}
if(centre){
ymax <- max(abs(c(yhi,yvi)))
ytlim <- c(-ymax,ymax)
} else {
ymax <- max(c(yhi,yvi,0))
ymin <- min(c(yhi,yvi,0))
ytlim <- c(ymin,ymax)
}
if(is.na(unit)[[1]]){
px <- pretty(xtlim)
py <- pretty(ytlim)
mult <- min(c((px[2] - px[1]), (py[2] - py[1])))
if(!is.na(xlim[[1]]) & length(xlim) == 2 & class(xlim) == "numeric"){
pxn <- pretty(xlim)
mult <- min(mult, (pxn[2] - pxn[1]))
}
if(!is.na(ylim[[1]]) & length(ylim) == 2 & class(ylim) == "numeric"){
pyn <- pretty(ylim)
mult <- min(mult, (pyn[2] - pyn[1]))
}
} else if((class(unit) == "numeric" | class(unit) == "integer") &
length(unit) == 1 & !is.na(unit) & unit > 0){
mult <- unit
} else {
stop(paste("The 'unit' parameter should be NA or a positive",
" non zero numeric of length one.", sep = ""))
}
xlcas <- encase(xtlim[1] - mult, xtlim[2] + mult, mult)
ylcas <- encase(ytlim[1] - mult, ytlim[2] + mult, mult)
if(is.na(xlim[[1]])){
xlim <- xlcas
}
if(is.na(ylim[[1]])){
ylim <- ylcas
}
plot(0, 0, asp = 1, xlim = xlim, ylim = ylim, type = "n",
xlab = "", ylab = "", axes = F)
pusr <- par("usr")
if(style == "box0" | style == "box1" | style == "box2"){
box()
xcas <- encase(pusr[1], pusr[2], mult)
ycas <- encase(pusr[3], pusr[4], mult)
xtic <- seq(xcas[1], xcas[2], mult)
ytic <- seq(ycas[1], ycas[2], mult)
if(!is.na(scientific[[1]])) {
if(scientific){
xtic <- formatC(xtic, format = "e", digits = decimals)
ytic <- formatC(ytic, format = "e", digits = decimals)
} else if (!scientific){
xtic <- formatC(unique(round(xtic, decimals)),decimals, format = "f")
ytic <- formatC(unique(round(ytic, decimals)),decimals, format = "f")
}
axis(1, labels = xtic, lwd = 0, lwd.ticks = 1, tcl = -tcl, at = xtic)
axis(2, labels = ytic, lwd = 0, lwd.ticks = 1, tcl = -tcl, las = 1,
at = ytic)
} else {
axis(1, lwd = 0, lwd.ticks = 1, tcl = -tcl, at = xtic)
axis(2, lwd = 0, lwd.ticks = 1, tcl = -tcl, las = 1,
at = ytic)
}
if((style == "box0" | style == "box1") & orientation){
text(xlcas, 0, labels = xcap)
text(0, ylcas, labels = ycap)
}
if(style == "box2" & orientation){
axis(3, pos = 0, labels = xcap, lwd = 0, las = 1,
at = xlcas, padj = 0.5)
axis(4, pos = 0, labels = ycap, lwd = 0, las = 1,
at = ylcas, hadj = 0.2)
}
if(style == "box1") points(0,0,pch = 3,cex = 1.5)
if(style == "box2" ) abline(v = 0,h = 0)
} else if(style == "branches"){
xtic <- seq(xlcas[1], xlcas[2], mult)
ytic <- seq(ylcas[1], ylcas[2], mult)
if(!is.na(scientific[[1]])) {
if(scientific){
xtic <- formatC(xtic, format = "e", digits = decimals)
ytic <- formatC(ytic, format = "e", digits = decimals)
} else if (!scientific){
xtic <- formatC(unique(round(xtic, decimals)),decimals, format = "f")
ytic <- formatC(unique(round(ytic, decimals)),decimals, format = "f")
}
xmar <- c(xtic[1], xtic[length(xtic)])
ymar <- c(ytic[1], ytic[length(ytic)])
axis(1, pos = 0, labels = xmar, lwd = 0, at = xmar)
axis(2, pos = 0, labels = ymar, lwd = 0, las = 1, at = ymar)
} else {
xmar <- c(xtic[1], xtic[length(xtic)])
ymar <- c(ytic[1], ytic[length(ytic)])
axis(1, pos = 0, lwd = 0, at = xmar)
axis(2, pos = 0, lwd = 0, las = 1, at = ymar)
}
axis(1, pos = 0, labels = F, lwd = 1, lwd.ticks = 0,
at = xlcas)
axis(1, pos = 0, labels = F, lwd = 0, lwd.ticks = 1, tcl = -tcl,
at = xtic)
axis(1, pos = 0, labels = F, lwd = 0, lwd.ticks = 1, tcl = tcl, at = xtic)
axis(3, pos = 0, labels = xcap, lwd = 0, las = 1,
at = c(xtic[1], xtic[length(xtic)]))
axis(2, pos = 0, labels = F, lwd = 1, lwd.ticks = 0,
at = ylcas)
axis(2, pos = 0, labels = F, lwd = 0, lwd.ticks = 1, tcl = -tcl,
at = ytic)
axis(2, pos = 0, labels = F, lwd = 0, lwd.ticks = 1, tcl = tcl, at = ytic)
axis(4, pos = 0, labels = ycap, lwd = 0, las = 1,
at = c(ytic[1], ytic[length(ytic)]))
} else {
stop(paste("The 'style' parameter should be 'box0',",
" 'box1', 'box2' or 'branches'.", sep = ""))
}
}
hi <- merge_list(h, list(pch = 19))
vi <- merge_list(v, list(pch = 21, bg = "white"))
fi <- merge_list(f, list(pch = 21, bg = "white", cex = 1.5))
hi <- c(list(x = xhi, y = yhi), hi)
vi <- c(list(x = xvi, y = yvi), vi)
fi <- c(list(x = c(xhi[1],xvi[1]), y = c(yhi[1],yvi[1])), fi)
if(anchored){
xlhi <- c(xhi,0)
ylhi <- c(yhi,0)
xlvi <- c(xvi,0)
ylvi <- c(yvi,0)
} else {
xlhi <- xhi
ylhi <- yhi
xlvi <- xvi
ylvi <- yvi
}
lhi <- c(list(x = xlhi, y = ylhi), l)
lvi <- c(list(x = xlvi, y = ylvi), l)
do.call(lines, lhi)
do.call(lines, lvi)
do.call(points, fi)
do.call(points, hi)
do.call(points, vi)
if(!(length(labels) == 1 & is.na(labels[[1]]))){
labels <- every_nth(labels, nlabels, inverse = TRUE)
ti <- merge_list(t, list(pos = 3, offset = 0.5))
thi <- c(list(x = xhi, y = yhi, labels = labels), ti)
tvi <- c(list(x = xvi, y = yvi, labels = labels), ti)
do.call(text,thi)
do.call(text,tvi)
}
} |
twocor <- function(x1, y1, x2, y2, corfun = "pbcor", nboot = 599, tr = 0.2, beta = 0.2, ...){
cl <- match.call()
alpha <- .05
corfun <- match.arg(corfun, c("pbcor", "wincor"), several.ok = FALSE)
data1<-matrix(sample(length(y1),size=length(y1)*nboot,replace=TRUE),nrow=nboot)
if (corfun == "pbcor") bvec1 <- apply(data1, 1, function(xx) pbcor(x1[xx], y1[xx], beta = beta, ci = FALSE)$cor)
if (corfun == "wincor") bvec1 <- apply(data1, 1, function(xx) wincor(x1[xx], y1[xx], tr = tr, ci = FALSE)$cor)
data2<-matrix(sample(length(y2),size=length(y2)*nboot,replace=TRUE),nrow=nboot)
if (corfun == "pbcor") bvec2 <- apply(data2, 1, function(xx) pbcor(x2[xx], y2[xx], beta = beta,ci = FALSE)$cor)
if (corfun == "wincor") bvec2 <- apply(data2, 1, function(xx) wincor(x2[xx], y2[xx], tr = tr,ci = FALSE)$cor)
bvec<-bvec1-bvec2
bsort<-sort(bvec)
nboot <- length(bsort)
term<-alpha/2
ilow<-round((alpha/2) * nboot)
ihi<-nboot - ilow
ilow<-ilow+1
corci<-1
corci[1]<-bsort[ilow]
corci[2]<-bsort[ihi]
pv<-(sum(bsort<0)+.5*sum(bsort==0))/nboot
pv=2*min(c(pv,1-pv))
if (corfun == "pbcor") {
r1<-pbcor(x1,y1, beta,ci = FALSE)$cor
r2<-pbcor(x2,y2, beta,ci = FALSE)$cor
}
if (corfun == "wincor") {
r1<-wincor(x1,y1, tr,ci = FALSE)$cor
r2<-wincor(x2,y2, tr,ci = FALSE)$cor
}
result <- list(r1=r1, r2 = r2, ci = corci, p.value = pv, call = cl)
class(result) <- "twocor"
result
} |
x <- 1:3
A %*% x
as.matrix(x) |
fullup <- function(sA) {
if(is(sA, 'sparseMatrix')){
A <- as.matrix(sA)
} else {
A <- full(rbind(sA,cbind(sA[,2],sA[,1],sA[,3])))
}
return(A)
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.