[R] Formatted Data File Question for Clustering -Quickie Project

Vladimir Eremeev wl2776 at gmail.com
Thu Jun 14 09:41:41 CEST 2007


The "R Data Import/Export" guide was mentioned already, it contains
everything you should know about data exchange between R and other software.

In case it says nothing about dates, try as.Date() and strftime().
For your example below,
  as.Date("1/31/1994",format="%m/%d/%Y")
works.


ngottlieb wrote:
> 
> I am trying to learn how to format Ascii data files for scan or read
> into R.
> 
> Precisely for a quickie project, I found some code (at end of this
> email) to do exactly what I need:
> To cluster and graph a dendrogram from package (stats).
> 
> I am stuck on how to format a text file to run the script.
> I looked at the dataset USArrests (which would be replaced by my data
> and labels) using UltraEdit. That data appears to be in binary format
> and I would simply like a readable ASCII text file.
> 
> How can I:
> A) format this data to a file for the script below? 
> B) I would like to use squared Euclidean distance, can hclust support
> this?
> 
> Thanks,
> Neil Gottlieb
> 
> Here is sub-set example of my data set, return series to cluster: 13
> cases by 36 observations):
> Month	  Convertible Arbitrage	  Dedicated Short Bias	  Emerging
> Markets	
> 1/31/1994	0.004	-0.016	0.105	
> 2/28/1994	0.002	0.020	-0.011	
> 3/31/1994	-0.010	0.072	-0.046	
> 
> [skip]
> 

-- 
View this message in context: http://www.nabble.com/Formatted-Data-File-Question-for-Clustering--Quickie-Project-tf3915926.html#a11115436
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list