[R] Outer function in R

2013-07-02 Thread Dzu
Dear members I am trying to apply the function kl.dist (Kullback-Leibler Distance measure) to multiple matrixes. I tried the following : veckldist <- Vectorize(kl.dist) distancematrix <- outer (matrix1,matrix2, "veckldist") But the code is complaining that the list of the object does not mat

[R] Bhattacharyya in R

2013-07-01 Thread Dzu
Dear R-user, I am trying to apply bhattacharyya-distance function to my data. Did anybody use it before ? My code is the following #Bhattacharya Distance measure #a and b are vectors a <- (1,2,3,4,2,2,2,2,2,2,2,1,4,5,6,-1,-1,-1,-1,-1,-3,-3,-3) b <- (1.1,1.1,1.2,1.2,1.2,1.2,1.2,2.1,2.1,2.2,2.2,2,

[R] Distance Measurement between probability distributions

2013-07-01 Thread Dzu
Dear R -Users, I wanted to know about some existing functions (despite of euclidiean) to compute the distance between multiple histograms. I have found some examples like "kullbakc -Leibler DIvergenz" but the syntax for this is not available? Does anybody have an idea? Thanks -- View this mess

Re: [R] K-means results understanding!!!

2013-06-24 Thread Dzu
Hi, Thanks for reply but I already read the help page I am new in R and did not understand the output description of kmeans -function. That is why I wanted to ask some experts in the group. My point is that I do not understand which data are combined in the specific cluster? I tried the following

[R] K-means results understanding!!!

2013-06-24 Thread Dzu
"size" > Q3)I would like to understand which raw data are in which cluster ? Does somebody knows how to access the table of raw data which are in the same cluster ? Thanks for help DZU -- View this message in context: http://r.789695.n4.nabble.com/K-means-results-understa

Re: [R] hist function in a for loop

2013-06-18 Thread Dzu
is the for-loop with the histograms computation in the loop and using the binsize I have specified. Maybe now the question is clear! In case somebody has faced a similar problem ,please let me know about tircks, ideas !! I am trying many diffrent thing to let this for loop work but I did not fin

Re: [R] hist function in a for loop

2013-06-18 Thread Dzu
Hello Thanks for reply I want to compute several histograms in a for loop.I am trying to set the binsize constant in the beginning. #compute the histograms for (i in 1:12) { binsize <- -20 :20/2 hist(singlefile$GVC(singlefile$new_id[,i], freq = FALSE,xlab ="Graph i", col = "pink",

[R] hist function in a for loop

2013-06-18 Thread Dzu
Dear all, I need to create a for-loop in which I can compute multiple histograms My code is the following : #singlefile includes huge csv file #I want to specify the binsize #I would like to compute in the for -loop the histograms numfiles <- length(singlefile) for (i in 1 :51) {

[R] Reading multiple csv files with a for loop

2013-06-17 Thread Dzu
Dear R-help users, I am quite new in R. I have multiple csv.files with different size. I would like to read them by using a for- loop and parallel by reading I need to add a new column which can be specified by myself. But my for-loop does not work ! Could somebody give me any idea ? Many thanks!