Browse code

minor text edits to documentation

Gavin Rhys Lloyd authored on 27/06/2024 13:06:21
Showing 1 changed files
... ...
@@ -56,7 +56,7 @@ M = model_apply(M,D)
56 56
 
57 57
 }
58 58
 \references{
59
-R Core Team (2023). \emph{R: A Language and Environment for Statistical
59
+R Core Team (2024). \emph{R: A Language and Environment for Statistical
60 60
 Computing}. R Foundation for Statistical Computing, Vienna, Austria.
61 61
 \url{https://www.R-project.org/}.
62 62
 }
Browse code

rebuild documentation

- due to changes in struct (removal of unicode)

Gavin Rhys Lloyd authored on 02/02/2024 10:50:50
Showing 1 changed files
... ...
@@ -40,7 +40,7 @@ This object makes use of functionality from the following packages:\itemize{  \i
40 40
 \section{Inheritance}{
41 41
 
42 42
 A \code{HCA} object inherits the following \code{struct} classes: \cr\cr
43
-\code{HCA()} ⭢ \code{model()} ⭢ \code{struct_class()}
43
+\verb{[HCA]} >> \verb{[model]} >> \verb{[struct_class]}
44 44
 }
45 45
 
46 46
 \examples{
Browse code

update documentation

- get_description moved to struct and updated

Gavin Rhys Lloyd authored on 31/01/2024 09:48:31
Showing 1 changed files
... ...
@@ -13,11 +13,11 @@ HCA(
13 13
 )
14 14
 }
15 15
 \arguments{
16
-\item{dist_method}{(character) Distance measure. Allowed values are limited to the following: \itemize{\item{\code{"euclidean"}: The euclidean distance (2 norm).}\item{\code{"maximum"}: The maximum distance.}\item{\code{"manhattan"}: The absolute distance (1 norm).}\item{\code{"canberra"}: A weighted version of the mahattan distance.}\item{\code{"minkowski"}: A generalisation of manhattan and euclidean distance to nth norm.}} The default is \code{"euclidean"}.}
16
+\item{dist_method}{(character) Distance measure. Allowed values are limited to the following: \itemize{ \item{\code{"euclidean"}: The euclidean distance (2 norm).}\item{\code{"maximum"}: The maximum distance.}\item{\code{"manhattan"}: The absolute distance (1 norm).}\item{\code{"canberra"}: A weighted version of the mahattan distance.}\item{\code{"minkowski"}: A generalisation of manhattan and euclidean distance to nth norm.}} The default is \code{"euclidean"}.}
17 17
 
18
-\item{cluster_method}{(character) Agglomeration method. Allowed values are limited to the following: \itemize{\item{\code{"ward.D"}: Ward clustering.}\item{\code{"ward.D2"}: Ward clustering using sqaured distances.}\item{\code{"single"}: Single linkage.}\item{\code{"complete"}: Complete linkage.}\item{\code{"average"}: Average linkage (UPGMA).}\item{\code{"mcquitty"}: McQuitty linkage (WPGMA).}\item{\code{"median"}: Median linkage (WPGMC).}\item{\code{"centroid"}: Centroid linkage (UPGMC).}} The default is \code{"complete"}.}
18
+\item{cluster_method}{(character) Agglomeration method. Allowed values are limited to the following: \itemize{ \item{\code{"ward.D"}: Ward clustering.}\item{\code{"ward.D2"}: Ward clustering using sqaured distances.}\item{\code{"single"}: Single linkage.}\item{\code{"complete"}: Complete linkage.}\item{\code{"average"}: Average linkage (UPGMA).}\item{\code{"mcquitty"}: McQuitty linkage (WPGMA).}\item{\code{"median"}: Median linkage (WPGMC).}\item{\code{"centroid"}: Centroid linkage (UPGMC).}} The default is \code{"complete"}.}
19 19
 
20
-\item{minkowski_power}{(numeric)  The default is \code{2}.}
20
+\item{minkowski_power}{(numeric)  The default is \code{2}.\cr}
21 21
 
22 22
 \item{factor_name}{(character) The name of a sample-meta column to use.}
23 23
 
... ...
@@ -35,9 +35,21 @@ A  \code{HCA} object with the following \code{output} slots:
35 35
 Hierarchical Cluster Analysis is a numerical technique that uses agglomerative clustering to identify clusters or groupings of samples.
36 36
 }
37 37
 \details{
38
-This object makes use of functionality from the following packages:\itemize{\item{\code{stats}}}
38
+This object makes use of functionality from the following packages:\itemize{  \item{\code{stats}}}
39 39
 }
40
+\section{Inheritance}{
41
+
42
+A \code{HCA} object inherits the following \code{struct} classes: \cr\cr
43
+\code{HCA()} ⭢ \code{model()} ⭢ \code{struct_class()}
44
+}
45
+
40 46
 \examples{
47
+M = HCA(
48
+      dist_method = "euclidean",
49
+      cluster_method = "complete",
50
+      minkowski_power = numeric(0),
51
+      factor_name = "V1")
52
+
41 53
 D = iris_DatasetExperiment()
42 54
 M = HCA(factor_name='Species')
43 55
 M = model_apply(M,D)
Browse code

fix documentation

due to roxygen no longer needing % to be escaped.
- add markdown flag to description file
- use text format for citations (includes markdown)
- remove % from descriptions (doesnt work with current implementation)

Gavin Rhys Lloyd authored on 06/07/2023 15:19:12
Showing 1 changed files
... ...
@@ -44,8 +44,7 @@ M = model_apply(M,D)
44 44
 
45 45
 }
46 46
 \references{
47
-R Core Team (2022).
48
-\emph{R: A Language and Environment for Statistical Computing}.
49
-R Foundation for Statistical Computing, Vienna, Austria.
47
+R Core Team (2023). \emph{R: A Language and Environment for Statistical
48
+Computing}. R Foundation for Statistical Computing, Vienna, Austria.
50 49
 \url{https://www.R-project.org/}.
51 50
 }
Browse code

update documentation

Gavin Rhys Lloyd authored on 23/01/2023 10:57:52
Showing 1 changed files
... ...
@@ -44,7 +44,7 @@ M = model_apply(M,D)
44 44
 
45 45
 }
46 46
 \references{
47
-R Core Team (2021).
47
+R Core Team (2022).
48 48
 \emph{R: A Language and Environment for Statistical Computing}.
49 49
 R Foundation for Statistical Computing, Vienna, Austria.
50 50
 \url{https://www.R-project.org/}.
Browse code

add outputs to auto generated documentation (#58)

Gavin Rhys Lloyd authored on 07/07/2021 09:37:19 • GitHub committed on 07/07/2021 09:37:19
Showing 1 changed files
... ...
@@ -24,7 +24,12 @@ HCA(
24 24
 \item{...}{Additional slots and values passed to \code{struct_class}.}
25 25
 }
26 26
 \value{
27
-A  \code{HCA} object.
27
+A  \code{HCA} object with the following \code{output} slots:
28
+\tabular{ll}{
29
+\code{dist_matrix} \tab          (dist) An object containing pairwise distance information between samples. \cr
30
+\code{hclust} \tab          (hclust) An object of class hclust which describes the tree produced by the clustering process. \cr
31
+\code{factor_df} \tab          (data.frame)  \cr
32
+}
28 33
 }
29 34
 \description{
30 35
 Hierarchical Cluster Analysis is a numerical technique that uses agglomerative clustering to identify clusters or groupings of samples.
Browse code

update documentation

Gavin Rhys Lloyd authored on 30/03/2021 14:16:49
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ M = model_apply(M,D)
39 39
 
40 40
 }
41 41
 \references{
42
-R Core Team (2020).
42
+R Core Team (2021).
43 43
 \emph{R: A Language and Environment for Statistical Computing}.
44 44
 R Foundation for Statistical Computing, Vienna, Austria.
45 45
 \url{https://www.R-project.org/}.
Browse code

Release 3 12 candidate (#32)

* fix base=10 regardless of input (see #15)

class constructor was always setting base to 10 instead of the input value

* merge bug fix 1.01 into dev (#19)

* bug fix issue #7

Correctly re-order the sample_meta column for colouring samples in the dendrogram plot

* version bump

bug fix issue #7

* fix for https://github.com/computational-metabolomics/structToolbox/issues/18 (#20)

correctly reorder the factor labels so that the control group always ends up in the denominator for the fold change calculation.

* fix for https://github.com/computational-metabolomics/structToolbox/issues/18

fixed incorrect length check on matching class labels.

* Issue 17 ttest factor (#21)

* convert to factor if not one already

fix for issue #17

* update roxygen version

* fix for issue #9 (#22)

changed from lapply to vapply and used drop=FALSE to ensure compatibility with a single factor.

* allow user to set lambda (#24)

- lambda changed to input parameter. NULL = uses pmp optimisation
- model_predict now uses the set value of lambda, or lambda_opt if used.
- documentation updated

* Feature non parametric fold change (#26)

* add "median" method

based on DOI: 10.1080/00949650212140 can now calcuate fold changes equivalent to using medians and corresponding confidence intervals

* update documentation

* update median method

now correctly calculates ratio of medians

* use wilcox for paired median intervals

make use of wilcox.test to estimate intervals for the median when using median for paired samples

* Issue 23 filter by name (#27)

* fix for #23

moved all model_apply functionality to model_predict so that model_train and model_predict can be used as well as model_apply

* update documentation

* Update mean_of_medians.R (#29)

fix for #28
- correctly loop over all levels in the named factor

* Feature documentation 3 12 (#31)

* update documentation

Description and inputs now pulled from the object definitions for consistency.

* fix definition of label_features

allows NULL and description updated

* replace non ascii characters

* export mixed_effect object

* use correct object name to generate documentation

* export mixed_effect object

* remove non ascii characters

* update tests with new object name

* add import for capture.output

* add import for capture.output

* use pca_biplot in tests

chart was renamed

* add utils import

* update struct dependency version

* update documentation

* update news, version bump

Gavin Rhys Lloyd authored on 25/10/2020 08:50:13 • GitHub committed on 25/10/2020 08:50:13
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 % Please edit documentation in R/hca_class.R
3 3
 \name{HCA}
4 4
 \alias{HCA}
5
-\title{HCA method class}
5
+\title{Hierarchical Cluster Analysis}
6 6
 \usage{
7 7
 HCA(
8 8
   dist_method = "euclidean",
... ...
@@ -13,25 +13,24 @@ HCA(
13 13
 )
14 14
 }
15 15
 \arguments{
16
-\item{dist_method}{The distance method to use for clustering. Can be any one of
17
-"euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Default
18
-is "euclidean".}
16
+\item{dist_method}{(character) Distance measure. Allowed values are limited to the following: \itemize{\item{\code{"euclidean"}: The euclidean distance (2 norm).}\item{\code{"maximum"}: The maximum distance.}\item{\code{"manhattan"}: The absolute distance (1 norm).}\item{\code{"canberra"}: A weighted version of the mahattan distance.}\item{\code{"minkowski"}: A generalisation of manhattan and euclidean distance to nth norm.}} The default is \code{"euclidean"}.}
19 17
 
20
-\item{cluster_method}{The clustering method to use. Can be any one of "ward.D",
21
-"ward.D2", "single", "complete", "average", "mcquitty", "median" or "centroid".
22
-Default is 'complete'.}
18
+\item{cluster_method}{(character) Agglomeration method. Allowed values are limited to the following: \itemize{\item{\code{"ward.D"}: Ward clustering.}\item{\code{"ward.D2"}: Ward clustering using sqaured distances.}\item{\code{"single"}: Single linkage.}\item{\code{"complete"}: Complete linkage.}\item{\code{"average"}: Average linkage (UPGMA).}\item{\code{"mcquitty"}: McQuitty linkage (WPGMA).}\item{\code{"median"}: Median linkage (WPGMC).}\item{\code{"centroid"}: Centroid linkage (UPGMC).}} The default is \code{"complete"}.}
23 19
 
24
-\item{minkowski_power}{This parameter is only used when \code{dist_method = 'minkowski'}.}
20
+\item{minkowski_power}{(numeric)  The default is \code{2}.}
25 21
 
26
-\item{factor_name}{The sample_meta column to use.}
22
+\item{factor_name}{(character) The name of a sample-meta column to use.}
27 23
 
28
-\item{...}{additional slots and values passed to struct_class}
24
+\item{...}{Additional slots and values passed to \code{struct_class}.}
29 25
 }
30 26
 \value{
31
-struct object
27
+A  \code{HCA} object.
32 28
 }
33 29
 \description{
34
-HCA method class. Calculate a hierarchical clustering for the input data.
30
+Hierarchical Cluster Analysis is a numerical technique that uses agglomerative clustering to identify clusters or groupings of samples.
31
+}
32
+\details{
33
+This object makes use of functionality from the following packages:\itemize{\item{\code{stats}}}
35 34
 }
36 35
 \examples{
37 36
 D = iris_DatasetExperiment()
... ...
@@ -39,3 +38,9 @@ M = HCA(factor_name='Species')
39 38
 M = model_apply(M,D)
40 39
 
41 40
 }
41
+\references{
42
+R Core Team (2020).
43
+\emph{R: A Language and Environment for Statistical Computing}.
44
+R Foundation for Statistical Computing, Vienna, Austria.
45
+\url{https://www.R-project.org/}.
46
+}
Browse code

fix/update examples

Gavin Rhys Lloyd authored on 07/02/2020 17:02:22
Showing 1 changed files
... ...
@@ -34,5 +34,8 @@ struct object
34 34
 HCA method class. Calculate a hierarchical clustering for the input data.
35 35
 }
36 36
 \examples{
37
-M = HCA()
37
+D = iris_DatasetExperiment()
38
+M = HCA(factor_name='Species')
39
+M = model_apply(M,D)
40
+
38 41
 }
Browse code

update to use new struct class constructors

Gavin Rhys Lloyd authored on 06/02/2020 13:51:52
Showing 1 changed files
... ...
@@ -4,16 +4,34 @@
4 4
 \alias{HCA}
5 5
 \title{HCA method class}
6 6
 \usage{
7
-HCA(...)
7
+HCA(
8
+  dist_method = "euclidean",
9
+  cluster_method = "complete",
10
+  minkowski_power = 2,
11
+  factor_name,
12
+  ...
13
+)
8 14
 }
9 15
 \arguments{
16
+\item{dist_method}{The distance method to use for clustering. Can be any one of
17
+"euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Default
18
+is "euclidean".}
19
+
20
+\item{cluster_method}{The clustering method to use. Can be any one of "ward.D",
21
+"ward.D2", "single", "complete", "average", "mcquitty", "median" or "centroid".
22
+Default is 'complete'.}
23
+
24
+\item{minkowski_power}{This parameter is only used when \code{dist_method = 'minkowski'}.}
25
+
26
+\item{factor_name}{The sample_meta column to use.}
27
+
10 28
 \item{...}{additional slots and values passed to struct_class}
11 29
 }
12 30
 \value{
13 31
 struct object
14 32
 }
15 33
 \description{
16
-HCA method class. Calculate a hierarchical clustering for the input data
34
+HCA method class. Calculate a hierarchical clustering for the input data.
17 35
 }
18 36
 \examples{
19 37
 M = HCA()
Browse code

incremental changes to use struct class constructors

Gavin Rhys Lloyd authored on 04/02/2020 17:18:11
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@
7 7
 HCA(...)
8 8
 }
9 9
 \arguments{
10
-\item{...}{slots and values for the new object}
10
+\item{...}{additional slots and values passed to struct_class}
11 11
 }
12 12
 \value{
13 13
 struct object
Browse code

add @return to documentation

Gavin Rhys Lloyd authored on 19/12/2019 15:14:02
Showing 1 changed files
... ...
@@ -9,6 +9,9 @@ HCA(...)
9 9
 \arguments{
10 10
 \item{...}{slots and values for the new object}
11 11
 }
12
+\value{
13
+struct object
14
+}
12 15
 \description{
13 16
 HCA method class. Calculate a hierarchical clustering for the input data
14 17
 }
Browse code

fix broken tests and...

...update some documentation

Gavin Rhys Lloyd authored on 17/12/2019 17:24:38
Showing 1 changed files
... ...
@@ -6,6 +6,9 @@
6 6
 \usage{
7 7
 HCA(...)
8 8
 }
9
+\arguments{
10
+\item{...}{slots and values for the new object}
11
+}
9 12
 \description{
10 13
 HCA method class. Calculate a hierarchical clustering for the input data
11 14
 }
Browse code

use class contructors and...

...rename all function with dot to underscore
replace dataset with DatasetExperiment

Gavin Rhys Lloyd authored on 17/12/2019 15:48:01
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,14 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/hca_class.R
3
+\name{HCA}
4
+\alias{HCA}
5
+\title{HCA method class}
6
+\usage{
7
+HCA(...)
8
+}
9
+\description{
10
+HCA method class. Calculate a hierarchical clustering for the input data
11
+}
12
+\examples{
13
+M = HCA()
14
+}