Skip to content

Commit c4884a3

Browse files
committed
Merge pull request #5 from snoweye/master
0.1-6 to CRAN
2 parents ab39539 + 0e9937a commit c4884a3

File tree

13 files changed

+82
-21
lines changed

13 files changed

+82
-21
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2014-02-02: Ver. 0.1-6
2+
* Add I/O demo to read data and dump clustering results.
3+
14
2013-07-03: Ver. 0.1-6
25
* Move inst/doc/vignettes/ to vignettes/.
36

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Package: pmclust
22
Version: 0.1-6
3-
Date: 2014-01-09
3+
Date: 2014-02-02
44
Title: Parallel Model-Based Clustering
55
Authors@R: c(person("Wei-Chen", "Chen", role = c("aut", "cre"), email =
66
"[email protected]"), person("George", "Ostrouchov", role = "aut"))
7-
Depends: R (>= 3.0.0), methods, rlecuyer, pbdMPI (>= 0.1-7)
7+
Depends: R (>= 3.0.0), methods, rlecuyer, pbdMPI (>= 0.2-2), MASS
88
Enhances: MixSim, pbdSLAP (>= 0.1-7), pbdBASE (>= 0.3-0), pbdDMAT (>=
99
0.2-4)
1010
LazyLoad: yes
@@ -25,7 +25,7 @@ URL: http://r-pbd.org/
2525
BugReports: http://group.r-pbd.org/
2626
MailingList: Please send questions and comments regarding pbdR to
2727
28-
Packaged: 2014-01-10 05:28:26 UTC; snoweye
28+
Packaged: 2014-02-02 22:05:31 UTC; snoweye
2929
Author: Wei-Chen Chen [aut, cre],
3030
George Ostrouchov [aut]
3131
Maintainer: Wei-Chen Chen <[email protected]>

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
useDynLib(pmclust)
22

3-
import(methods, rlecuyer, pbdMPI)
3+
import(methods, rlecuyer, pbdMPI, MASS)
44

55
# exportPattern("^[[:alpha:]]+")
66
# exportPattern("^[\\.]")

demo/00Index

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ gbd_kmeans pmclust An GBD example of K-means algorithm.
1717
iris_dmat pmclust iris example in ddmatrix.
1818
iris_gbdr pmclust iris example in GBD row-major format.
1919

20+
io_csv pmclust An example of simple data input and output.

demo/io_csv.r

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
### Setup environment.
2+
library(pmclust, quietly = TRUE)
3+
comm.set.seed(123, diff = TRUE)
4+
if(comm.size() != 4){
5+
comm.stop("4 processors are needed.")
6+
}
7+
8+
### Generate an example data.
9+
N <- 400
10+
p <- 2
11+
K <- 2
12+
data.spmd <- generate.MixSim(N, p, K, MaxOmega = 0.001)
13+
14+
### Dump fake data to a csv file.
15+
X.df.org <- as.data.frame(cbind(data.spmd$X.spmd, data.spmd$CLASS.spmd))
16+
colnames(X.df.org) <- c(paste("V", 1:p, sep = ""), "ID")
17+
comm.write.csv(X.df.org, file = "toys_org.csv", row.names = FALSE)
18+
19+
### Read data from the csv file.
20+
X.df.new <- comm.read.csv("toys_org.csv")
21+
X.spmd <- as.matrix(X.df.new[, 1:p])
22+
23+
### Run clustering.
24+
PARAM.org <- set.global(K = K) # Set global storages.
25+
PARAM.org <- initial.em(PARAM.org) # One initial.
26+
PARAM.new <- apecma.step(PARAM.org) # Run APECMa.
27+
em.update.class() # Get classification.
28+
29+
### Dump data and clustering results to a new csv file.
30+
X.df.new$ID.est <- .pmclustEnv$CLASS.spmd
31+
comm.write.csv(X.df.new, file = "toys_new.csv", row.names = FALSE)
32+
33+
### Quit.
34+
finalize()
35+

inst/CITATION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ citEntry(
1616
author = personList(as.person("W.-C. Chen"), as.person("G. Ostrouchov")),
1717
year = "2012",
1818
note = "R Vignette, URL http://cran.r-project.org/package=pmclust",
19-
textVersion = "W.-C. Chen, G. Ostrouchov (2012). A Quick Guide for the pmclust Package. R Vignette, URL http://cran.r-project.org/package=pmclust",
19+
textVersion = "W.-C. Chen, G. Ostrouchov (2014). A Quick Guide for the pmclust Package. R Vignette, URL http://cran.r-project.org/package=pmclust",
2020
key = "Chen2012pmclustvignette"
2121
)
2222

inst/doc/pmclust-guide.R

Lines changed: 0 additions & 2 deletions
This file was deleted.

inst/doc/pmclust-guide.Rnw

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
\documentclass[article,shortnames,nojss]{pmclust-include/jss}
44

5-
65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76
%% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -15,9 +14,9 @@ Wei-Chen Chen$^1$ and George Ostrouchov$^{1,2}$
1514
\end{minipage}
1615
\\
1716
\\
18-
$^1$Computer Science and Mathematics Division, \\
19-
Oak Ridge National Laboratory, \\
20-
Oak Ridge, TN, USA \\
17+
$^1$Department of Ecology and Evolutionary Biology, \\
18+
University of Tennessee, \\
19+
Knoxville, TN, USA \\
2120
\\
2221
$^2$Remote Data Analysis and Visualization Center,\\
2322
University of Tennessee, \\

inst/doc/pmclust-guide.pdf

3.52 KB
Binary file not shown.

vignettes/pmclust-guide.Rnw

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
\documentclass[article,shortnames,nojss]{pmclust-include/jss}
44

5-
65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76
%% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -15,9 +14,9 @@ Wei-Chen Chen$^1$ and George Ostrouchov$^{1,2}$
1514
\end{minipage}
1615
\\
1716
\\
18-
$^1$Computer Science and Mathematics Division, \\
19-
Oak Ridge National Laboratory, \\
20-
Oak Ridge, TN, USA \\
17+
$^1$Department of Ecology and Evolutionary Biology, \\
18+
University of Tennessee, \\
19+
Knoxville, TN, USA \\
2120
\\
2221
$^2$Remote Data Analysis and Visualization Center,\\
2322
University of Tennessee, \\

0 commit comments

Comments
 (0)