similar to: how to extract the elements of a list of vectors in a fixed position?

Displaying 20 results from an estimated 10000 matches similar to: "how to extract the elements of a list of vectors in a fixed position?"

2009 Nov 21
2
Fw: Re: title problem
It seems that there is a problem in displaying subtitle in general, independently from multi-plot display. when I do plot (c(1,2,3), c(9,8,7), type = "l") title(main = "Main title", sub ="Sub title",cex.main=2, cex.sub = 2) subtitle doesn't get displayed > --- On Sat, 11/21/09, David Winsemius <dwinsemius at comcast.net> > wrote: >
2011 Aug 17
9
too many var in lm
Hello, It might be an easy question but if you have many variables to fit in the lm function, how do you take all without specifying var1+var2+...+var2100 in the terms parameter in response ~ terms? Cheers, Carol
2012 Jul 20
3
function for inverse normal transformation
Hi, What is the function for inverse normal transformation? Thanks, Carol [[alternative HTML version deleted]]
2012 Feb 15
2
Error in rep.int(boxwex, n) : negative length vectors are not allowed
Dear All, I tried to invoke plot for a matrix of?196475 x2 dimension. I loaded the data with read.table. On one dimension, there are strings (names) and on the other dimension, the floats between 0 and 1. When I invoked plot by setting x to names and y to floats and ylim = c(0,1), I got the following error message: Error in rep.int(boxwex, n) : negative length vectors are not allowed Does it
2009 Nov 21
4
title problem
Hi, I got problem in using title function to create a title for multiple plots presented together by par. As can be seen in the attached file, the title is displayed truncated and the subtitle doesn't get displayed. Here is the code: par(mfrow = c(1,2)) plot(c(1,2,3), c(9,8,7)) plot(c(1,2,3), c(9,8,7)) title(main = "Main title", sub ="Sub title",outer = TRUE,
2009 Oct 09
2
plot the same types of graphics on the same R graphic device
Hi, How to plot the same types of graphics on the same R graphic device? Suppose that we want to plot a vector y against x (using plot for instance). How is it possible to plot y against x for different values of these two vectors on the same device so that the plots could be compared? Cheers, Carol [[alternative HTML version deleted]]
2007 Jul 23
3
extraction of vector elements to new list
Dear R-community, I have got a list of vectors and would like to extract the first two elements of each vector to a new list. My list is of the style: my.list = list(c("a", "b", "c"), c("d", "e"), c("f", "g", "h", "i"), ...) #I want: new.list = list(c("a", "b"), c("d",
2005 Sep 22
2
R: extracting elements in a matrix
Dear R-users For a given matrix of dimension, say (n,p), I'd like to extract for every column those elements that are bigger than twice the interquartile range of the corresponding column. Can I get these elements without using a loop? Thank you for your help Frank [[alternative HTML version deleted]]
2012 Mar 09
4
sort dates
Hello, How is it possible to sort dates in R? Cheers, Carol
2009 Nov 12
2
simulated correlated vectors
Hi, Having a vector x of float type without any assumption of its distribution (mean, variance etc), how to generate another vector that is correlated with x? Extensibility: how to simulate more than two correlated vectors (again float type and no preference for their distribution and without having vector x)? Cheers, Carol
2009 Nov 02
7
qqplot
Hi, We could use qqplot to see how two distributions are different from each other. To show better how they are different (departs from the straight line), how is it possible to plot the straight line that goes through them? I am looking for some thing like qqline for qqnorm. I thought of abline but how to determine the slope and intercept? Best wishes, Carol
2007 Jun 10
3
find position
find the position of the first value who equals certain number in a vector: Say a=c(0,0,0,0,0.2, 0.2, 0.4,0.4,0.5) i wish to return the index value in a for which the value in the vector is equal to 0.4 for the first time. in this case, it is 7. [[alternative HTML version deleted]]
2006 Sep 28
2
get index of elements in vector
Hello all Is There a fuction that return a index of a element in vector? like this semantic example: vector = c( 100, 200, 300 ) getINDEX( vector, value = 200 ) Thanks in advance for your attention. Cleber Borges
2006 Feb 14
2
combine elements of a character vector into a character
Hi R users I have a simple question to ask x <- c("a","b","c") x [1] "a" "b" "c" I like to have "abc" instead of having "a" "b" "c" I tried to use paste and other functions related to character. Is there any function (command) that enable me to combine elements of a character vector into
2006 Jun 27
1
Adding elements of matrices of different dimensions
If I have two matrices: > a<-matrix(1:5,ncol=1) [,1] [1,] 1 [2,] 2 [3,] 3 [4,] 4 [5,] 5 > b<-matrix(1:50,ncol=10) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 6 11 16 21 26 31 36 41 46 [2,] 2 7 12 17 22 27 32 37 42 47 [3,] 3 8 13 18 23 28 33 38 43 48 [4,] 4 9 14 19
2007 Jun 01
2
how to extract the maximum from a matrix?
Dear UseRs, I have a very simple question. I have a big matrix (say x) including probabilities (values in (0,1)). I have to store in a list the names of the row and the column where max(x) is located. How can I proceed? Thanks in advance for your assistance! mirko
2007 Aug 28
1
substituting elements in vector according to sample(unique(vector))
Hello! Assuming I have a vector, such as v <- c(1,2,1,2,3,3,1) This vector has three unique elements: 1, 2, and 3. > unique(v) [1] 1 2 3 If I shuffle this vector of unique elements, I get something like this: > sample(unique(v)) [1] 3 2 1 In the vector v I started with, I would now like to replace each element in unique(v) with the corresponding element (i.e. the element with the
2006 Oct 10
1
Extract p value from aov
Hi all, In assessing the concordance of two sets of ANOVA results, I would like to extract the p values from the summaries. I had a look at previous answers to this problem, and the suggestions do not seem to work: # toy example test.df<-data.frame(subno=c(1:50,1:50), ndrinks=c(rpois(50,4.5),rpois(50,4)), b4after=c(rep(1,50),rep(-1,50)))
2005 Sep 13
4
Remove vector elements from another vector
Hello, I have two vectors of different lengths. Fx a <- 1:9; b <- c(4, 5). What is the best way to remove the elements in vector b from vector a so that the result would be a vector with elements c(1,2,3,6,7,8,9)? Best regards, Kalle _________________________________________________________________ Find masser af gode tilbud p?? MSN Shopping http://shopping.msn.dk/
2009 Apr 06
2
approximation function
Hi, Having a set of values (non-time series data), what are the approximation functions that could determine the trend of the values? Cheers, Carol [[alternative HTML version deleted]]