Skip to content

Commit

Permalink
Updated vignette link
Browse files Browse the repository at this point in the history
  • Loading branch information
gforge committed Nov 19, 2022
1 parent 38d8e92 commit 40294f2
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 65 deletions.
63 changes: 31 additions & 32 deletions inst/examples/getSvdMostInfluential_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ org_par <- par(ask = TRUE)
set.seed(1345)
# Simulate data with a pattern
dataMatrix <- matrix(rnorm(15 * 160), ncol = 15)
colnames(dataMatrix) <-
c(
colnames(dataMatrix) <- c(
paste("Pos.3:", 1:3, sep = " #"),
paste("Neg.Decr:", 4:6, sep = " #"),
paste("No pattern:", 7:8, sep = " #"),
paste("Pos.Incr:", 9:11, sep = " #"),
paste("No pattern:", 12:15, sep = " #")
)
paste("No pattern:", 12:15, sep = " #"))

for (i in 1:nrow(dataMatrix)) {
# flip a coin
coinFlip1 <- rbinom(1, size = 1, prob = 0.5)
Expand Down Expand Up @@ -47,43 +46,43 @@ key <- simpleKey(
key$rectangles$col <- b_clr

b1 <- barchart(as.table(svd_out$v[, 1]),
main = "First column",
horizontal = FALSE, col = ifelse(svd_out$v[, 1] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
main = "First column",
horizontal = FALSE, col = ifelse(svd_out$v[, 1] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
)

b2 <- barchart(as.table(svd_out$v[, 2]),
main = "Second column",
horizontal = FALSE, col = ifelse(svd_out$v[, 2] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
main = "Second column",
horizontal = FALSE, col = ifelse(svd_out$v[, 2] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
)

b3 <- barchart(as.table(svd_out$v[, 3]),
main = "Third column",
horizontal = FALSE, col = ifelse(svd_out$v[, 3] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
main = "Third column",
horizontal = FALSE, col = ifelse(svd_out$v[, 3] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
)

b4 <- barchart(as.table(svd_out$v[, 4]),
main = "Fourth column",
horizontal = FALSE, col = ifelse(svd_out$v[, 4] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
main = "Fourth column",
horizontal = FALSE, col = ifelse(svd_out$v[, 4] > 0,
b_clr[1], b_clr[2]
),
ylab = "Impact value",
scales = list(x = list(rot = 55, labels = colnames(dataMatrix), cex = 1.1)),
key = key
)

# Note that the fourth has the no pattern columns as the
Expand Down
63 changes: 31 additions & 32 deletions man/getSvdMostInfluential.Rd

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

2 changes: 1 addition & 1 deletion vignettes/Descriptives.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mtcars %>%
P-values
========

Event though p-values are discouraged in the Table 1, they are [not uncommon](https://journals.sagepub.com/doi/full/10.1177/1741826711421688). I have therefore added basic statistics consisting that defaults to Fisher's exact test for proportions and Wilcoxon rank sum test for continuous values.
Event though p-values are discouraged in the Table 1, they are [not uncommon](https://doi.org/10.1177/1741826711421688). I have therefore added basic statistics consisting that defaults to Fisher's exact test for proportions and Wilcoxon rank sum test for continuous values.

```{r, warning=FALSE}
mtcars %>%
Expand Down

0 comments on commit 40294f2

Please sign in to comment.