Re: [R] !!!function to do the knn!!!

2011-09-02 Thread jiliguala
ths a lot, david. it helps a lot -- View this message in context: http://r.789695.n4.nabble.com/function-to-do-the-knn-tp3781137p3786253.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.e

Re: [R] !!!function to do the knn!!!

2011-09-02 Thread jiliguala
really thxs to David Winsemius.. this websits helps a lot, -- View this message in context: http://r.789695.n4.nabble.com/function-to-do-the-knn-tp3781137p3786251.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] !!!function to do the knn!!!

2011-08-31 Thread jiliguala
help, help ,help!!! -- View this message in context: http://r.789695.n4.nabble.com/function-to-do-the-knn-tp3781137p3781738.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

[R] !!!function to do the knn!!!

2011-08-31 Thread jiliguala
hi, r users i have a problem with KNN. i have 2 datasets, X0 and X1. >dim(X0) >1471*13 dim(X1) >5221*13 and for every instances in the dataset X1, i want to find the nearest neighbour(1nn) in the dataset X0. and i dont have the true classifications of dataset X1. but the function knn() need

[R] to search the tree using the branch and bound mathod!!!

2011-08-16 Thread jiliguala
hi, R users i have encountered a problem, i want to make a clusterring tree, than do the searching through the tree using "branch and bound" method. here is the code to make the tree, thanks for any ideas... d <- dist(data, method = "euclidean") h1 <- hclust(d, method="ward") plot(h1)

[R] search the clusterring tree using the branch and bound mathod!!!

2011-07-30 Thread jiliguala
hi, R users here is my problem, i want to make a clusterring tree, than do the searching through the tree using branch and bound method. the code to make the tree, but i dont know how to do the searching part. thanks for any helping... d <- dist(data, method = "euclidean") h1 <- hclust(d, met

Re: [R] how to get the miminum value in the list

2011-06-19 Thread jiliguala
but in my case, the list is a two-variable list, list[[j]][[i]] when i use lapply(list, min) it appears """Error in FUN(X[[1L]], ...) : invalid 'type' (list) of argument""" thanks -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-the-miminum-value-in-the-list-tp360

Re: [R] automatically generate the output name of my "for" loops

2011-06-19 Thread jiliguala
true, it did work using unlist() funciton, it can be found the minimum value. and for further step, if i want identify the minimum value with the list, which means the minimum value i have found is belonged to which list[[j]][[i]]. i used the codes like this ##which(list1==min(list1))## but

[R] apply kmeans into every level of the tree..

2011-06-19 Thread jiliguala
hi, r users I'm a new r user. i want to apply kmeans into every level of the tree which i built. the codes for clusterring only one level of the tree. # d <- dist(data1, method = "euclidean") h1 <- hclust(d, method="ward") c1 <- cutree(h1, 100) # 100 groups which i want to cluster cd

[R] how to get the miminum value in the list???

2011-06-19 Thread jiliguala
hi, R users here i have one problem, if i wanna get the minimum value in the normal data, i can do this, ## which(data1==min(data1)). but if i want get the minimum value of a list which has two variables ##list1[[j]][[i]]##, i tried the codes like this, but it did not work. ## which(list1

Re: [R] automatically generate the output name of my "for" loops

2011-06-14 Thread jiliguala
thanks, Greg Snow-2. here i hav a question, how can i save the value of a list to a vector or a matrix? say, i have a list (data1) and a vector or a matrix (data2). if i made like this, data2 <- as.vector(data1) it does not change anything, the data2 is still a list. what i want to do is to c

Re: [R] automatically generate the output name of my "for" loops

2011-06-14 Thread jiliguala
hi, im a new in R and this forum, so if there is something disturbing u, im gonna do it better. by the way, where can i see the FAQ 7.21?? thanks.. -- View this message in context: http://r.789695.n4.nabble.com/automatically-generate-the-output-name-of-my-for-loops-tp3592160p3597987.html Sent

Re: [R] automatically generate the output name of my "for" loops

2011-06-13 Thread jiliguala
hi, jholtman its true, the problem was to iniciate the list at the second level. thx a lot -- View this message in context: http://r.789695.n4.nabble.com/automatically-generate-the-output-name-of-my-for-loops-tp3592160p3594397.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] automatically generate the output name of my "for" loops

2011-06-13 Thread jiliguala
hi, really thank u, Petr Pikal problem solved already. but here is another question: for(i in 1:100) data1[[i]] <- rbind(data2[1,], data3[i,]) the codes above are no problem, but now i wnna do two loops like the codes below which have problem(the bold letters): i dont know what should be put

Re: [R] automatically generate the output name of my "for" loops

2011-06-13 Thread jiliguala
really thanks for helping. i just did just like what Petr Pikal said, but it appeared some error like this: There were 50 or more warnings (use warnings() to see the first 50): Warning messages: 1: In group[i] <- which(k1$cluster == i) : number of items to replace is not a multiple of replacem

[R] automatically generate the output name of my "for" loops

2011-06-12 Thread jiliguala
Hello R users, I am new to R and am having difficulty with the output name of my "for" loops. here is the problem: for (i in c(1:100)) { the name of the groups <- which(k1$cluster==i) } how can it automatically generate the name for 100 cluster? what should i put in the bold letter place.