search for: immaq

Displaying 19 results from an estimated 19 matches for "immaq".

Did you mean: imma
2010 Apr 09
3
NAs are not allowed in subscripted assignments
I'm trying to assign NAs to values that satisfy certain conditions (more complex than shown below) and it gives the right result, but breaks the loop having done the first one viz: new<-c(rep(5,4),6) for (i in 1:6) {new[new[i]>5.5][i]<-NA} gives the correct result, though an error message appears which causes a break if it's in a loop. If I can get rid of the error message and
2010 Jun 15
1
Problem with the recode function
...<- recode(test$x, '1:5 = 0; else = 1; ', as.factor.result=FALSE) And a vector of NA as result. > test$variable [1] NA NA NA NA NA NA NA NA NA NA I am using R 2.11.1 with Rcmdr 1.5-5 on Windows Vista. Regards, Alain -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Universit? catholique de Louvain Bureau c.316 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium tel: +32 10 47 30 50
2010 Apr 09
1
terminating function
Hi everyone, I 'm building a function, in the middle it controls the sign of a variable x. If x < 0 the function write a warning (Error: negative value!). At this point I want the function stops without execute the remaining code. How can I do to terminate the function before your ending? Thanks in advance. Paolo
2010 Mar 10
2
How to sum a list of matrices ?
Dear list, I have a list of three matrices : i = list(matrix(1:4,2,2), matrix(3:6,2,2), matrix(9:12,2,2)) I would like to sum the matrices, as follows : [,1] [,2] [1,] 13 19 [2,] 16 22 I used this code : k <- i[[1]] for (j in (2:length(i))) { k <- k + i[[j]]} But, is it possible to sum without a loop ? Thanks in advance, Carlos [[alternative HTML version deleted]]
2018 Feb 06
3
Aggregate behaviour inconsistent (?) when FUN=table
...according to the table help? Or would it be possible to have the same results independently of the vector type? This post was rejected on the R-devel mailing list so I ask my question here as suggested. Best regards, Alain Guillet -- Alain Guillet Statistician and Computer Scientist SMCS - IMMAQ - Universit? catholique de Louvain http://www.uclouvain.be/smcs Bureau c.316 Voie du Roman Pays, 20 (bte L1.04.01) B-1348 Louvain-la-Neuve Belgium Tel: +32 10 47 30 50 Acc?s: http://www.uclouvain.be/323631.html
2010 Aug 20
2
Determining the length of unique items in a vector
Dear all, let suppose I have following vector:   > dat1 <- c(rep("asd", 5), rep("xyz", 12), rep("erd", 17)) > dat1 <- dat1[sample(1:length(dat1), length(dat1), replace=F)] > dat1  [1] "erd" "xyz" "erd" "asd" "asd" "erd" "xyz" "asd" "erd" "erd"
2010 Oct 27
3
Increase R precision
Hello everyone. When I execute the following in R > (18-46)/(45-93) [1] 0.5833333 I get small precision for what I am trying to deal with . Is it possible to increase the precision for this and for other operations? For example openoffice calc for this operation returns 0.58333333333333300000 I I would like to thank you for your help [[alternative HTML version
2011 Jun 06
2
adding an ellipse to a PCA plot
Hi, I created a principal component plot using the first two principal components. I used the function princomp() to calculate the scores. now, I would like to superimpose an ellipse representing the center and the 95% confidence interval of a series of points in my plot (as to illustrate the grouping of my samples). I looked at the ellipse() function in the ellipse package but can't get it
2013 Mar 20
3
Introduction to R. Any such documentation in Vietnamese?
Dear fellow users Are there any Vietnamese language resources for beginners of R? If so, I would be interested in hearing from people who have had experience with them and which are better (if there is more than one). I am involved with an aid project in Vietnam, and would like to move the scientists involved from using Excel for 'analysis' to R. Thanks .... Peter Alspach The
2010 Aug 09
1
Difference Between R: wilcox.test and STATA: signrank
This is my first post to the mailing list and I guess it's a pretty stupid question but I can't figure it out. I hope this is the right forum for these kind of questions. Before I started using R I was using STATA to run a Wilcoxon signed-rank test on two variables. See data below:
2010 Jul 22
2
how to write legend of a plot
Dear R Users, If we issue simple plot command in R we don't get legend of the plot automatically. For example, following lines plots two curves, but to write a legend of these two curves there is no simple command. I checked with ?legend but it seems bit complicated for me. Does anyone know how to get a legend in a simple way for following R plot. Thanks, Yogesh >plot (x,y,
2010 Jul 12
2
a small puzzle?
I know the following may sound too basic but I thought the mailing list is for the benefit of all levels of people. I ran a simple if statement on two numeric vectors (news1o and s2o) which are of equal length. I have done an str on both of them for your kind perusal below. I am trying to compare the numbers in both and initiate a new vector s as 1 or 0 depending on if the elements in the arrays
2010 Dec 17
4
How to arrange the data
Dear R helpers I have one data as given below. date                     value1          value2             value3 30-Nov-2010           100                 40                 61 25-Nov-2010           108                 31                 88 14-Sep-2010            11                 180               56 I want the following output date                 name       amount 30-Nov-2010      value1
2018 Feb 06
0
Aggregate behaviour inconsistent (?) when FUN=table
...e to > have the same results independently of the vector type? This post was > rejected on the R-devel mailing list so I ask my question here as suggested. > > > Best regards, > Alain Guillet > > -- > Alain Guillet > Statistician and Computer Scientist > > SMCS - IMMAQ - Universit? catholique de Louvain > http://www.uclouvain.be/smcs > > Bureau c.316 > Voie du Roman Pays, 20 (bte L1.04.01) > B-1348 Louvain-la-Neuve > Belgium > > Tel: +32 10 47 30 50 > > Acc?s: http://www.uclouvain.be/323631.html > > ____________________________...
2010 Jul 16
8
save plot
I made a plot, but after I made a second plot, the previous plot was gone. How can I save all the plots in a file (I do not manually copy and paste them one by one)? Thanks. Linda
2010 Jul 12
6
in continuation with the earlier R puzzle
When I just run a for loop it works. But if I am going to run a for loop every time for large vectors I might as well use C or any other language. The reason R is powerful is becasue it can handle large vectors without each element being manipulated? Please let me know where I am wrong. for(i in 1:length(news1o)){ + if(news1o[i]>s2o[i]) + s[i]<-1 + else + s[i]<--1 + } --
2010 Jul 19
5
par("uin") ?
I inherited a function written either for an older version of R or SPlus to draw a brace, "{", in a graph. It uses par("uin") to determine the scaling of the quarter circles that make up segments of the brace, but that setting doesn't exist in current R. I'm guessing that, in the function below, ux, uy can be defined from par("usr") and
2010 Jul 23
2
decimal seperator
Hi R-List, I have a question regarding R-language formats, I think. I am producing a series of graphs (using plot, barplot, barchart, and bwplot, using either text or mtext to place values on the graphs) and tables for a Francophone country. In fact, I have already done so. However, while they are pleased with the results they've requested I convert all of my decimal points into the French
2010 Jul 26
4
Plot of a subset of a data.frame()
Hello, my data.frame is sort of a collection of process values, i.e. huge run-chart. It consists of a time-stamp in the first column (date as string), factors in the following columns (used for subset-filtering), and some process-data columns. Hereafter, two examples are listed, showing the problems that occour during print: At first the example, that works fine: