similar to: Median line with stripchart

Displaying 20 results from an estimated 10000 matches similar to: "Median line with stripchart"

2012 Sep 18
4
add reference lines (or grid) in background
Dear all, Is there a simple way to add reference lines in background? I am trying with abline() or grid() but the lines, since they are executed after the plot function, are draw on top. How can I draw such lines beneath the main plot? Here is an example: x<-rnorm(100) boxplot(x) abline(h=c(-1,0,1)) grid(NA, 4, lwd = 2) regards, Luigi Marongiu, MSc [[alternative HTML
2012 Jun 22
2
Boxplot with Log10 and base-exponent axis
Dear all, I would like to (i) produce boxplot graphs with axis in logarithm in base 10 and (ii) showing the values on the axis in 10^exponent format rather than 10E+exponent. To illustrate with an example, I have some widely spread data that I chart plot using boxplot() [figure on the left]; the log="y" option of boxplot() I obtained the natural logarithm conversion of the data and
2008 May 22
2
Stripchart and Boxplots side-by-side
Dear all - With the following code I get Boxplots and Stripcharts in one Plot: with(InsectSprays, boxplot(count ~ spray, boxwex = 0.3)) with(InsectSprays, stripchart(count ~ spray, col = "red", vertical = TRUE, add = TRUE)) But the dots from the stripchart are plotted over the Boxes. Is there any possibility to have Stripchart and Boxplots side-by-side, i.e. to move boxplots and/or
2009 Mar 13
1
Overlay plot: boxplot and stripchart
Hi, I have a data.frame of this kind: x obs movie earned rating 1 P1 3.2 xx 2 P1 4.2 xx 3 P1 5.2 xx 4 P1 6.2 xx 5 P2 3.5 xx 6 P2 6.5 xx 7 P2 7.5 xx 8 P2 4.5 xx 9 P2 4.5 xx 10 P3 4.8 x1 11 P4 7.3 x2 12 P4 3.2 x2 13 P4 3.3 x2 I want to overlay the
2008 Oct 10
1
boxplot and stripchart
I want to make illustrations a la boxplot for a data material with several groups. Some of the groups are very small, so a boxplot doesn't make sense. I would like to use stripchart for these groups. On the other hand, some of the groups are very large, so for them stripchart isn't so good. So my question is: Is it possible to combine boxplots and and stripcharts in one figure? (Of course,
2018 Jan 22
2
substr gives empty output
In y <- substr(x, i, 1) your third integer needs to be the location not the number of digits, so change it to y <- substr(x, i, i) and you should get what you want. Cheers, Tim > Date: Sun, 21 Jan 2018 10:50:31 -0500 > From: Ek Esawi <esawiek at gmail.com> > To: Luigi Marongiu <marongiu.luigi at gmail.com>, r-help at r-project.org > Subject: Re: [R] substr
2020 Oct 31
2
fast way to find most common value across columns dataframe
As usual, a web search ("find statistical mode in R") brought up something that is possibly useful -- Did you try this before posting? If not, please do so in future and let us know what your results were if you subsequently post here. Here's what SO suggested: Mode <- function(x) { ux <- unique(x) ux[which.max(tabulate(match(x, ux)))] } # ergo:
2020 Oct 31
0
fast way to find most common value across columns dataframe
Thank you. The problem was not finding the mode but applying it the R way (I have the tendency to loop into each line of the dataframes, which I believe is NOT the R way). I'll try them. Best regards Luigi On Sat, Oct 31, 2020 at 5:40 PM Bert Gunter <bgunter.4567 at gmail.com> wrote: > > As usual, a web search ("find statistical mode in R") brought up something that is
2006 Feb 22
1
stripchart-y axis labels
Hello, I am trying to create a stripchart for my data, where y axis labels are characters (ie,names of cities). I would like to change the orientation of the y - axis labels, ie perpendicular to y axis. Below is the code i am using: par(srt=90) with(ozone.ne.trim, stripchart(Median~City,main = "stripchart(ozone)")) The par option doesn't seem to working. Kindly help. Thanks
2003 Mar 30
1
Suggestion: add log argument to stripchart
Hello, I frequently use stripchart to summarise data. Recently I wished to plot a stripchart on a log scale, so modified stripchart locally. The change is small, just adding log="" to the function call and then changing line 42 of src/library/base/R/stripchart.R from: plot(xlim, ylim, type="n", ann=FALSE, axes=FALSE) to: plot(xlim, ylim, type="n",
2020 Oct 26
0
How to shade area between lines in ggplot2
Hi Put fill outside aes p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2], ymax = slope_1*x + intercept_1 + 1/w[2]), fill = "blue", alpha=0.1) The "hole" is because you have two levels of data (red and blue). To get rid of this you should put new data in ribbon call. Something like newdat <- trainset newdat$z <- factor(0) p+geom_ribbon(data=newdat, aes(ymin =
2020 Oct 23
2
How to shade area between lines in ggplot2
Thank you, but this split the area into two and distorts the shape of the plot. (compared to ``` p + geom_abline(slope = slope_1, intercept = intercept_1 - 1/w[2], linetype = "dashed", col = "royalblue") + geom_abline(slope = slope_1, intercept = intercept_1 + 1/w[2], linetype = "dashed", col = "royalblue") ``` Why there
2012 Jul 26
1
optimal cut off with Epi package
Dear all, I would like to calculate the optimal cut off (threshold) of a test using the Epi package. Here I am presenting some data based on the output of two tests. I am interested in identifying the optimal cut off an its 95% CI. Running the ROC() function with the Epi package I obtain a nice picture that returns what I interpret as the optimal cut off with lr.eta=0.431. would be this the
2009 Jul 20
2
moving columns on a stripchart closer together
Greetings I have a very simple question that I have not been able to solve by reading the manual. When I produce a stripchart with two straight columns of dots representing individual observations, one representing one group of subjects and the other representing another, the columns wind up at the far left and far right sides of the plot, and I'd like them to be closer together, about as far
2004 Nov 09
2
Multiple stripcharts using "for loop"
Hi I'm able to create multiple plots from a dataset using a "for loop" to change variables, but when I try with stripchart it doesn't work. Standard boxplot: for(i in 2:14){boxplot(klk[,i]~Group,main=colnames(klk)[i]) Stripchart: for(i in 2:14){stripchart(klk[,i]~Group,main=colnames(klk)[i]) gives:Error in plot.window(xlim, ylim, log, asp, ...) : need finite xlim
2020 Oct 23
0
How to shade area between lines in ggplot2
Hi What about something like p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2], ymax = slope_1*x + intercept_1 + 1/w[2], fill = "grey70", alpha=0.1)) Cheers Petr > -----Original Message----- > From: Luigi Marongiu <marongiu.luigi at gmail.com> > Sent: Friday, October 23, 2020 11:11 AM > To: PIKAL Petr <petr.pikal at precheza.cz> > Cc: r-help
2020 Oct 20
0
How to assign the same levels to a dataframe column?
Stop using as.factor() and start using factor()? Be explicit about what levels you want and in what order. As for extracting subsets, use split() and do your subsets on each set of rows with the same level. It will be on you to decide what statistical properties (proportions?) you want to maintain between the full data set and your subset. On October 20, 2020 6:42:27 AM PDT, Luigi Marongiu
2023 Oct 24
2
How to Calculate the Mean by Multiple Groups in R
Hi, I think you're misunderstanding which set of variables go on either side of the formula. Is this what you're looking for? > aggregate(OD ~ Time + Target + Conc, data = df, FUN = "mean") Time Target Conc OD 1 1 BACT 1 765.3333 2 1 BACT 2 745.3333 3 1 BACT 3 675.0000 > aggregate(ODnorm ~ Time + Target + Conc, data = df, FUN =
2020 Oct 31
0
fast way to find most common value across columns dataframe
Hi Luigi, If I understand your request: library(prettyR) apply(as.matrix(df),1,Mode) [1] "C" "B" "D" ">1 mode" ">1 mode" ">1 mode" "D" [8] "C" "B" ">1 mode" Jim On Sat, Oct 31, 2020 at 7:56 PM Luigi Marongiu <marongiu.luigi at gmail.com> wrote:
2007 Nov 21
1
Manipulating x axis in stripchart
Hi all, I I need to manipulate the x axis in a stripchart. I will use one of the data sets included in R to explain what I need to do. attach(ToothGrowth) stripchart(len[supp=='VC']~dose[supp=='VC'], vertical=TRUE, group.names=c('A','A','A')) stripchart(len[supp=='OJ']~dose[supp=='OJ'], add=TRUE, vertical=TRUE, at=c(1:3)+.1,