[R] hclust title and paste - messed up
Gregoire Thomas
gregoire.thomas at ugent.be
Mon Oct 11 14:12:47 CEST 2004
paste(c("a","b","c"),collapse="")
paste("a","b","c",sep="")
On Mon, 2004-10-11 at 13:40, Dan Bolser wrote:
> I use the following code to scan a (limited) parameter space of clustering
> strategies ...
>
> data <- read.table(...
>
> dataTranspose <- t(data)
>
> distMeth <- c("euclidean",
> "maximum",
> "manhattan",
> "canberra",
> "binary"
> )
>
> clustMeth <- c("ward",
> "single",
> "complete",
> "average",
> "mcquitty",
> "median",
> "centroid"
> )
>
> par(ask=TRUE)
>
> for (d in distMeth){
> print(d)
> dt <- dist(dataTranspose,method=d)
> for (m in clustMeth){
> print(m)
> hc <- hclust(dt,method=m)
> plot(hc,
> main=paste(c(
> "Distance Measure", d,
> "Cluster Method", m),sep=" "),
> xlab='',
> sub=''
> )
> }
> }
>
>
> However, my plot title (main) has 4 lines, when I think it should only
> have one line.
>
> What am I doing wrong?
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list