similar to: question on runif

Displaying 20 results from an estimated 10000 matches similar to: "question on runif"

2010 Jan 21
2
about loops
Hello ! I have a quick question about loops. For example, I have a 1 * 1 square and its inscribed circle tangent i, whose radius, of course, is also 1. The loop here is as the following: generate n points, say 5, in the square randomly repeatedly until we have five in total in the circle, then we stop, otherwise we continue. I do not know how ! Help me Please ~ Thank you very much for
2010 Jan 19
3
Help ~
Dear Helper: Thank you very much for your time on this question. It is a little long and complicated. Generate a clustered pattern in [0; 1]2 as follows: (a) Generate n, say 20, independent cluster centers (which can be called parents) that are distributed i.i.d. uniformly in the unit square; (b) then m,say 100, daughters are assigned i.i.d. uniformly to these parents and such that each
2012 Jun 02
2
Double-buffering problem, this time with an example.
Most of my animations that used to work on windows() version 2.11.1 and earlier now flash as if the double buffering is turned off or buffer swapping is triggered by other events than in the past. The simplified example below using symbols should illustrate the problem in a windows environment. windows() radius <- 8 n <- 6 ang <- seq(0,2*pi,length=n+1)[-(n+1)] ca <- cos(ang) sa
2006 Oct 07
1
random point in a circle centred in a geographical position
Dear List members I am trying to find a way to generate a random point in a circle centred in a geographical location. So far I have used the following formula (see code below): random_x = original_x + radius*cos(angle) random_y = original_y + radius*sin(angle) where radius is a random number between 0 and the radius of the circle and angle is between 0 and 360 degrees The code bellow works
2010 Jun 18
4
Drawing sample from a circle
Hi, I would like to draw 10 uniformly distributed sample points from a circle with redius one and centered at (0,0). Is there any R function to do that?   Thanks, [[alternative HTML version deleted]]
2003 Mar 31
3
monte carlo method for circle area
Hello everyone I hope Im not bothering you all again. I have just begun to use R and so Im not yet familiarized with it.. I ve got an assignment which consists in calculating the area of a circle given a certain radius and center using the monte carlo method, which means that I have to plot a circle given its parameters. Limit the area inside it...with as many sample points as possible...and
2017 Jun 14
3
draw stripes in a circle in R
> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > > I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is not your question, ask one. > -- > Sent from my phone. Please excuse my brevity. > > On June 14, 2017 7:57:41 AM PDT, jean-philippe <jeanphilippe.fontaine at
2017 Jun 14
4
[FORGED] Re: draw stripes in a circle in R
On 15/06/17 05:29, David Winsemius wrote: > >> On Jun 14, 2017, at 10:18 AM, David Winsemius <dwinsemius at comcast.net> wrote: >> >> >>> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >>> >>> I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is
2017 Jun 14
0
draw stripes in a circle in R
> On Jun 14, 2017, at 10:18 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >> >> I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is not your question, ask one. >> -- >> Sent from my
2017 Dec 31
0
Draw Overlapping Circles with shaded tracks
Another solution: library("HelpersMG") plot(0:10,type="n",axes=FALSE,xlab="",ylab="", asp=1) ellipse(center.x = 3, center.y = 5, radius.x = 5, radius.y = 5, lwd=10, col=NA, border=rgb(red = 1, green = 0, blue=0, alpha = 0.5)) ellipse(center.x = 8, center.y = 5, radius.x = 5, radius.y = 5, lwd=10, col=NA, border=rgb(red = 0, green = 1, blue=0, alpha =
2017 Dec 31
1
Draw Overlapping Circles with shaded tracks
Dear All: Thank you very much for all of you. I just have one more thing. Is there a way to fill the borders with small dots, may be different sizes. I tried to do it, but it looks ugly. Here what I tried: library(plotrix) plot(0:10, 0:10, type="n",axes=FALSE,xlab="",ylab="") #### 0:5, draw.circle(4,5,radius=3,border="#ff0000aa", lwd=75)
2017 Dec 31
2
Draw Overlapping Circles with shaded tracks
That code nees the plotrix package: library(plotrix) pdf("circles.pdf") plot(0:10,type="n",axes=FALSE,xlab="",ylab="") draw.circle(4,5,radius=3,border="#ff0000aa",lwd=10) draw.circle(6,5,radius=3,border="#0000ffaa",lwd=10) dev.off() On Friday, December 29, 2017, 6:06:32 PM EST, Jim Lemon <drjimlemon at gmail.com> wrote:
2008 Aug 15
6
continuous coloring of a polygon
R2.7.1, WinXP Hi, I have a polygon inside a circle as follows: radius <- 3 x <- seq(-radius,radius,length=2000) y <- sqrt(radius^2-x^2) xx <- c(x,-x) yy <- c(y,-y) plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type="l", ylab="", xlab="", axes=F) radius <- 2.7 x1 <- seq(-radius,radius,length=2000) y1 <- sqrt(radius^2-x1^2)
1998 Dec 01
2
read.table
Sorry to all bothering you with a trivial question: I am using R (rw0630 for Win32) and am simply unable to read-in the *.txt data. I've tried to copy the file (prum.txt) to different directories of rw0630 but get uniformly the answer "object "prum.txt" not found". Which is the default directory for read.table() ?? Thanks! Z. Skala ++++++++++++++++++++++ Zdenek Skala
2007 Jul 24
1
How to add circular text for a graph with concentric circles
Dear R experts, I am plotting the population of students who live in a city, and in successive circular bands made of the contiguous districts that surround the city. This is a stylized figure, where I specify the area of each successive circle based on the cumulative population of students. I want to compare two sets of concentric circles across different populations - such as 'All
2017 Jun 14
1
[FORGED] Re: draw stripes in a circle in R
Envoy? depuis mon appareil Samsung -------- Message d'origine -------- De : Rolf Turner <r.turner at auckland.ac.nz> Date : 14/06/2017 22:53 (GMT+01:00) ? : David Winsemius <dwinsemius at comcast.net> Cc : r-help at r-project.org Objet : Re: [R] [FORGED] Re:&nbsp; draw stripes in a circle in R On 15/06/17 05:29, David Winsemius wrote: > >> On Jun 14, 2017, at
2017 Jun 14
0
[FORGED] Re: draw stripes in a circle in R
> On Jun 14, 2017, at 1:53 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote: > > On 15/06/17 05:29, David Winsemius wrote: >>> On Jun 14, 2017, at 10:18 AM, David Winsemius <dwinsemius at comcast.net> wrote: >>> >>> >>>> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >>>>
2017 Jun 15
1
draw stripes in a circle in R
hi david Thank you very much for the hack of draw.circle that you proposed me. I don't understand some part of the code, why do you pass radius as a vector in the function (if I understand well the purpose of the for loop) ? Also what is ymult? If I set the radius to the value 0.85 as I wanted (so as a scalar), I don't see any difference in the result when I call this function
2017 Jun 15
2
[FORGED] Re: draw stripes in a circle in R
Sigh. I never load packages in .Rprofile to avoid the irreproducibility trap. Might seem drastic to some, but I don't feel much pain because I almost always edit my code in a file rather than on the fly at the console, and re-run it frequently from a fresh R process to check my progress. -- Sent from my phone. Please excuse my brevity. On June 14, 2017 3:27:15 PM PDT, David Winsemius
2006 Apr 22
4
how to draw a circle
how to draw a circle (e.g. radius=10cm) of one point? And how to choose these points in the circle? Thanks! [[alternative HTML version deleted]]