similar to: plot rows of matrix against a vector on one graph

Displaying 20 results from an estimated 10000 matches similar to: "plot rows of matrix against a vector on one graph"

2005 May 11
3
How to plot a matrix with 18 rows by row vs. a vector in a single graph, resulting 18 lines with different colors?
I have a matrix gene=array(rnorm(180), dim=c(18,10)) and a vector time=c(0, 0.5,2,4,6,8,12,24,48,72). So i can get a plot with plot(time,gene[1,],type="b",col="green") for the first row.So how can i get all the 18 rows in the same plot VS. the same vector time=c(0,0.5,2,4,6,8,12,24,48,72). Any suggestions.Thanks ! [[alternative HTML version deleted]]
2006 Mar 24
1
R for MacOSX - History and command line problems
Hi! I have the following issues using "R for Mac OS X 2.2.1" (from the ppc-.dmg) on a Mac OS X 10.4.5: 1) The command history is never saved (automatically) to .Rhistory. (The file stays empty.) 2) If I save a history to some file via the "Save History" button, and I load it afterwards via "Load History", only the first entry of the saved History appears in
2011 Jan 05
4
Match numeric vector against rows in a matrix?
Two posts in one day is not a good day...and this question seems like it should have an obvious answer: I have a matrix where rows are unique combinations of 1's and 0's: > combs=as.matrix(expand.grid(c(0,1),c(0,1))) > combs Var1 Var2 [1,] 0 0 [2,] 1 0 [3,] 0 1 [4,] 1 1 I want a single function that will give the row index containing an exact match
2008 May 19
1
R syntax, space smaller than space
Hi, I changed something in the package "climatol" especially in the function "diagwl". Dos anybody know where I can put the code in the Internet to discuss it? I made from "C" for gradcelsius "?C" with: unit <- list( temp = expression (paste(#"T ", degree,"C")) ) mtext(unit$temp ,2,col=tcol,las=1,line=3,adj=0,at=55)
2007 Sep 19
1
Strange behaviour of lars method
Hi! When I apply the lars (least-angle-regression) method to my data (3655 features, only 355 data points, no I did not mistype), I observe a strange behaviour: 1) The beta values tend to grow into real high values quite fast up to a point where they overflow and get negative. The overflow is not a problem, I don't need the last part of the analysis anyway, but why do they just
2011 Jun 24
1
Fastest way of finding if any members of vector x fall in the range of the rows of matrix y
Hi All, What is the fastest way of finding if any members of vector x fall in the range of the rows of matrix y? I do not want to use two for loops as this will take forever. Any help will be appreciated, best, salih [[alternative HTML version deleted]]
2011 Jul 16
2
Finding all rows of a matrix equal to vector
Hi everyone, my question might be very trivial, but I could not come up with an answer... I want to find out how often a matrix contains a certain vector as row: x1<-c(1,2,3) x2<-c(1,5,6) x3<-c(7,8,9) A<-matrix(c(rep(x1,5),rep(x2,5),rep(x3,5),rep(x1,5)),nrow=20,ncol=3,byrow=T) How can I find out, how many times x1 is a row of A? Thanks in advance and best regards, Sebastian
2005 Aug 17
2
Copying rows from a matrix using a vector of indices
Hi, I am trying to use a vector of indices to select some rows from a matrix. But before I can do that I somehow need to convert 'combinations' into a list, since 'mode(combinations)' says it's 'numerical'. Any idea how I can do that? library("combinat") combinations <- t(combn(8,2)) indices <- c(sample(1:length(combinations),10)) # convert ???
2005 Jun 14
2
Plotting rows (or columns) from a matrix in different graphs, not using "par"
Dear R-users, I would like to ask whether it's possible (for sure it would be), to plot each rows (or columns) in different graphs and in the same figure region without using the function "par" and then struggling around with "axes" and labels etc. Luckily, I would always have "rows + columns = even number" and the same "ylim". The next one could be a
2007 Sep 20
2
Comprehensive New Learning Resource for R
Hi Folks, I have created a website with over 70 R tutorials on a wide range of subjects. The site is aimed at data analysts who have an idea about what they would like to do, but don't know how to do it in R. The site should be particularly useful for users of statistical packages like SAS, SPSS, Stata, and Systat who would like to get up and running in R quickly. However, I think that it
2011 Aug 08
3
Distance between a vector and matrix rows
I am trying to find the distance between a vector and each row of a dataframe. I am using the function "distancevector" in the package "hopach" as follows: mydata<-as.data.frame(matrix(c(1,1,1,1,0,1,1,1,1,0),nrow=2)) V1 V2 V3 V4 V5 1 1 1 0 1 1 2 1 1 1 1 0 vec <- c(1,1,1,1,1) d2<-distancevector(mydata,vec,d="euclid") The Euclidean distance
2012 Jan 28
2
finding rows in a matrix that match a vector
Hi, Please excuse my ignorance, but I am just learning R (this is my very first day programming in R) and having a really hard time figuring out how to do the following: I have a matrix that is 1000 row by 6 columns (named 'table.combos') and a 1 row by 6 column vector (named 'mine'). I want to find every row in 'table.combos' that equals 'mine' and then count
2009 Dec 20
2
Remove rows in a matrix that match rows in another matrix
Dear R Community, The following seems like a simple problem, but I''ve been stuck on it for some time, with no luck using matching or subsetting functions. I''m trying to remove the rows from a large matrix that match rows in another large matrix. A (small scale) example: col1<-c("A", "B", "C", "D") col2<-c("A",
2011 Oct 28
1
3d graph to show matrix of z matrix values
Hello, I'm not getting a great looking 3d graph when plotting my z values: x <- seq(0.0, max(d1), max(d1)/20) y <- seq(0.0, max(d2), max(d2)/20) z <- matrix(NA, length(x), length(y)) persp3d(x, y, z, phi=30, theta=30, scale=TRUE,shade = 0.75, col=pal[col.ind], xlab=var.name[1], ylab=var.name[2], main="3d plot") Are there other options like persp3d where I
2008 Jul 31
2
sort rows of matrix by rows of another matrix
Hello all, I am trying to sort rows of one matrix by rows of another. Given a1 and a2: ------ > a1 [,1] [,2] [,3] [1,] 7 6 8 [2,] 4 2 4 [3,] 4 7 2 [4,] 0 3 8 a1 <- structure(c(7, 4, 4, 0, 6, 2, 7, 3, 8, 4, 2, 8), .Dim = c(4L, 3L)) > a2 [,1] [,2] [,3] [1,] 101 102 103 [2,] 101 102 103 [3,] 101 102 103 [4,] 101 102 103 a2 <-
2008 Oct 10
3
Question about echo cancelation
Hi, I'm using the following setup : Alice ---- IPPhone ------<LAN>----- Media gateway ----<PSTN> ------- Phone ---- Bob For certain calls, users complains about echo : they can ear their own voice in their handset, though media gateway echo cancel is turned on. I'm wondering how this echo cancelation engine is supposed to work. My understanding of echo is that most probably,
2008 Apr 24
0
permutation of the rows of a matrix that minimizes the distance to another matrix
Hi! I have 2 matrices of numbers m1 and m2 with the same number of columns and rows. I would like to compute m2', the permutation of the rows of m2 such that the distance (e.g., sum(m1-m2') or sum((m1-m2')^2)) is minimized. Do you know of any function/algorithm to obtain such a permutation? Best regards, Carlos
2010 Sep 17
2
Matrix- create mean/min/max/stdev on column of matrix or rows?
I made simulation with Weibull and create Matrix, How can I create mean/min/max/stdev on column or rows of matrix?, Thanks,
2007 Dec 11
3
matrix graph
Hi All, simple question: do you know how to graph the following object/matrix in a 'surface manner': [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.154 -0.065 0.129 0.637 0.780 0.221 [2,] 0.236 0.580 0.448 0.729 0.859 0.475 [3,] 0.401 0.506 0.310 0.650 0.822 0.448 [4,] 0.548 0.625 0.883 0.825 0.945 0.637 [5,] 0.544 0.746 0.823 0.877 0.861 0.642 [6,] 0.262 0.399
2012 Nov 07
2
simple coversion of matrix rows to matrix columns
Dear All   I would like to convert matrix rows to columns. I am thinking the t() function should help, but am having a hard time converting the matrix into the dimensions I would like them to. Example:   a <-matrix(c(1:30),ncol=3) gives me:[,1] [,2] [,3] [1,] 1 11 21 [2,] 2 12 22 [3,] 3 13 23 [4,] 4 14 24 [5,] 5 15 25 [6,] 6 16 26 [7,] 7 17