Displaying 15 results from an estimated 15 matches for "ruimaximo".
2013 Apr 29
3
How to "call" an object given a string?
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]]
2011 Oct 17
2
Foreach (doMC)
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 the zappa and frank will be empty
lists.
If I use regular *for *instead, the list will be filled up
2012 Oct 18
4
Help with
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 count
...
docID2 wordID2 count
docID2 wordID5 count
docID2 wordID6 count
---
Where docIDx is an integer
2012 Oct 02
5
Is there any R function for data normalization?
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 the same way.
Does a function in R exists for this purpose?
Thanks,
Rui
[[alternative HTML
2011 May 21
1
How to intantiate a list of data.frames?
Hello,
I am newbie to R and I want to do this:
for(i in 1:6)
{
ds[i] <- list(df=data.frame(oilDF[,1],oilDF[,i+2]), df2=data.frame(oilDF2[,1],oilDF2[,i+2]))
}
#oilDF and oilDF2 are 2 data frames with several columns. They have different number of rows
#I want to have for example ds[1]$df, ds[1]$df2 with the respective data.frames.
#How can I instantiate a list of data.frames pairs
2011 Oct 20
1
How to cancel a R function in the command line?
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 deleted]]
2011 Oct 26
1
Where can I find cmeans {e1071} package?
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]]
2011 Nov 11
1
(no subject)
Hello.
I have this matrix:
cy [,1] [,2] [,3] [,4] [,5] [,6]
[1,] 1.0000000 1.0000000 -0.5164570 -0.5164087 -0.4004139 -0.4003719
[2,] 1.0000000 1.0000000 -0.5164570 -0.5164087 -0.4004139 -0.4003719
[3,] -0.5164570 -0.5164570 1.0000000 1.0000000 -0.1186691 -0.1186972
[4,] -0.5164087 -0.5164087 1.0000000 1.0000000 -0.1186995 -0.1187276
[5,]
2012 Jan 14
1
Error: unexpected '<' in "<" when modifying existing functions
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(nmeth) {
+ Z <- switch(nmeth, {
+ Z
2012 Jan 11
2
Max value of an integer
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
2012 Jan 13
1
how to find the number of iterations kmeans used to converge?
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
2013 Mar 23
1
RWeka and Back Propagation NN
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
2013 May 09
0
error with lhoat() function from the package hydroPSO
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.name == "hydromod" : *
* comparison (1) is possible only for atomic and list types*
Any
2012 Feb 29
3
Does anyone knows a KMeans ++ package for R?
Dear all.
I am searching for KMeans ++ for R. I cannot find it.
Do you know any package with it?
Best regards,
Rui
2012 Sep 11
1
lapply with different size lists?
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<p) sup=((l-1)*m)+m
> else sup=n
>