similar to: Drawing sample from a circle

Displaying 20 results from an estimated 9000 matches similar to: "Drawing sample from a circle"

2006 Oct 15
4
Hide line ends behind unfilled circles?
Dear r-helpers, xx <- c(0.000, 0.210, 0.714, 0.514, 1.000, 0.190, 0.590, 0.152) yy <- c(0.000, 0.265, 0.256, 0.521, 0.538, 0.761, 0.821, 1.000) aa <- c(19, 19, 19, 21, 19, 21, 21, 21) x0 <- xx[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)] y0 <- yy[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)] x1 <- xx[c(2, 3, 3, 4, 6, 4, 5, 5, 6, 7, 7, 7, 8, 8)] y1 <- yy[c(2, 3, 3, 4, 6, 4, 5,
2010 Sep 08
6
'par mfrow' and not filling horizontally
Greetings, Folks. I'd appreciate being shown the way out of this one! I've been round the documentation in ever-drecreasing circles, and along other paths, without stumbling on the answer. The background to the question can be exemplified by the example (no graphics window open to start with): set.seed(54321) X0 <- rnorm(50) ; Y0 <- rnorm(50)
2010 Apr 20
1
"some problems"
An embedded and charset-unspecified text was scrubbed... Name: nem el?rhet? URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100420/33e1cc15/attachment.pl>
2009 Mar 24
3
confidence interval or error of x intercept of a linear regression
Hello all, This is something that I am sure has a really suave solution in R, but I can't quite figure out the best (or even a basic) way to do it. I have a simple linear regression that is fit with lm for which I would like to estimate the x intercept with some measure of error around it (confidence interval). In biology, there is the concept of a developmental zero - a temperature under
2009 Feb 05
3
"open-ended" plot limits?
Hi Folks, Maybe I've missed it already being available somehow, but if the following isn't available I'd like to suggest it. If you're happy to let plot() choose its own limits, then of course plot(x,y) will do it. If you know what limits you want, then plot(x,y,xlim=c(x0,x1),ylim(y0,y1) will do it. But sometimes one would like to a) make sure that (e.g.) the y-axis has a
2009 Feb 04
1
igraph: error when setting size and shape of vertices
When the shape of all vertices is set to "square" and the size of the vertices is also set, one get following error (commands attached): Error in l[[which.min(sapply(l, function(p) (p[1] - x0)^2 + (p[2] - y0)^2))]] : attempt to select less than one element Is there a way to solve this problem? Robbie ## Load the igraph package library(igraph) ## Create and plot a small graph
2010 Nov 20
1
Grid newbie: aligning & scaling viewports
Oh Knowledgeable Ones: I'm working on a project using grid graphics (for the first time). A toy example is given below, run it simply with >foobar() I am wondering why the pink dot and concentric circles are not centered on the 3-color axis system. Further, I feel like the concentric circles don't have the intended radius - if my math is right, the outmost circle should touch the
2009 Jun 19
1
Drawing dendrogram
Dear all, I would like to draw a dendrogram and mark some parts/branches (by using "segments") including their labels. If I draw it without specifying the length of x axix, I am able to do that (as in My dendrogram 1 of the following codes). However, if I want to specify the x axix, I am not able to draw marking line (by using "segments") including labels (as in My dendrogram
2004 Feb 09
10
PhD student reading list, suggestions wanted
I've got a PhD student starting this year. She'll be working on data mining. She has asked for a reading list while she's still in her home country, which is a really good sign. Her cosupervisor and I don't (think we) have any problem with choosing things that are specifically about data mining, but there are some statistical ideas (sampling, exploratory-vs-confirmatory,
2010 May 03
3
how to rewrite this for loops in matrix form without loop
x0=rnorm(100) y0=rpois(100,3)+1 ind=as.data.frame(table(y0)) ind1=ind[,1] ind2=ind[,2] phi=NULL for (i in 1:length(ind2)){ phi[i]=sum(x0[y0==ind1[i]])/ind2[i] } [[alternative HTML version deleted]]
2005 Jun 15
3
how to plot density distribution with a arrow pointer?
Hi all, for example: > X<- rnorm(1000) > X0 <- 0.899 I want to draw a density distribution plot with a arrow pointer indicating the position of X0, meanwhile, giving out the p-value. any functions? Thanks very much.
2010 Aug 24
2
Comparing/diffing strings
Hi all, all.equal is generally very useful when you want to find the differences between two objects. It breaks down however, when you have two long strings to compare: > all.equal(a, b) [1] "1 string mismatch" Does any one know of any good text diffing tools implemented in R? Thanks, Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice
2017 Oct 24
3
draw a circle with a gradient fill
Hi all,I would like to draw a simple circle where the color gradient follows the rule color = 1/(r^2) where r is the distance from the circle. I would also like to add a color bar with values going from -40 to -110 (and associate those with the color gradient that fills the circle). So far I experiemented with draw circle
2008 Feb 09
2
shortest distance between two point pattern
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080208/bf7b4696/attachment.pl
2008 Feb 16
1
Evaluate function on a grid
I have a function in R^2, say f <- function(x,y) { ...skipped } I want to plot this function using contour, persp. wireframe, etc. I know that the function has a global minimum at (x0, y0) The naive approach is to evaluate the function on the outer product of two arrays, like this: sx <- c(seq(-3, x0, len = 100), seq(x0, 3, len = 100)[-1]) sy <- c(seq(-3, y0, len = 100), seq(y0, 3,
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
Hello dear members of R-help and R-core mailing list, I am not sure if this request is a "ticket" that should be filled somewhere outside the mailing list. If so, I apologize for not doing and would like to know where I should have filled it. And to the subject matter: I would like to use a command like this: plot(c(1,8), 1:2, type="n") polygon(1:7, c(2,1,2,NA,2,1,2),
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
Hello dear members of R-help and R-core mailing list, I am not sure if this request is a "ticket" that should be filled somewhere outside the mailing list. If so, I apologize for not doing and would like to know where I should have filled it. And to the subject matter: I would like to use a command like this: plot(c(1,8), 1:2, type="n") polygon(1:7, c(2,1,2,NA,2,1,2),
2009 Oct 02
1
suggest enhancement to segments and arrows to facilitate horizontal and vertical segments
I suggest a simple enhancement to segments() and arrows() to facilitate drawing horizontal and vertical segments -- set default values for the second x and y arguments equal to the first set. This is handy, especially when the expressions for coordinates are long. Compare: Segments: < function (x0, y0, x1 = x0, y1 = y0, col = par("fg"), lty = par("lty"), --- > function
2017 Jun 19
1
arrows: no vectors for "code" and "angle" parameters
I was teaching new R users to make some fun graphs. I had some arrows examples worked up we came across a problem. The arrows function ignores 2nd and following elements of vectors given as code an angle. Would you please consider 1) allowing vectors for code and angle, or 2) returning an error or warning when user mistakenly supplies a vector for those parameters? When code like this is
2004 Feb 10
2
How to compute the minimal distanct between a point and curve in N-dim space
Dear All, In the N-dimensional space, give a data point A and a curve f, how to write the explicit expression for calculating the minimal distance between A and f? Or have to use some nonlinear optimization method to calcualte it? Thanks for your point. Fred [[alternative HTML version deleted]]