similar to: R newbie question

Displaying 20 results from an estimated 10000 matches similar to: "R newbie question"

2006 Jun 24
1
Overlaying 2D kernel density plots on scatterplot matrix
Hi all We are pretty new to R here and trying to achieve something that we believe is possible but it?s not easy to work out how to do it. We are producing scatterplot matrices for e.g. 10 variables. What we would like to do is superimpose 2D kernel density estimators on top of each plot so that we end up with a scatterplot matrix of 2D kernel density (contour) plots. The kernel density plots
2008 Mar 18
1
How to reverse colors in filled.contour?
Hi, I am plotting values of log(hazards ratio) as a function of two predictors, using the plotting function filled.contour(). Here is a simple simulated example of this: x <- seq(0,1, length=20) y <- seq(0,1, length=20) z <- outer(x,y, function(x,y) x^2 + y^2 ) zmat <- matrix( rexp(n=400, rate = z+0.001), 20, 20) filled.contour(x, y, log(zmat),
2005 Jul 15
1
2D contour predictions
Hi All I have been fitting regression models and would now like to produce some contour & image plots from the predictors. Is there an easy way to do this? My current (newbie) experience with R would suggest there is but that it's not always easy to find it! f3 <- lm( fc ~ poly( speed, 2 ) + poly( torque, 2 ) + poly( sonl, 2 ) + poly( p_rail, 2 ) + poly( pil_sep, 2 ) + poly( maf, 2
2008 Jun 25
1
confidence bounds using contour plot
Hello I'm trying to calculate 2d confindence bounds into a scatterplot using the function "kde2d" (package MASS) and a contour plot. I found a similar post providing a solution - unfortunatly I do not realy understand which data I have to use to calculated the named "quantile": Post URL: http://tolstoy.newcastle.edu.au/R/help/03b/5384.html > (...) > >> Is
2012 Mar 03
2
contour for plotting confidence interval on scatter plot of bivariate normal distribution
Dear all, I created a bivariate normal distribution: set.seed(138813) n<-100 x<-rnorm(n); y<-rnorm(n) and plotted a scatterplot of it: plot(x,y) Now I'd like to add the 2D-standard deviation. I found a thread regarding plotting arbitrary confidence boundaries from Pascal H?nggi http://www.mail-archive.com/r-help at r-project.org/msg24013.html which cites the even older thread
2012 Apr 03
1
A contour plot question - vis.gam () function in "mgcv"
Hi, Please see the attached contour plot (I am sorry about the big file). This was created using the vis.gam() function in "mgcv" package. However, my question is somewhat broader. In generating this figure, I first created the contours using vis.gam() and then I plotted the points. These point are plotted on top of the contours so that some of the contour lines are only partially
2004 Dec 23
3
combination of scatterplot and image graph
Dear R users, I'm interested in a combination of a scatterplot and an image graph. I have two large vectors. Because in the scatterplot some areas are sparsely and others densely populated, I want to see the points, and I also want their color to be changed based on their density (similar to a heat map). Is there a function that can do that? Thank you, b.
2013 Jan 28
1
Adding 95% contours around scatterplot points with ggplot2
Hi all, I have been looking for means of add a contour around some points in a scatterplot as a means of representing the center of density for of the data. I'm imagining something like a 95% confidence estimate drawn around the data. So far I have found some code for drawing polygons around the data. These look nice, but in some cases the polygons are strongly influenced by outlying points.
2017 Oct 08
2
how to overlay 2d pdf atop scatter plot using ggplot2
Note: I have posted this on SO also but while the question has been upvoted, there has been no answer yet. https://stackoverflow.com/questions/46622243/ggplot-plot-2d-probability-density-function-on-top-of-points-on-ggplot Apologies for those who have seen it there also but I thought that this list of experts may have someone who knows the answer. I have the following example code:
2006 Nov 29
0
1D & 2D response plots from RSM models
Hello R experts I am looking for: - advice - sample commands - pointers in MASS 4E - packages That help to produce 1D and 2D response plots from quadratic RSM linear regression models that have been produced in R. Let me explain a little what I mean. For 1D plots I mean the variable range (either scaled or actual) on the X axis and the Y axis showing the model prediction (preferably with
2017 Oct 08
0
how to overlay 2d pdf atop scatter plot using ggplot2
Hi, I am no expert on ggplot2 and I do not know the answer to your question. I looked around a bit but could not find an answer right away. But one possibility could be, if a direct approach is not possible, to draw ellipses corresponding to the confidence regions of the multivariate t density and use geom_polygon to draw this successively? I will wait for a couple of days to see if there is a
2017 Oct 09
0
example of geom_contour() with function argument
Hi BFD, ?geom_contour() *does* have helpful examples. Your Google-foo is weak: Searching for geom_contour brought me: http://ggplot2.tidyverse.org/reference/geom_contour.html as the first result. HTH Ulrik On Mon, 9 Oct 2017 at 08:04 Big Floppy Dog <bigfloppydog at gmail.com> wrote: > Can someone please point me to an example with geom_contour() that uses a > function? The help
2017 Oct 09
2
example of geom_contour() with function argument
Can someone please point me to an example with geom_contour() that uses a function? The help does not have an example of a function, and also I did not find anything from online searches. TIA, BFD ----------------------------------------------------------------------------------------------- How about geom_contour()? Am So., 8. Okt. 2017, 20:52 schrieb Ranjan Maitra <maitra at
2013 Jan 02
0
follow up on teaching R to high school students
Some of you may recall that a few months ago I solicited advice and opinions on both R-help and R-sig-teaching about an "introduction to R" workshop I intended to present to a class of high school students enrolled in a 3-year longitudinal science research class. Much lively discussion ensued. Well, I did the workshop on 8 November, and thought I'd give some follow-up as to how it
2010 Sep 15
1
HDP and 99% contour lines
Dear all, I have a very simple question about how I can include HPD confidence lines in a Marginal posterior distribution scatterplot I have the following code to draw the scatterplot(s) from an output table; par(mfrow=c(2,2)) plot(temp1[,5], temp1[,6], xlab="log10(r)", ylab="log10(tf)", pch=46) plot(temp2[,5], temp2[,6],
2008 Mar 28
1
background color in scatterplots
Dear R community, I have a scatterplot with multiple vertical ablines. I wish to color each interval between two ablines in a different color... Could you please indicate me how to do this efficiently? Thank you! Georg. ******************** Georg Ehret Johns Hopkins Baltimore [[alternative HTML version deleted]]
2003 Oct 28
2
Confidence ellipse for correlation
Hello, SAS' point and click interface has the option of produce a scatterplot with a superimposed confidence ellipse for the correlation coefficient. Since I generally like R so much better, I would like to reproduce this in R. I've been playing with the ellipse package. In order to have the points and the ellipse on the same graph I've done the following. (Load ellipse
2017 Oct 09
0
example of geom_contour() with function argument
> On Oct 9, 2017, at 6:03 AM, Big Floppy Dog <bigfloppydog at gmail.com> wrote: > > Hello Ulrik, > > I apologize, but I can not see how to provide a pdf in place of the density > function which calculates a KDE (that is, something from the dataset in the > example). Can you please point to the specific example that might help? > > Here is what I get: > >
2004 Dec 01
1
Manipulating contour plots
Dear R users, I would like to create a filled.contour plot with colour bar and overlay a map. I need to create several of these representing variables with different spatial extents for comparison. When I try to fix the plot area size and axes limits as follows: par(fig=c(0,1.0,0.3125,1.0) filled.contour(x=seq((320/2)-180.5,(480/2)-180.5,len=nrow(oct94)),
2017 Oct 09
2
example of geom_contour() with function argument
Hello Ulrik, I apologize, but I can not see how to provide a pdf in place of the density function which calculates a KDE (that is, something from the dataset in the example). Can you please point to the specific example that might help? Here is what I get: require(mvtnorm) require(ggplot2) set.seed(1234) xx <- data.frame(rmvt(100, df = c(13, 13))) v <- ggplot(faithfuld, aes(waiting,