similar to: How to cancel a R function in the command line?

Displaying 20 results from an estimated 30000 matches similar to: "How to cancel a R function in the command line?"

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]]
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
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
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
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 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 Feb 15
3
built a lower triangular matrix from dataframe
Hello! I'm trying to build a lower triangular matrix (with zeros in the diagonal) from a particular dataframe. The matrix I have to construct has 203 rows and 203 columns and that makes 20503 values to be included within (that's why I can't do it manually). To illustrate the dataframe I have, I'll give you an example of a dataframe and matrix with dimensions 6x6 (to make it
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
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 >
2011 Mar 14
2
*Building* a covariance matrix efficiently
deaRs, I want to build a covariance matrix out of the data from a binary file, that I can read in chunk by chunk, with each chunk containing a single observation vector X. I wonder how to do that most efficiently, avoiding the calculation of the full symmetric matrices XX'. The trivial non-optimal approach boils down to something like: Q <- matrix(rnorm(100000),ncol=200) M <-
2011 Apr 17
5
cube root
This is some interesting: > -8^(1/3) [1] -2 > x=(-8:8) > y=x^(1/3) > y [1] NaN NaN NaN NaN NaN NaN NaN NaN 0.000000 1.000000 [11] 1.259921 1.442250 1.587401 1.709976 1.817121 1.912931 2.000000 So, can anybody explain this?! (Why is x[1]^(1/3)=y[1]=NaN, but -8^(1/3)=-2?) Thx!!! [[alternative HTML version deleted]]
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
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
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
2011 Aug 24
3
Efficient way to Calculate the squared distances for a set of vectors to a fixed vector
I am pretty new to R. So this may be an easy question for most of you. ? I would like to calculate the squared distances of a large set (let's say 20000) of vectors (let's say dimension of 5) to a fixed vector. ? Say I have a data frame MY_VECTORS with 20000 rows and 5 columns, and one 5x1 vector y. I would like to efficiently calculate the squared distances?between each of the 20000
2011 Feb 13
4
A Math question
Dear all, I admit this is not anything to do R and even with Statistics perhaps. Strictly speaking this is a math related question. However I have some reasonable feeling that experts here would come up with some elegant suggestion to my question. Here my question is: What is sum of all Integers? I somewhere heard that it is Zero as positive and negative integers will just cancel each other out.
2011 Feb 08
2
Plot colour according to column
Hi, I am trying to plot several columns in different graphs in columns and rows. The first column of my data file is the time, and the third is the 'elevation angle' with 19 different numbers. I would like to plot the rest of the columns with the x axis as time and the individual angles in different colours. Here is the code I am using right now. It plots the different columns with time,
2012 Mar 14
3
Creating 250 submatrices from a large single matrix with 2500 variables using loops
Dear all, I have a large matrix with about 2500 variables, and 100 rows. I would like to calculate the means of the every 10 variables starting from 1:2500 and saving the results as a vector or matrix. How can I do that? Alternatively, How can I create 250 subset matrices in the order of variables 1:2500 in groups of 10 from the single matrix which had initially 2500 variables ? I guess I have