Displaying 20 results from an estimated 9000 matches similar to: "How to plot a matrix with 18 rows by row vs. a vector in a single graph, resulting 18 lines with different colors?"
2005 Sep 07
7
Plot of multiple data sets
Hello !
There is something quite simple I want to do with R but I found nowhere in the help how to do it.
I just want to plot data which are in a matrix, every column being a data set and having the same
x-axis (just an index).
So for example if I have a 50 x 6 matrix I want 6 set of points on the same plot.
I tried
plot,new()
plot(MATRIX[,1])
plot(MATRIX[,2])
...
but it replaces the previous
2005 May 11
3
display two pie-charts
Hey,
i'd like to compose a clock-like looking plot composed out of two
circles, each showing the length of a period (to compare them). first,
to do so, it looked the easiest by using pie(), just puting multiple
pie-charts over each other. the problem is that once the second pie is
drawn, it replaces the first one. does anybody know how to add a second,
smaller pie over an existing one,
2005 Apr 18
5
the graph gallery strikes back
Hello useRs and helpRs,
Some time ago, in a gallaxy far away (here is the thread :
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/46532.html ) we
discussed about a graph gallery showing the power of R in that domain. I
did some work around that, and there is a (pretty advanced) draft here :
http://addictedtor.free.fr/graphiques/displayGallery.php
For instance, there are some of my graphs,
2005 Aug 02
3
how to print a data.frame without row.names
Dear All,
is there a simple way to print a data.frame without its row.names?
example:
datum <- as.Date(c("2004-01-01", "2004-01-06", "2004-04-12"))
content <- c('Neujahr', 'Hl 3 K.', 'Ostern')
df1 <- data.frame(datum, content)
print(df1)
datum content
1 2004-01-01 Neujahr
2 2004-01-06 Hl 3 K.
3 2004-04-12 Ostern
Can I get
2005 Jun 15
1
Graph with values of coordinates of points in x axis
Hi all,
I want to draw a line with the values of x marked in X axis.
I tried with
x <- c(0,6,12,18,24,30) #coordinates of points x
y <- c(2,5,7,5,7,16) #coordinates of points y
plot(x,type="n",xlab="Months",ylab="Y
values",main="main",ylim=c(0,16),xlim=c(0,30))
lines(x,y)
The graph shows by default an increment of the sequence in x axis that
2005 Apr 26
2
Flip rows and columns of a table?
Any simple way to take a (2D) table and 'rotate' it so all the rows become
columns and the columns rows?
I'll wager there is a simple way ;) - but I can't find it :(
2005 Jun 09
1
color on barplot
Hello,
On my barplot, I have on the axis y, the names of the rows of my matrix r_mat!
is it possible to change the color of these names on my barplot?
barplot2(t(r_mat),beside=TRUE,horiz=TRUE,plot.grid=TRUE,xlab="R",font.lab=4,las=2,xlim=c(0,1))
thanks,
Sabine
---------------------------------
[[alternative HTML version deleted]]
2005 Aug 05
1
use of color for hclust
Hi,
I have a grouping of some observations. I want to cluster them using
hierarchical clustering and compare how the hierarchical clustering shows up
vis-a-vis the groupings. Is it possible to do this in color? I guess what I am
looking for is a way to color the labels of a hierarchical clustering plot
using different colors according to the original grouping. Any suggestions?
Many thanks and
2005 Sep 16
1
Add lines to density plot
Dear List,
I am using R to learn bootstrapping concepts. Not to be oblivious to
the
contributed packages of boot and bootstrap, I have opted to do the
following as a way to hone my R skills.
One example I am trying to work through is the following:
x <- 1:20
Observed <- sample(x,20)
Resamples <- replicate(1000,sample(Observed,replace=TRUE))
Boot.Means <- apply(Resamples,2,mean)
2005 May 13
2
how to generate object name automatically?
Hi everybody,
I have a lable vector ,
raw.labs= paste("file1", 1:20, sep = "")
And i can i make the content of raw.labs to be a object name.
eg ,file1=123(use some function on raw.labs to generate the name file1)
Thanks!
[[alternative HTML version deleted]]
2005 Aug 03
3
red-black-green color palette?
I'm working on some heatmaps, and the person I'm working with would
prefer a red-black-green color palette (red denoting gene induction and
green denoting gene repression). Does such a palette exist already?
If not, is there an easy way to create one?
Thanks,
Jake
2010 May 05
1
'matplot' for matrix with NAs: broken lines
Hi list,
I know that points involving NAs are not plotted in 'matplot', but when I plot them as lines, I still want the lines to connect all the points (i.e. not broken where there are NAs).? Please see the example below.? How can I achieve this in 'matplot'?? If I can't, any good alternatives so I don't have to use 'plot' + 'lines' and loop through all the
2005 Oct 19
6
forrest plot
Hi,
can you tel me how can I make a Forrest Plot with R?
It is possible and easy or are there a more practical free software available?
Than you
Mic
[[alternative HTML version deleted]]
2005 Jun 13
3
assignment of inidividual variables from spss save files
New to R, can't afford SPSS!
Why can't I assign spss variables? Here are the details.
> ### I've read in my collaborator's sav file using read.spss, eg
> children = read.spss(filename)
> ### It has many variables
> length(children)
[1] 347
> ### and I would like to assign individual variables.
> ### I can of course type out all the ones I want, eg
>
2005 May 06
4
how to get such a subset of a matrix?
Hi everybody,
Maybe this question is quite simple but i just don't know how to make it.
I have a matrix a somewhat like this one but bigger:
> a
f g h i j k
a NA NA 11 16 21 26
b NA NA 12 17 22 27
c NA 8 13 18 23 28
d NA 9 14 19 24 29
e NA 10 15 20 25 30
And i want to get the rows which at most have 2 Na.
Thanks in advance.
Shi Jiantao
[[alternative HTML version deleted]]
2010 Mar 06
1
color2D.matplot not giving colors
I am using color2D.matplot to plot a matrix about 400 by 200.
The values in the matrix are 0:5 and NA. The resulting plot is not color, but shaded b/w. I tried to figure out how to add colors, I would like something like c(blue, green, red, cyan, green)
#example
motifx <- matrix(NA, nrow=100,ncol=20)
motifx[,1:5] <- 1
motifx[,6:10] <- 2
motifx[,11:15] <- 3
motifx[,15:19] <- 4
2005 Apr 23
3
How to know in which package is a function
Hello list,
I'd like to know if there is a function that tells in which package is a
given function.
Something like :
which.package("lda")
[1] "MASS"
Thank you.
Romain
--
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
~~~~~~ Romain FRANCOIS - http://addictedtor.free.fr ~~~~~~
~~~~ Etudiant ISUP - CS3 - Industrie et
2005 Mar 03
2
Putting different colors on labels in plot (hclust)
Hi All R-helpers
This is my first (but probartly not last ;-) mail to R-help, so hello to everybody.
My problem: Is there a way to give colors to the labels (sample labels) in plots for a hclust object for better visualization?
I have looked through plot, points, hclust and more but cannot find anything on label color. Anybody know if this is doable?
Best regards Jeppe
2004 Sep 17
1
Confused about specifying plot colors as RGB values
Based on reading 'rgb' documentation, I would have thought
the following would have produced identical results. Can
someone explain how to make this happen? I need to be able
to specify an array of rgb values for the 'col' parameter.
colnames.col <- c("black", "red", "blue", "green")
colnames.rgb <- apply(as.matrix(colnames.col), 1,
2005 Apr 28
1
normality test
Hi,
I have a small set of data on which I have tried some normality tests. When I make a histogram of the data the distribution doesn't seem to be normal at all (rather lognormal), but still no matter what test I use (Shapiro, Anderson-Darling,...) it returns a very small p value (which as far as I know means that the distribution is normal).
Am I doing something wrong here?
Thanks
Pieter