From: <jbd...@ut...> - 2004-07-20 01:48:10
|
hi, i'm trying to do a hierarchical cluster analysis using rpy. i've done it in R by putting my data in a tab-delimited file as follows: hc = hclust(dist(read.delim("/path/to/file.tab", header = TRUE, sep = "\t"), "ave") plot(hc) but when i do it from python using rpy, i get the following error: r.library('mva') hc = r.hclust(r.dist(data), 'ave') RException: Error in if (n < 2) stop("Must have n >= 2 objects to cluster") : argument is of length zero this error happens when i put the data into an R data frame using r.as_data_frame. i've also tried putting the data into a nested list and a nested tuple, in which case i get the following error: rpy.RException: Error in as.double.default(x) : (list) object cannot be coerced to double has anyone gotten hclust to work using rpy? thanks, jason |