-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,248 changed files
with
251,957 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
* using log directory 'C:/Users/friendly/Dropbox/R/projects/matlib/revdep/checks/MPkn/new/MPkn.Rcheck' | ||
* using R version 3.6.3 (2020-02-29) | ||
* using platform: x86_64-w64-mingw32 (64-bit) | ||
* using session charset: ISO8859-1 | ||
* using options '--no-manual --no-build-vignettes' | ||
* checking for file 'MPkn/DESCRIPTION' ... OK | ||
* checking extension type ... Package | ||
* this is package 'MPkn' version '0.1.0' | ||
* package encoding: UTF-8 | ||
* checking package namespace information ... OK | ||
* checking package dependencies ... NOTE | ||
Package suggested but not available for checking: 'markovchain' | ||
* checking if this is a source package ... OK | ||
* checking if there is a namespace ... OK | ||
* checking for executable files ... OK | ||
* checking for hidden files and directories ... OK | ||
* checking for portable file names ... OK | ||
* checking whether package 'MPkn' can be installed ... OK | ||
* checking installed package size ... OK | ||
* checking package directory ... OK | ||
* checking 'build' directory ... OK | ||
* checking DESCRIPTION meta-information ... OK | ||
* checking top-level files ... OK | ||
* checking for left-over files ... OK | ||
* checking index information ... OK | ||
* checking package subdirectories ... OK | ||
* checking R files for non-ASCII characters ... OK | ||
* checking R files for syntax errors ... OK | ||
* checking whether the package can be loaded ... OK | ||
* checking whether the package can be loaded with stated dependencies ... OK | ||
* checking whether the package can be unloaded cleanly ... OK | ||
* checking whether the namespace can be loaded with stated dependencies ... OK | ||
* checking whether the namespace can be unloaded cleanly ... OK | ||
* checking loading without being on the library search path ... OK | ||
* checking dependencies in R code ... OK | ||
* checking S3 generic/method consistency ... OK | ||
* checking replacement functions ... OK | ||
* checking foreign function calls ... OK | ||
* checking R code for possible problems ... OK | ||
* checking Rd files ... OK | ||
* checking Rd metadata ... OK | ||
* checking Rd cross-references ... OK | ||
* checking for missing documentation entries ... OK | ||
* checking for code/documentation mismatches ... OK | ||
* checking Rd \usage sections ... OK | ||
* checking Rd contents ... OK | ||
* checking for unstated dependencies in examples ... OK | ||
* checking sizes of PDF files under 'inst/doc' ... OK | ||
* checking installed files from 'inst/doc' ... OK | ||
* checking files in 'vignettes' ... OK | ||
* checking examples ... ERROR | ||
Running examples in 'MPkn-Ex.R' failed | ||
The error most likely occurred in: | ||
|
||
> ### Name: MPkn-package | ||
> ### Title: Calculations of One Discrete Model in Several Time Steps | ||
> ### Aliases: MPkn-package | ||
> | ||
> ### ** Examples | ||
> | ||
> require(MPkn) | ||
> require(markovchain) | ||
Loading required package: markovchain | ||
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : | ||
there is no package called 'markovchain' | ||
> options(digits = 14) | ||
> n = 12 | ||
> k = 2 | ||
> rz = 11 | ||
> P = array(0, c(rz, rz)) | ||
> for (i in 1:rz){ | ||
+ po = runif(rz) | ||
+ P[i, ] = po/sum(po) | ||
+ } | ||
> I = diag(1, rz, rz) | ||
> Myy = MUPkL(P, P, I, n, k, c(1:rz)) | ||
> StSy = NULL | ||
> for (i in 1:rz) StSy = c(StSy, Myy$Navg[,,i][n]) | ||
> mrkv = new("markovchain", transitionMatrix = P) | ||
Error in getClass(Class, where = topenv(parent.frame())) : | ||
"markovchain" is not a defined class | ||
Calls: new -> getClass | ||
Execution halted | ||
* checking for unstated dependencies in vignettes ... OK | ||
* checking package vignettes in 'inst/doc' ... OK | ||
* checking running R code from vignettes ... NONE | ||
'Fundament.Rmd'using 'UTF-8'... OK | ||
* checking re-building of vignette outputs ... SKIPPED | ||
* DONE | ||
Status: 1 ERROR, 1 NOTE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
* installing *source* package 'MPkn' ... | ||
** package 'MPkn' successfully unpacked and MD5 sums checked | ||
** using staged installation | ||
** R | ||
** inst | ||
** byte-compile and prepare package for lazy loading | ||
** help | ||
*** installing help indices | ||
** building package indices | ||
** installing vignettes | ||
** testing if installed package can be loaded from temporary location | ||
** testing if installed package can be loaded from final location | ||
** testing if installed package keeps a record of temporary installation path | ||
* DONE (MPkn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
pkgname <- "MPkn" | ||
source(file.path(R.home("share"), "R", "examples-header.R")) | ||
options(warn = 1) | ||
options(pager = "console") | ||
library('MPkn') | ||
|
||
base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') | ||
base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') | ||
cleanEx() | ||
nameEx("MPKlMatrix") | ||
### * MPKlMatrix | ||
|
||
flush(stderr()); flush(stdout()) | ||
|
||
### Name: MPKlMatrix | ||
### Title: Creates a matrix of specified row of output 'MUPkLo' | ||
### Aliases: MPKlMatrix | ||
### Keywords: MPKlMatrix | ||
|
||
### ** Examples | ||
|
||
A <- array(c(0.9, 0.6, 0.8, 0.05, 0.2, 0.05, 0.05, 0.2, 0.15), c(3, 3)) | ||
P <- array(c(0.9, 0.6, 0.8, 0.05, 0.2, 0.05, 0.05, 0.2, 0.15), c(3, 3)) | ||
U <- array(c(0.8, 0.8, 0.7, 0.06, 0.02, 0.2, 0.14, 0.18, 0.1), c(3, 3)) | ||
sta <- c(1, 2, 3) | ||
k <- c(1, 0, 1, 0) | ||
n <- c(5, 7, 12, 17) | ||
Mx <- MUPkLo(A, P, U, n, k, sta) | ||
M100 = MPKlMatrix(Mx, step = 100, nc = 3, sta = c(1, 2, 3)) | ||
|
||
|
||
|
||
cleanEx() | ||
nameEx("MPkn-package") | ||
### * MPkn-package | ||
|
||
flush(stderr()); flush(stdout()) | ||
|
||
### Name: MPkn-package | ||
### Title: Calculations of One Discrete Model in Several Time Steps | ||
### Aliases: MPkn-package | ||
|
||
### ** Examples | ||
|
||
require(MPkn) | ||
require(markovchain) | ||
options(digits = 14) | ||
n = 12 | ||
k = 2 | ||
rz = 11 | ||
P = array(0, c(rz, rz)) | ||
for (i in 1:rz){ | ||
po = runif(rz) | ||
P[i, ] = po/sum(po) | ||
} | ||
I = diag(1, rz, rz) | ||
Myy = MUPkL(P, P, I, n, k, c(1:rz)) | ||
StSy = NULL | ||
for (i in 1:rz) StSy = c(StSy, Myy$Navg[,,i][n]) | ||
mrkv = new("markovchain", transitionMatrix = P) | ||
StSx = steadyStates(mrkv) | ||
print("MPkn"); print(StSy) | ||
print("markovchain"); print(StSx) | ||
|
||
|
||
|
||
|
||
cleanEx() | ||
nameEx("MUPkL") | ||
### * MUPkL | ||
|
||
flush(stderr()); flush(stdout()) | ||
|
||
### Name: MUPkL | ||
### Title: Calculations of one discrete model in several time steps | ||
### Aliases: MUPkL | ||
### Keywords: MUPkL | ||
|
||
### ** Examples | ||
|
||
A <- array(c(2, 3, 1, 4, 2, 1, 3, 1, 2), c(3, 3)) | ||
P <- array(c(0.9, 0.6, 0.8, 0.05, 0.2, 0.05, 0.05, 0.2, 0.15), | ||
c(3, 3)) | ||
U <- array(c(0.8, 0.8, 0.7, 0.06, 0.02, 0.2, 0.14, 0.18, 0.1), | ||
c(3, 3)) | ||
sta <- c(1, 3) | ||
k <- 3 | ||
n <- 8 | ||
M33 <- MUPkL(A, P, U, n, k, sta) | ||
print(M33$N) | ||
k <- 1 | ||
n <- 24 | ||
M11 <- MUPkL(A, P, U, n, k, sta) | ||
print(M11$N) | ||
k <- 0 | ||
n <- 6 | ||
M00 <- MUPkL(A, P, U, n, k, sta) | ||
print(M00$N) | ||
|
||
|
||
|
||
cleanEx() | ||
nameEx("MUPkLo") | ||
### * MUPkLo | ||
|
||
flush(stderr()); flush(stdout()) | ||
|
||
### Name: MUPkLo | ||
### Title: Calculations of one discrete model in several time steps | ||
### Aliases: MUPkLo | ||
### Keywords: MUPkLo | ||
|
||
### ** Examples | ||
|
||
A = array(c(-2, -3, 1, 4, -2, 1, 3, -1, -2), c(3, 3)) | ||
P <- array(c(0.9, 0.6, 0.8, 0.05, 0.2, 0.05, 0.05, 0.2, 0.15), c(3, 3)) | ||
U <- array(c(0.8, 0.8, 0.7, 0.06, 0.02, 0.2, 0.14, 0.18, 0.1), c(3, 3)) | ||
sta <- 3 | ||
Ao <- A | ||
k <- c(1, 0, 1, 0) | ||
n <- c(5, 7, 12, 17) | ||
# Steps, in which will compute the value of the Mx: | ||
# 1, 2, 3, 4, 5, 10, 20, 21, 22, 23, 24, 25, 50, 100, 200, 400, 800 | ||
Mx <- MUPkLo(A, P, U, n, k, sta) | ||
print(Mx) | ||
A <- Ao | ||
Mb <- MUPkLo(A, P, U, n = 100, k = 1, sta) | ||
Mb[100,,] | ||
|
||
|
||
|
||
cleanEx() | ||
nameEx("matrix.powerni") | ||
### * matrix.powerni | ||
|
||
flush(stderr()); flush(stdout()) | ||
|
||
### Name: matrix.powerni | ||
### Title: Matrix Power of Non Integer | ||
### Aliases: matrix.powerni | ||
### Keywords: matrix.powerni | ||
|
||
### ** Examples | ||
|
||
require(MPkn) | ||
require(matrixcalc) | ||
matmult <- function(A, B){ | ||
C = matrix(numeric(4), 2, 2) | ||
for (i in 1:2){ | ||
for (j in 1:2){ C[i, j] = sum(A[i, ]*B[, j])} | ||
} | ||
return(C) | ||
} | ||
I = diag(1, 2, 2) | ||
P = matrix(c(0.9, 0.3, 0.1, 0.7), 2, 2) | ||
M1 = P | ||
M2 = matmult((I + P), M1) | ||
M4 = matmult((I + t(matrix.power(P, 2))), M2) | ||
M8 = matmult((I + t(matrix.power(P, 4))), M4) | ||
M16 = matmult((I + t(matrix.power(P, 8))), M8) | ||
## ===================== | ||
Q = list() | ||
Q[[1]] = M1 | ||
Q[[2]] = matmult(M2, matrix.inverse(M1)) - I | ||
Q[[3]] = matrix.powerni(matmult(M4, matrix.inverse(M2)) - I, 1/2) | ||
Q[[4]] = matrix.powerni(matmult(M8, matrix.inverse(M4)) - I, 1/4) | ||
Q[[5]] = matrix.powerni(matmult(M16, matrix.inverse(M8)) - I, 1/8) | ||
print("Q"); print(Q) | ||
S = as.matrix(Q[[1]], 2, 2) | ||
for (i in 2:5){ | ||
S = S + as.matrix(Q[[i]], 2, 2) | ||
} | ||
Qs = S/5 | ||
print("Qs"); print(Qs) | ||
|
||
|
||
|
||
cleanEx() | ||
nameEx("radekW") | ||
### * radekW | ||
|
||
flush(stderr()); flush(stdout()) | ||
|
||
### Name: radekW | ||
### Title: The Numbers of Rows of the Output Matrix | ||
### Aliases: radekW | ||
### Keywords: radekW | ||
|
||
### ** Examples | ||
|
||
radekW(n = c(3, 5, 8, 9, 11), k = c(1, 0, 1, 0, 0)) | ||
|
||
|
||
|
||
### * <FOOTER> | ||
### | ||
cleanEx() | ||
options(digits = 7L) | ||
base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") | ||
grDevices::dev.off() | ||
### | ||
### Local variables: *** | ||
### mode: outline-minor *** | ||
### outline-regexp: "\\(> \\)?### [*]+" *** | ||
### End: *** | ||
quit('no') |
Oops, something went wrong.