similar to: R: functions problem

Displaying 20 results from an estimated 10000 matches similar to: "R: functions problem"

2010 Jan 12
1
barplot: border color when stacked
Dear R-users, I am using R version 2.10.1 under windows. In a barplot, I want to mark one of the bars with a special border color. For example: barplot(c(3, 7, 11), border = c(NA, "red", NA)) But how to do this when the bars are stacked? for example: barplot(matrix(1:6, ncol=3)) # border of second bar (i.e. the one with total height = 7) should be red again, I try: barplot(matrix(1:6,
2009 Jul 09
9
Population pyramids
Hi, I hope somebody can help me with this issue: I am doing population pyramids using the barplot command, so in the left side I have male age structure and in the right side the female age structure. To plot the male age structure I put the data in negative numbers. Now, I want to change the sign in the bar plot in such way that I have no-sign numbers, both in left and right side of the graph. I
2006 Apr 27
1
losing x-label when exporting to PNG
I have a simple barplot that looks fine in the R graphics device window. However when I export it to png I am losing the x-label. It must be an obvious problem but I cannot see it. Trying to resize the plot does not seem to help. Code is below. Any help gratefully received. ###### Start Code############ Groups <-c(21.8,45, 43, 17.2, 8.3, 18) names(Groups) <- c("Exeter",
2017 Nov 20
3
Σχετ: change colour in barplot
Dear all,? I am really sorry for this. I have attached the script and a .csv file with an example.? Hope this will help. Many thanks,Maria ???? 11:53 ?.?. ???????, 20 ????????? 2017, ?/? Duncan Murdoch <murdoch.duncan at gmail.com> ??????: On 20/11/2017 6:38 AM, Maria Lathouri via R-help wrote: >? Dear all > I know that it is a very simple question but it seems that I cannot
2004 Aug 19
3
mtext adj= wrong with several las= (PR#7188)
Dear all, Our quite basic function mtext() does wrong adjustments in some parameter configurations. This gets obvious when using multi line texts: There is no way to properly adjust text perpendicular to axis 2, for example. Best Jens Oehlschl?gel m <- matrix(1:9, 3) colnames(m) <- c("several\nlines", "several\nlines", "several\nlines") par(mfrow=c(2,2))
2017 Nov 20
2
change colour in barplot
Dear all I know that it is a very simple question but it seems that I cannot change the colour in the bars. I have the following dataframe:? A ? ? ? ? ? ? ? ?? B ? ? ? ? ? ? ? ? C ? ? ? ? ? D ? ? ? ?? E ? ? ? ? ? ? ? ? ?? F ? ? ? ? ? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ? ? ? ? 59061000 ? ? ? 1540313 and here is the script:
2002 Oct 13
1
barplot(): X-Axis Labels
Hello all. I have a simple barplot with sixteen different segments. When I plot my data, only five or six of the labels are showing in the x-axis. How do go get them all to show? Can I set them at a 45.degree angle? Thank you. Jess -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
2017 Nov 20
0
Σχετ: change colour in barplot
On 20/11/2017 7:09 AM, Maria Lathouri wrote: > Dear all, > > I am really sorry for this. I have attached the script and a .csv file > with an example. The problem is that you have dat as a matrix with only one row. barplot() applies the colours to the rows of dat; since you have only one row, everything ends up blue. You can fix this by creating dat as a vector using
2007 Mar 20
2
Ticks on barplots
Dear Gurus, Using R 2.4.1 on Windows XP I am generating stacked barplots of age-composition of fish populations (Y) over time (X). As there are many years, not every bars is labeled. When looking at the plot, it becomes difficult to associate labels with their bars. We have improved this a bit by using axis() to add a tickmark below each bar. Can anyone suggest a way to draw ticks ONLY
2017 Nov 20
0
change colour in barplot
On 20/11/2017 6:38 AM, Maria Lathouri via R-help wrote: > Dear all > I know that it is a very simple question but it seems that I cannot change the colour in the bars. > I have the following dataframe: > A ? ? ? ? ? ? ? ?? B ? ? ? ? ? ? ? ? C ? ? ? ? ? D ? ? ? ?? E ? ? ? ? ? ? ? ? ?? F ? ? ? ? ? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ?
2010 Jun 11
2
Misplacement of Greek letter
Hello. I am trying to get my axis label to read as follows (The symbol) Delta AUC blah blah... then below it...(some other text) The problem is the Delta symbol shows up beside the "(some other text)" rather than the "AUC". Does any one know how I can get the Delta to remain beside AUC? Here is the actual command should you care to look at it. par(mar=c(8,8,4,4))
2010 May 07
2
smooth line overlap with histogram
Hi r-users,   I would like to overlap a smooth line on the histogram.  I tried using spline but it does not work. sq     <- seq(0,900,by=50) sq.50  <- as.character(sq) datobs <- sum_pos ## first, plot histogram histo <- hist(datobs,breaks=sq,freq=F) ## extract counts from histogram and calculate the probability in ## each specified interval. Also check the length of the interval is
2011 Jan 18
2
Barplot and line x-axis positions
Hello all, Hoping that there is a fairly simple solution to my query... I'm trying to overlay a line plot of some data onto a barplot of different data. The y-axes are different for each set of data but the x-axes are the same (1:12, corresponding with 12 months of observations). The problem I'm having is that the centre of the bars and the points on line don't match up, which is
2002 Mar 09
1
labels outside plotting region
Hello, I've just started R, and I'm getting a bit mad using it. I've managed to produce a barplot with the labels for the ytick marks placed horizontally (perpendicular to the y-axis) usiing par(las=1). The problem is that most of my labels are in part beyond the plotting area because they are rather long (e.g. "H. sapiens", "D. melanogaster" ...). What is the
2011 Mar 17
1
Using barplot() with zoo -- names.arg not permitted?
I've used barplot(), including the anmes.arg parameter, on data frames successfully, but I'm even newer to using zoo than I am to R. :-} I am working on a functon that accepts a data frame ("df") as its primary argument, extracts information from it to create a zoo, then generates a plot based on that. The data frame has a column called "time" which is a standard
2012 May 23
3
barplot
Hey, I am trying to create barplot of abundances over time (in days). The period is over 171 days, so I don't want to have all labels there but only the first day of the month. I couldn't find anything like this on the forum yet. Mostrly it's about year to year data. This is the relevant part of my table: datum month abundance 26/03/11 March 1 27/03/11 March 0 28/03/11 March 1
2010 Oct 29
2
make many barplot into one plot
Dear R users I would like to group my barplot graph (see example on the R help link). The proposed R code, adding individual bars to the plot, looks really overwhelming. My specific dataset just consists of five groups and three different levels within each groups (the individual bars). The .txt file is read as matrix (horizontal: group, vertical: levels). The R trellis barchart (function
2006 Dec 07
2
barplot - how to force vertical axis to cover entire plot area
I'm using barplot with the following call: barplot(stat_data[[5]][,],axes=TRUE,axisnames=TRUE,axis.lty=1,xlab=xlab,ylab=ylab,beside=TRUE,las=1,font.lab=2,font.axis=1,legend.text=TRUE) On some data, the vertical axis does not cover the whole plot area and the last tick mark is smaller than the maximum value. I tried setting the ylim values but even with that, some plots are still not OK,
2001 May 15
3
box around a barplot
Hi, is it possible to draw a box around the following barplot; using "box=TRUE" won't work. ---------- pc<-c(1,2,5,29,27) barplot(pc,ylim=c(0,30),yaxs="r",xaxs="r",ylab="Anzahl" ,names.arg=c("Mac","286er","386er","486er","Pentium I") ,axisnames=T,col="gray") ---------- Thanks in
2011 Dec 16
1
problem with tick graph
Dear all, I'm having problems with the tick of my graph. I'mpcombining lines and barplot. For my I'm using the function axis combined with the function pretty to have more efficient tick, but all my tick (for example, 300 as my max tick and -100 as my min tick) are not printed on my graph. So I would like to have for the left axis the seq from 0 to 100 (with 0 and 100 printed on