[R] error with lhoat() function from the package hydroPSO

2013-05-08 Thread Rui Esteves
Dear all, I just installed the package hydroPSO and when I try to run the example of the lhoat() function I got this error: nparam <- 5 lhoat( fn=sphere, lower=rep(-100,nparam), upper=rep(100,nparam), control=list(N=10, f=0.1, write2disk=TRUE) ) *Error in fn.n

[R] How to "call" an object given a string?

2013-04-29 Thread Rui Esteves
Hello, This is very basic and very frustrating. Suppose this: >A=5 >B=5 >C=10 > ls() "A" "B" "C" I would like this >xpto() 5 5 10 How can I do xpto()? Thanks Rui [[alternative HTML version deleted]] __ R-help@r-project.org mailing list htt

[R] How to use RWeka with Multilayer Perceptron?

2013-03-25 Thread Rui Esteves
Hello, I have a serialized Multilayer Perceptron trained using weka. I would like to use R to re-evaluate the model. How can I do this? I could not find an example of RWeca that applies to Multilayer Perceptron. Thanks, Rui __ R-help@r-project.org mail

[R] RWeka and Back Propagation NN

2013-03-23 Thread Rui Esteves
Hello, I have a trained Back Propagation Neural Network model in weka. I would like to re-evaluate the NN using R with a given input. How can I do this? I could not find an example of RWeca that applies to NN Thanks, Rui __ R-help@r-project.org mailing

[R] Help with

2012-10-18 Thread Rui Esteves
Hi, I downloaded a dataset from UCI repositories named Bag of Words: http://archive.ics.uci.edu/ml/machine-learning-databases/bag-of-words/readme.txt The dataset is in a text file with the following structure: --- docID1 wordID1 count docID1 wordID2 count docID1 wordID3 count docID1 wordID4 cou

[R] Is there any R function for data normalization?

2012-10-02 Thread Rui Esteves
Hello, I have a matrix with values, with columns c1..cn. I need the values to be normalized between 0 and 1 by column. Therefor, the 0 should correspond to the minimum value in the column c1 and 1 should correspond to the maximum value in the column c1. The remaining columns should be organized in

[R] lapply with different size lists?

2012-09-11 Thread Rui Esteves
Hello, I have 2 functions (a and b) a = function(n) { matrix (runif(n*2,0.0,1), n) } > > > b = function (m, matrix) { > n=nrow (matrix) > p=ceiling (n/m) > lapply (1:p, function (l,n,m) { > inf = ((l-1)*m)+1 > if (l

[R] What is tthe meaning of Ncells and Vcells?

2012-06-20 Thread Rui Esteves
Hello, When I do gc() I got this return: > gc() used (Mb) gc trigger (Mb) max used(Mb) Ncells 288952 15.5 968217 51.8 381338927 20365.7 Vcells 57781947 440.9 180578758 1377.8 551082632 4204.5 What does actually means Ncells, Vcells, used and gc trigger? Thanks, Rui

Re: [R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Rui Esteves
problem—a way of avoiding the sometimes poor clusterings found by the standard k-means algorithm. On Wed, Feb 29, 2012 at 11:33 AM, Pascal Oettli wrote: > Dear Rui, > > What "++" means?  There is kmeans in "stats" package. > > Best Regards, > Pascal > >

[R] Does anyone knows a KMeans ++ package for R?

2012-02-29 Thread Rui Esteves
Dear all. I am searching for KMeans ++ for R. I cannot find it. Do you know any package with it? Best regards, Rui __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.o

Re: [R] Error: unexpected '<' in "<" when modifying existing functions

2012-01-14 Thread Rui Esteves
error as if i would just leave out. On Sat, Jan 14, 2012 at 11:50 AM, Duncan Murdoch wrote: > On 12-01-14 3:58 AM, Rui Esteves wrote: >> >> Thank you both. >> >> 1) As Duncan said, if I leave  out, it >> will not work since it is using .C and .Fortran functions that

Re: [R] Error: unexpected '<' in "<" when modifying existing functions

2012-01-14 Thread Rui Esteves
quot;) Rui On Sat, Jan 14, 2012 at 3:22 AM, Duncan Murdoch wrote: > On 12-01-13 8:05 PM, Peter Langfelder wrote: >> >> On Fri, Jan 13, 2012 at 4:57 PM, Rui Esteves  wrote: >>> >>> Hi. >>> I am trying to modify kmeans function. >>> It seems that is

[R] Error: unexpected '<' in "<" when modifying existing functions

2012-01-13 Thread Rui Esteves
Hi. I am trying to modify kmeans function. It seems that is failing something obvious with the workspace. I am a newbie and here is my code: myk = function (x, centers, iter.max = 10, nstart = 1, algorithm = c("Hartigan-Wong", + "Lloyd", "Forgy", "MacQueen")) + { + do_one <- function(nmet

[R] how to find the number of iterations kmeans used to converge?

2012-01-13 Thread Rui Esteves
Dear all, I need to know in which number of iterations the kmeans converge each time I run it. Any idea how to do it? Thank you for your attention, Rui __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Max value of an integer

2012-01-11 Thread Rui Esteves
Hi. Is there any constant that represents the maximum value of an integer? If I need to setup by myself what is the maximum value? Best, Rui __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

[R] (no subject)

2011-11-10 Thread Rui Esteves
Hello. I have this matrix: cy[,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.000 1.000 -0.5164570 -0.5164087 -0.4004139 -0.4003719 [2,] 1.000 1.000 -0.5164570 -0.5164087 -0.4004139 -0.4003719 [3,] -0.5164570 -0.5164570 1.000 1.000 -0

[R] Kmeans with hamming distance?

2011-11-09 Thread Rui Esteves
Hello, I need to do kmeans clustering with hamming distance instead of the euclidean. The kmeans function only uses euclidean. How can I do it? Thank you Rui [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://sta

[R] Where can I find cmeans {e1071} package?

2011-10-26 Thread Rui Esteves
Hello, I need a Fuzzy C Means algorithm. I found some documentation about cmeans {e1071} at http://rss.acs.unt.edu/Rdoc/library/e1071/html/cmeans.html Does someone knows where I can find it? Thank you Rui [[alternative HTML version deleted]]

Re: [R] How to cancel a R function in the command line?

2011-10-20 Thread Rui Esteves
I found it. It is "ctr shift c" Rui On Thu, Oct 20, 2011 at 7:22 PM, Rui Esteves wrote: > Hi Tsjerk, > > In my command line it does not. > Maybe it because I am using linux. > That is my problem. > > Thank you for answering, > Rui > > On Thu, Oct 20,

Re: [R] How to cancel a R function in the command line?

2011-10-20 Thread Rui Esteves
t; > Tsjerk > > On Oct 20, 2011 7:16 PM, "Rui Esteves" wrote: > > Hi, > > This question seems very basic but I cannot find an answer on google. > > I have a R session on a linux command line. > I called a function that is taking ages. > I want to cancel

[R] How to cancel a R function in the command line?

2011-10-20 Thread Rui Esteves
Hi, This question seems very basic but I cannot find an answer on google. I have a R session on a linux command line. I called a function that is taking ages. I want to cancel the function but without killing the R session. What is the shortcut? Thanks, Rui [[alternative HTML version de

[R] Foreach (doMC)

2011-10-17 Thread Rui Esteves
Hello, I am trying to run a small example with foreach, but I am having some problems. Here is the code: *library(doMC) registerDoMC() zappa = list() frank = list() foreach (i = 1:4) %dopar% { zappa[[i]] = kmeans (iris[-5],4) frank[[i]] = warnings() }* The code runs without error. However th