similar to: Changing the x-axis labels in plot()

Displaying 20 results from an estimated 20000 matches similar to: "Changing the x-axis labels in plot()"

2004 Aug 26
5
Problems with par() and labels with boxplot
Quite a simple one really! When I run boxplot(), the labels on the X axis are horizontal, and I want them vertical. So I did: par(las=3) boxplot(...) And my labels just aren't there anymore.... Any help???
2004 May 19
7
Help with hclust() and plot()
Hi When I use plot(hclust(dist..)...)...) etc to create a dendrogram of a hierarchial cluster analysis, I end up with a vertical tree. What do I need to do to get a horizontal tree? Also, my users are used to seeing trees who's leaves all "end" at the same place (eg. Like in minitab). Is this possible in R? Thanks Mick Michael Watson Head of Informatics Institute for Animal
2004 Nov 16
3
Simple plot() question
Hi First a simple question to do with plot(). How do I change the x-axis labels on a plot? For example, I am plotting each row of a matrix, and I want each row to be a line on my graph. Simple really. Eg: plot(sg[1,], type="l") When I do this, the x-axis is labelled 1:38, as I have 38 columns in my matrix. When I do: plot(sg[1,order(sg[1,])], type="l") Ideally I would
2004 Dec 10
2
Returning to normal after call to layout()
Hi I have a function which draws a plot, using the layout() function to divide the screen into two parts. The function works fine, but then my next call to plot() draws the plot in the first section of the plot I've just drawn using layout() - whereas what I want it to do is create a new plot. I tried using dev.off() but that just closes the layout plot window, which is not what I want. So
2004 Dec 02
2
Drawing a rectangle around a barplot()
Hi I want to draw a rectangle behind a barplot such that it highlights those particular bars from the rest of the plot. I have figured out how to draw a barplot(), and then how to draw a rectangle of the correct shape and size (using rect()), but when I use rect() it draws over the top of the bars, and then when I re-draw the bars, it draws with a white background, thus eliminating my rectangle!
2005 Feb 03
5
How to convert a list to a matrix
Hi Sorry to ask such a basic question. I have a list, each element of which is a vector of two values. What I actually want is a matrix with two columns, and one row per element of the list. Obviously I have tried as.matrix(), and as.vector() but I didn't expect the latter to work. I feel so lame asking this. Any suggestions? Mick
2003 Jul 25
5
R won't connect to the internet on SUSE Linux 8.1
Hi Thanks once again for your help, I do appreciate it..... however.... Here is what I get with your test.... (under tcsh - i normally use bash, but I will keep everything the same) users/mwatson> env http_proxy=http://wwwcache.bbsrc.ac.uk:8080/ R >options(internet.info=0) >update.packages() trying URL `http://cran.r-project.org/src/contrib/PACKAGES' unable to connect to
2004 Sep 02
3
Problems with heatmap.2
Hi When I give the command: > heatmap.2(as.matrix(d),Rowv=as.dendrogram(hc.gene),Colv=FALSE,scale="row ",trace="none",col=greenred.colors(79)) The resulting heatmap has re-ordered my columns! This is time-course data, and I don't want my columns re-ordered! Note from the help: Rowv: determines if and how the _row_ dendrogram should be reordered.
2004 Dec 17
3
If it's not a data.frame, matrix or vector, what is it?
Hi Forgive my ignorance. I am selecting a column of a data.frame using the column name, and I want to know what the resulting column "is". My data frame is called "submin" and the column name is held in a variable called "display.gname" Eg: > is.data.frame(submin) [1] TRUE > is.data.frame(submin[,display.gname]) [1] FALSE >
2006 Feb 23
7
Bug in setting GUI to SDI mode?
Hi I did a google search on this and came up with nothing. OK, in the latest release of R for windows, I want to change the gui to SDI mode. Edit -> GUI preferences Choose SDI Apply I get the message about properties not being able to be changed on a running console, and that I need to save. So I click Save, and am met with a "Save As" dialogue box with the default file called
2004 Dec 09
4
Create a plot legend in a new window
Hi I have a complicated plot which has a potentially large legend. What I want to do is actually create the legend in a new window. Has anyone done this before? I'd like to be able to create a window with just the legend in it, and have it so the window is just the right size etc. I'm sure someone must have done this already? If not, any tips would be welcome. Thanks Mick
2005 Feb 17
6
Converting a list to a matrix - I still don't think I have it right
Hi We have touched on this before, but I don't think I quite got it right. So I have a list, each element of which is a a vector of 2 numbers: > l2 $cat000_a01 [1] 0.3429944 4.5138244 $cat000_a02 [1] 0.1929336 4.3064944 $cat000_a03 [1] -0.2607796 4.1551591 What I actually want to convert this into is a matrix with the names (cat000_a01 etc) as row names, the first element of each of
2005 Apr 05
5
Help with three-way anova
Hi I have data from 12 subjects. The measurement is log(expression) of a particular gene and can be assumed to be normally distributed. The 12 subjects are divided into the following groups: Infected, Vaccinated, Lesions - 3 measurements Infected, Vaccintaed, No Lesions - 2 measurements Infected, Not Vaccinated, Lesions - 4 measurements Uninfected, Not Vaccinated, No Lesions - 3 measurements
2006 Mar 06
4
Averaging over columns
Hi I've been reading the help for by and aggregate but can't get my head round how to do this. I have a data frame - the first three columns are replicate measurements, then the next 3 are replicates etc up to 36 (so 12 variables with 3 replicate measurements each). I want to compute the mean for each of the 12 variables, so that, for each row, I have 12 means. A grouping variable
2003 Jul 18
4
R won't connect to the internet
Hi I can't get R to connect to the internet. I am running R 1.7.1 on Windows XP and whenever I try to download packages etc from within R using the internet, it fails. OK so I am behind a firewall and use a proxy server.... SO, if I go to my MS-DOS prompt and type: RGui.exe --internet2 everything works.... BUT i can't set up a shortcut for this as Windows (I hate Windows) complains
2005 Jan 14
5
Replacing NAs in a data frame using is.na() fails if there are no NAs
Hi This is a difference between the way matrices and data frames work I guess. I want to replace the NA values in a data frame by 0, and the code works as long as the data frame in question actually includes an NA value. If it doesn't, there is an error: df <- data.frame(c1=c(1,1,1),c2=c(2,2,NA)) df[is.na(df)] <- 0 df df <- data.frame(c1=c(1,1,1),c2=c(2,2,2)) df[is.na(df)] <-
2006 Mar 09
1
Identifying or searching for labels in a hclust/dendrogram/heatmap
Hi Sorry if this is in the help :-S I've looked at example(dendrogram) and though it gives some indication of what I want, it doesn't do all. OK, so here is what I want to do: draw a tree, and then have an action, on user-click, to either draw a sub tree or a plot of the data. I also want users to be able to search for a particular label and have it highlighted on the tree, say in
2005 Jan 20
5
Subsetting a data frame by a factor, using the level that occurs the most times
I think that title makes sense... I hope it does... I have a data frame, one of the columns of which is a factor. I want the rows of data that correspond to the level in that factor which occurs the most times. I can get a list by doing: by(data,data$pattern,subset) And go through each element of the list counting the rows, to find the maximum.... BUT I can't help thinking there's
2004 Nov 16
5
Difference between two correlation matrices
Hi Now a more theoretical question. I have two correlation matrices - one of a set of variables under a particular condition, the other of the same set of variables under a different condition. Is there a statistical test I can use to see if these correlation matrices are "different"? Thanks Mick
2004 Dec 02
1
Gap between axis and bars in barplot()
Hi Windows XP, R 2.0.1. I am drawing a very large barplot using jpeg() - setting the width to 10,000 as there are over 5000 bars. This all works fine and I get exactly what I want - except there is a huge bit of white space between the Y-axis and the first bar - so much in fact that I have to scroll two screens from the Y-axis before I see the first bar. After that the bars are evenly spaced