Skip to content

Commit

Permalink
version 4.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
tpq authored and cran-robot committed Jul 10, 2019
1 parent dcecca5 commit cdef51d
Show file tree
Hide file tree
Showing 27 changed files with 583 additions and 269 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: propr
Title: Calculating Proportionality Between Vectors of Compositional
Data
Version: 4.1.1
Version: 4.1.6
URL: http://github.com/tpq/propr
BugReports: http://github.com/tpq/propr/issues
Authors@R: c(
Expand Down Expand Up @@ -31,12 +31,12 @@ Suggests: ALDEx2, Biobase, cccrm, compositions, data.table, datasets,
SDMTools, testthat, vegan
LinkingTo: Rcpp
NeedsCompilation: yes
Packaged: 2018-11-18 23:46:53 UTC; thom
Packaged: 2019-07-10 04:34:32 UTC; thom
Author: Thomas Quinn [aut, cre],
David Lovell [aut],
Ionas Erb [aut],
Anders Bilgrau [ctb],
Greg Gloor [ctb]
Maintainer: Thomas Quinn <contacttomquinn@gmail.com>
Repository: CRAN
Date/Publication: 2018-11-19 12:20:02 UTC
Date/Publication: 2019-07-10 05:00:03 UTC
50 changes: 26 additions & 24 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
e459d499cb2c743f2864cf4b351c0350 *DESCRIPTION
e89a4a32e58b9e2b3ba5586aac16071f *NAMESPACE
689268f3555256ce77ba58d6a14bc7e2 *NEWS.md
a58a4c675547f1586c305d470741038c *DESCRIPTION
44e572e6c0a8f171ee6899ed60c852f0 *NAMESPACE
707712853d36e755c32428bea9700f75 *NEWS.md
d0fd4cf23278f18b0e55178d3ea85df6 *R/0-params.R
20084dc68a3b58f3791b15a444c94374 *R/1-propr.R
dbe78bef7d84b577c06b81192ea89227 *R/1-propr.R
5089d34f7ceddcf2c2e96c13409e9948 *R/2-proprCall.R
4c07a6715abf529b667a7250b9426e40 *R/3-proprViz.R
53d6ff2ab36d970c2136bbc36b3fbb6b *R/4-propd.R
3e0bd3bdb8e1737a94d97c6aeb508e02 *R/5-propdCall.R
428892dd0607a74dad957f398395573f *R/4-propd.R
ca20236d720211900dcd0814269bc5ef *R/5-propdCall.R
6b2ead4b32dd55250ed07f7970da7bfc *R/6-propdViz.R
3e12e1e1c74fe94094f66cea545589d6 *R/7-aldex2propr.R
38e8765fc47baa4ac1b6e47d7617985e *R/8-get.R
0d23b0b530dc6b24ca79e7c3307414f2 *R/8-get.R
436bcbf13363346f60df78265a49c552 *R/9-deprecated.R
779bc8b2b75ed826d2358fe4ab1d1b0d *R/9-global.R
36e3b5b20243244d591685587e19b69b *R/9-pra.R
4ecc2ccb94e92baadd9ae806e61fa624 *R/RcppExports.R
86d8c92a8ea22f9127776f11717050e9 *R/RcppExports.R
0cb5f68d61c5e90d60547768394e7ab8 *README.md
a9ce63628ecafd0379e96269116f8c13 *build/vignette.rds
0f795b30a5583ddef912ad3ca9f05549 *build/vignette.rds
85afe8e966882d64a79de4ad8f198689 *data/caneToad.counts.rda
73203b36c5c9e855bd52d9beefaf5195 *data/caneToad.groups.rda
f937a82f42500a3aec725965e09b3ac8 *data/datalist
Expand All @@ -28,22 +28,22 @@ ed6a318a02091045e6fd3b1064cd7929 *data/top.lr.rda
214386d4fe680e9fd5f778370bbe1267 *inst/CITATION
661d960e5a0e87abc9b2708cef811b8c *inst/doc/a_introduction.R
13b356f0c37a5215a21c0d32ccbfe8c5 *inst/doc/a_introduction.Rmd
e679fd293c7db759737d2d1b60e07b69 *inst/doc/a_introduction.html
cba6be20cea5a5a4d86ea8d820d4e8db *inst/doc/a_introduction.html
ff426c9901d9521d7a1506156911207a *inst/doc/b_visualization.R
8338f7da4ae675b8053dd2c0adb12e05 *inst/doc/b_visualization.Rmd
a6ac32a48fabf6c3618e8e4d88c56990 *inst/doc/b_visualization.html
0ae6853bf774537eac012ef7fbd5c614 *inst/doc/b_visualization.html
82911dccb62e943e0d63c93d1b7ea0af *inst/doc/d_advanced.R
ba49707d6dbc812c59c47da5b232f8ba *inst/doc/d_advanced.Rmd
73d10583650636539aa24b0f60093b43 *inst/doc/d_advanced.html
3810f583534b5ba648cb1740f285d20f *inst/doc/d_advanced.html
8ef6f7fa152bd982c5857746a92e111e *inst/doc/e_differential.R
29c0446d35b4860cc32a2a27a5a35b0e *inst/doc/e_differential.Rmd
3bb4943870fea1c02d74faf1d397e5be *inst/doc/e_differential.html
904a31af121b42360148bd2396797881 *inst/doc/e_differential.html
b4e9f79735763bf4a61c1e0ebd79728c *inst/doc/f_moderation.R
9520b147409a3c4a92d4c4cb83625b54 *inst/doc/f_moderation.Rmd
312dc7e9562b0c0c9519afa749458ea8 *inst/doc/f_moderation.html
f31f0ada6c397a65eab961980211e126 *inst/doc/f_moderation.html
e3ad967f3610e7ffa4e3a3252fad8fe4 *inst/doc/g_questions.R
e4d96faab6b6070aa12aff451115e357 *inst/doc/g_questions.Rmd
9f918445f2c58dc0b277e84ae181f393 *inst/doc/g_questions.html
221f0d78bf65d1f024cfa7cf231e3d8f *inst/doc/g_questions.html
c58d8af5df962f272ac64090a1db74a5 *man/aldex.cor.Rd
e83d907ff4983e638b01c1abe25dab26 *man/aldex.glm.Rd
c94404bec592ce30a5f70274e487a50e *man/aldex2propr.Rd
Expand All @@ -52,14 +52,15 @@ c94404bec592ce30a5f70274e487a50e *man/aldex2propr.Rd
fcdbf28c33d8ad3f66727b47968d5c87 *man/alphaTheta_old.Rd
28e003a8a265072a168a69d2a14736ea *man/calculateFDR.Rd
ca7c74ff68a1daef20132551a77cbabf *man/calculateFDR_old.Rd
7c1c3ef429a18f1983768a900a950037 *man/calculateTheta.Rd
322344b184c1eaae02464220cc9652de *man/calculateTheta.Rd
9f17b52c1566a993d582dfec9cc0e054 *man/calculateThetaW_old.Rd
b7f65e07db69697cd2635c0fe8eaa352 *man/calculateTheta_old.Rd
164a4f49b5717bee75efba4fda13fa29 *man/caneToad.counts.Rd
b5a683db516b797f5da4257e58f9ea66 *man/caneToad.groups.Rd
bd8828aab70a41d21048d4f0a211599b *man/dendroCheck.Rd
554bd15af798e2792126116e0fcf9679 *man/getAdjacency.Rd
8c0153cede35065472b04a343eda873e *man/getMatrix.Rd
44d6f621cebf38326fbb1262f57d35ff *man/getAdj.Rd
3646c212d58dc6d48bf017b3a1d523a5 *man/getAdjacency.Rd
2da302c0688463043e3aec0727f0de4c *man/getMatrix.Rd
c942bcdef8978b706f34c70306e8e5fb *man/getNetwork.Rd
d4d57fd34a0599bedb080c025f9831db *man/getRatios.Rd
14d3a4db2e72e400b2b9f7ed87457e63 *man/getReference.Rd
Expand All @@ -86,7 +87,7 @@ cb1890cb2af266c0621d097f18f75ca4 *man/permuteTheta_naive.Rd
b064aa001e2f68bc9c0af48331ceda66 *man/progress.Rd
ea8d79d44ece48a36ce68bec53ac29c7 *man/promptCheck.Rd
f21bcb5ad8befdc789954eff3a4b3e28 *man/propd.Rd
cdbe8e473f0b40815f2933e03e387fb7 *man/propr.Rd
dddbee8268a552ea83fe5ad97baa9422 *man/propr.Rd
d1c56c393eb511865d8e000b08c4b618 *man/proprALR.Rd
5e4cab1de9281848136e63da1e9ebd98 *man/proprCLR.Rd
24c7d0c015cba92079ae998cae4291fa *man/proprPairs.Rd
Expand All @@ -95,7 +96,7 @@ e4fa556de63e2d44d21957d6a63c4724 *man/proprPhit.Rd
4bbee917d31bc028633ee3a448ab2a49 *man/proprSym.Rd
e74113bb12a583411a0d6428a5139c16 *man/proprTri.Rd
5c55a8316f4929eaac1541480e4dd9b5 *man/proprVLR.Rd
1ee09e827ddc4fb2e87bd12e55e8b57e *man/qtheta.Rd
e7ed79c9ea8295690def45120757dce9 *man/qtheta.Rd
15ff584e7a89fc9eb6da44d0a6412344 *man/ratios.Rd
5c48d73343cdf3ca94179534849550c5 *man/shale.Rd
718bab977b5a22a76d6eb0e22b1731c9 *man/slate.Rd
Expand All @@ -104,19 +105,20 @@ ab271f0aa7ba9dbb705c6222d9cf5653 *man/top.lr.Rd
e35e2692a61acb2c1d143cc72fe05828 *man/updateCutoffs.Rd
bd975b07470fc9a358c5355998a97583 *man/visualize.Rd
6f42842ad17082a9a54e4dd3f0c2287a *man/wide2long.Rd
a5d78284f14701f20a81938162a0d91c *src/RcppExports.cpp
8c99e4198c3d88c20c8136ffcbc21c7c *src/RcppExports.cpp
fba12b82e88afc0026b7a18037010e40 *src/backend.cpp
58f3b385b2823a4ef94f6aa0caa26903 *src/backend.h
a14156d9f3f773e8a043a64fce798a7b *src/ctzRcpp.cpp
2b9d3ee10265c37f47dd2080a094b1c1 *src/deprecated.cpp
5f7a907ee2f7e4e5606491ce725a4619 *src/lr2propr.cpp
f356448004caec64cdde60e0416ba523 *src/lrm.cpp
cfb30e8074db2268bbb368e729f064a6 *src/lrv.cpp
7c44bd42b9230745a232706537c28210 *src/omega.cpp
35747f42c66aa149db50e4b187e5dc94 *src/omega.cpp
38a416384180a93d31020bdffb37ccee *tests/testthat.R
52a6c9253f0f5d4cad1f11d6b4d35ecb *tests/testthat/test-Fstat.R
7cdb937930516b2bfd611e6a272a1835 *tests/testthat/test-Fstat.R
cac5706ffb5cb340e4eeab7d616514f5 *tests/testthat/test-aldex2propr.R
ac7887ecf849b1f187852d14150379af *tests/testthat/test-backend.R
b2100842ca44549d7856cdfb656333aa *tests/testthat/test-getMatrix.R
f3ab07de6e50fb777ee61bd72c22a20e *tests/testthat/test-getNetwork.R
e8ea9d79a8def306f98c1b93f8addb15 *tests/testthat/test-getRatios.R
9dbd69d7466a4f768aaa432210aa1260 *tests/testthat/test-half2mat.R
Expand All @@ -126,7 +128,7 @@ cbabe120dad75632dc4c8135a2920e57 *tests/testthat/test-lr2propr.R
36c1e4852653ebd81030704d560c4e2b *tests/testthat/test-perb.R
2c5b021d73e71e87715e7dbbfb57ea28 *tests/testthat/test-phis.R
7329ca8ef8bde680bafc57cd14605088 *tests/testthat/test-phit.R
c904db10363ed55674fcb2128e88b20a *tests/testthat/test-propd.R
e3d7fc3856e7c73ecf3fa8354cf2eeaf *tests/testthat/test-propd.R
fee153a618e9faee5adfde6530322eb1 *tests/testthat/test-simplify.R
e8363c9012dd6461c783fe69cddc8f27 *tests/testthat/test-theta.R
13b356f0c37a5215a21c0d32ccbfe8c5 *vignettes/a_introduction.Rmd
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export(aldex2propr)
export(bokeh)
export(bowtie)
export(bucket)
export(calculateTheta)
export(corr)
export(cytescape)
export(decomposed)
export(dendrogram)
export(gemini)
export(getAdj)
export(getAdjacency)
export(getMatrix)
export(getNetwork)
Expand Down
41 changes: 41 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
## propr 4.1.6
---------------------
* Update `propr` methods
* Fix error where `select` is used in presence of zeros
* Update `propd` methods
* All methods now use `N + propd@dfz` degrees-of-freedom
* Omega no longer used for F-statistic by `updateF`
* Omega no longer used for cutoff by `qtheta`

## propr 4.1.5
---------------------
* Update `qtheta` methods
* New `fdr` argument in `qtheta` method returns cutoff for FDR-adjusted p-value
* Remove `moderated` argument from `qtheta` method
* Update `get` methods
* New `getAdj` offers a faster alternative to `getAdjacency`
* Have `getAdjacency` and `getMatrix` set diagonal to 0

## propr 4.1.4
---------------------
* Update `propd` methods
* Return to using N-K degrees-of-freedom for `pf` and `qf` calls
* Have `qtheta` still use Omega (biased) to calculate theta from F-stat

## propr 4.1.3
---------------------
* Update `propd` methods
* Now compute F-stat and F-mod using Omega (biased) for weighted thetas
* Now compute p-value from F-stat and F-mod using Omega (biased) degrees-of-freedom
* Update `qtheta` to use Omega (biased) degrees-of-freedom
* Remove superfluous `calculateTheta` input checks
* Stop export of `calculateTheta` function
* Update C++ backend
* Add `Omega` function to compute population-level pre-factor
* Remove superfluous first argument to `omega` function

## propr 4.1.2
---------------------
* New tests
* Add `getMatrix` test

## propr 4.1.1
---------------------
* New `get` methods
Expand Down
2 changes: 2 additions & 0 deletions R/1-propr.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ propr <- function(counts, metric = c("rho", "phi", "phs", "cor", "vlr"), ivar =
if(!is.vector(select)) stop("Provide 'select' as vector.")
if(is.character(select)) select <- match(select, colnames(counts))
if(any(is.na(select))) stop("Some 'select' not in data.")

counts <- counts[, select]
ct <- ct[, select]
lr <- lr[, select]
}
Expand Down
19 changes: 10 additions & 9 deletions R/4-propd.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,21 @@ setMethod("show", "propd",
propd <- function(counts, group, alpha, p = 100, weighted = FALSE){

# Clean "count matrix"
# if(any(apply(counts, 2, function(x) all(x == 0)))){
# stop("Remove components with all zeros before proceeding.")}
if(any(counts < 0)) stop("Data may not contain negative measurements.")
if(any(is.na(counts))) stop("Remove NAs from 'counts' before proceeding.")
if(class(counts) == "data.frame") counts <- as.matrix(counts)
if(is.null(colnames(counts))) colnames(counts) <- as.character(1:ncol(counts))
if(is.null(rownames(counts))) rownames(counts) <- as.character(1:nrow(counts))
if(missing(alpha)){ alpha <- NA
}else{ if(!is.na(alpha)) if(alpha == 0) alpha <- NA }
ct <- counts

# Clean group
if(length(unique(group)) != 2) stop("Please use exactly two unique groups.")
if(length(group) != nrow(counts)) stop("Too many or too few group labels.")
group <- as.character(group)

# Replace zeros unless alpha is provided
if(missing(alpha)){ alpha <- as.numeric(NA)
}else{ if(!is.na(alpha)) if(alpha == 0) alpha <- as.numeric(NA) }
ct <- counts
if(any(as.matrix(counts) == 0) & is.na(alpha)){
message("Alert: Replacing 0s with next smallest value.")
zeros <- ct == 0
Expand Down Expand Up @@ -132,8 +135,7 @@ propd <- function(counts, group, alpha, p = 100, weighted = FALSE){
# Initialize @counts, @group, @alpha
result@counts <- as.data.frame(ct)
result@group <- as.character(group)
if(!missing(alpha)){ result@alpha <- as.numeric(alpha)
}else{ result@alpha <- as.numeric(NA) }
result@alpha <- as.numeric(alpha)

# Initialize @permutes
result@permutes <- data.frame()
Expand All @@ -151,6 +153,7 @@ propd <- function(counts, group, alpha, p = 100, weighted = FALSE){
weights = result@weights)

# Initialize @results -- Tally frequency of 0 counts
# [note, use `counts` because `ct`` is already zero-replaced]
if(any(as.matrix(counts) == 0)){
message("Alert: Tabulating the presence of 0 counts.")
result@results$Zeros <- ctzRcpp(as.matrix(counts)) # count 0s
Expand All @@ -160,8 +163,6 @@ propd <- function(counts, group, alpha, p = 100, weighted = FALSE){
if(any(result@results$theta > 1)){
message("Alert: Theta rounded to 14 decimal digits.")
result@results$theta <- round(result@results$theta, 14)
result@results$theta_e <- round(result@results$theta_e, 14)
result@results$theta_f <- round(result@results$theta_f, 14)
}

message("Alert: Use 'setActive' to select a theta type.")
Expand Down

0 comments on commit cdef51d

Please sign in to comment.