FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
R-Code/dendrogram.R at main · PythonCoderUnicorn/R-Code · GitHub
PythonCoderUnicorn
/
R-Code
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
R-Code
/
dendrogram.R
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (23 loc) · 729 Bytes
Breadcrumbs
R-Code
/
dendrogram.R
Copy path
File metadata and controls
50 lines (23 loc) · 729 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#
DENDROGRAM
#
REQUIREMENTS
#
dataframe - individuals in row, features in column
#
dist() - computes distance between sample
#
hclust() - hierarchical clustering
#
plot() -
library(
tidyverse
)
#
basic dendrogram
vorta
=
matrix
( sample(seq(
1
,
2000
),
200
),
ncol
=
10
)
rownames(
vorta
)
=
paste0(
"
clone_
"
, seq(
1
,
20
))
colnames(
vorta
)
=
paste0(
"
iteration_
"
, seq(
1
,
10
))
vorta
%
>
% view()
dist
=
dist(
vorta
[ , c(
4
:
8
)],
diag
=
T
)
dist
h_clust
=
hclust(
dist
)
plot(
h_clust
,
main
=
"
Dominion Vorta Cloning Hierarchical Clustering
"
)
dend
=
mtcars
%
>
%
select(
mpg
,
cyl
,
disp
) %
>
%
dist() %
>
%
hclust() %
>
%
as.dendrogram()
par(
mar
=
c(
7
,
3
,
1
,
1
))
#
Increase bottom margin to have the complete label
plot(
dend
)
Back
|
FazBrowse Home
|
New Git URL