Skip to content

Commit 75c817e

Browse files
committed
Add examples
1 parent 16b9c8b commit 75c817e

7 files changed

Lines changed: 1691 additions & 14 deletions

File tree

DESCRIPTION

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ Imports: cluster,
3939
Rdpack,
4040
stats,
4141
vegan
42-
Suggests: EvaluateCore,
42+
Suggests: biotools,
43+
dbscan,
44+
EvaluateCore,
45+
fastcluster,
4346
knitr,
4447
pander,
4548
rmarkdown

R/allocate.basic.R

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,39 @@
7474
#' \insertAllCited
7575
#'
7676
#' @examples
77+
#' # Get data
78+
#' data("cassava_EC_gp")
79+
#' data <- cbind(genotypes = rownames(cassava_EC_gp), cassava_EC_gp)
80+
#' row.names(data) <- NULL
81+
#'
82+
#' # Constant allocation
83+
#' const_out <-
84+
#' allocate.basic(data = data, names = "genotypes",
85+
#' group = "Cluster", method = "const",
86+
#' size = 0.2)
87+
#' const_out
88+
#'
89+
#' # Proportional allocation
90+
#' prop_out <-
91+
#' allocate.basic(data = data, names = "genotypes",
92+
#' group = "Cluster", method = "prop",
93+
#' size = 0.2)
94+
#' prop_out
95+
#'
96+
#' # Logarithmic allocation
97+
#' log_out <-
98+
#' allocate.basic(data = data, names = "genotypes",
99+
#' group = "Cluster", method = "log",
100+
#' size = 0.2)
101+
#' log_out
102+
#'
103+
#' # Square root allocation
104+
#' sqrt_out <-
105+
#' allocate.basic(data = data, names = "genotypes",
106+
#' group = "Cluster", method = "sqrt",
107+
#' size = 0.2)
108+
#' sqrt_out
109+
#'
77110
allocate.basic <- function(data,
78111
names, group,
79112
method = c("const", "prop", "log", "sqrt"),

0 commit comments

Comments
 (0)