Re: [R] uniform number

2014-05-05 Thread Rolf Turner

On 05/05/14 17:05, Ragia Ibrahim wrote:


Dear group,
How to generate  uniform probability choosing p to be 2% and 5%, in separate 
trials for 100 times.


No idea WTF you are talking about.  Can you formulate a question that is 
comprehensible to the human mind?


cheers,

Rolf Turner

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] uniform number

2014-05-05 Thread Kehl Dániel
Maybe you thought the binomial distribution?

see
?rbinom

best,
kd

Feladó: r-help-boun...@r-project.org [r-help-boun...@r-project.org] ; 
meghatalmaz#243;: Rolf Turner [r.tur...@auckland.ac.nz]
Küldve: 2014. május 5. 9:27
To: Ragia Ibrahim
Cc: r-help@r-project.org
Tárgy: Re: [R] uniform number

On 05/05/14 17:05, Ragia Ibrahim wrote:

 Dear group,
 How to generate  uniform probability choosing p to be 2% and 5%, in separate 
 trials for 100 times.

No idea WTF you are talking about.  Can you formulate a question that is
comprehensible to the human mind?

cheers,

Rolf Turner

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] uniform number

2014-05-05 Thread Suzen, Mehmet
WTF?

Is that a R package from you?



On 5 May 2014 09:27, Rolf Turner r.tur...@auckland.ac.nz wrote:
 On 05/05/14 17:05, Ragia Ibrahim wrote:


 Dear group,
 How to generate  uniform probability choosing p to be 2% and 5%, in
 separate trials for 100 times.


 No idea WTF you are talking about.  Can you formulate a question that is
 comprehensible to the human mind?

 cheers,

 Rolf Turner

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] uniform number

2014-05-05 Thread Suzen, Mehmet
That paper you cite is about Social networks. You may want to use
igraph or sna packages

On 5 May 2014 10:54, Ragia Ibrahim ragi...@hotmail.com wrote:
 thanks for replying

 in the following paper
 http://www.cs.cornell.edu/home/kleinber/kdd03-inf.pdf
 page 6 third paragraph


 the author writes:
 assigned a uniform probability of p to each edge of the graph, choosing p
 to be 1% and 10%
 in separate trials.


 how to use R function to get such probability ?
 Regards

 Date: Mon, 5 May 2014 10:12:49 +0200
 Subject: Re: [R] uniform number
 From: msu...@gmail.com
 To: r.tur...@auckland.ac.nz
 CC: ragi...@hotmail.com; r-help@r-project.org

 WTF?

 Is that a R package from you?



 On 5 May 2014 09:27, Rolf Turner r.tur...@auckland.ac.nz wrote:
  On 05/05/14 17:05, Ragia Ibrahim wrote:
 
 
  Dear group,
  How to generate uniform probability choosing p to be 2% and 5%, in
  separate trials for 100 times.
 
 
  No idea WTF you are talking about. Can you formulate a question that is
  comprehensible to the human mind?
 
  cheers,
 
  Rolf Turner
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
  http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] uniform number

2014-05-05 Thread Rolf Turner



Please keep responses on-list unless there are compelling reasons not to.

It is still not clear what you want to do.  You *might* want to assign
probabilities to the edges of a graph where these probabilities are 
uniformly (and independently) distributed on the interval [0.01, 0.10].


This could be done by

probs - runif(n,0.01,0.10)

where n is the number of edges.  See ?runif.

You *might* want to assign probabilities either 0.01 or 0.10 to each 
edge of the graph, each probability being chosen with probability 0.5 
(???).  This could be done by


probs - sample(c(0.01,0.10),n,TRUE).

You really need to learn something about R if you are going to use R.
Start with An Introduction to R available (under Manuals) from the R 
web site.


You also need to learn to express yourself clearly and unambiguously. 
Do not expect your readers to be telepathic.


cheers,

Rolf Turner

On 05/05/14 19:41, Ragia Ibrahim wrote:


thanks for replying
in the following paper
http://www.cs.cornell.edu/home/kleinber/kdd03-inf.pdf
page 6 third paragraph


the author writes:
assigned a uniform probability of p to each edge of the graph, choosing
p to be 1% and 10%
in separate trials.


how to use R function to get such probability ?
Regards


  Date: Mon, 5 May 2014 19:27:43 +1200
  From: r.tur...@auckland.ac.nz
  To: ragi...@hotmail.com
  CC: r-help@r-project.org
  Subject: Re: [R] uniform number
 
  On 05/05/14 17:05, Ragia Ibrahim wrote:
  
   Dear group,
   How to generate uniform probability choosing p to be 2% and 5%, in
separate trials for 100 times.
 
  No idea WTF you are talking about. Can you formulate a question that is
  comprehensible to the human mind?


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] uniform number

2014-05-05 Thread Boris Steipe
... or this could mean to accept or reject an edge with p = 0.01 or 0.1 in 
which case you *might* use rbinom() as in

n - 100   # number of edges
p - 0.27  # desired probability
rbinom(n,1,p)
  [1] 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1  ... etc.

B.

On 2014-05-05, at 5:19 AM, Rolf Turner wrote:

 
 
 Please keep responses on-list unless there are compelling reasons not to.
 
 It is still not clear what you want to do.  You *might* want to assign
 probabilities to the edges of a graph where these probabilities are uniformly 
 (and independently) distributed on the interval [0.01, 0.10].
 
 This could be done by
 
 probs - runif(n,0.01,0.10)
 
 where n is the number of edges.  See ?runif.
 
 You *might* want to assign probabilities either 0.01 or 0.10 to each edge of 
 the graph, each probability being chosen with probability 0.5 (???).  This 
 could be done by
 
 probs - sample(c(0.01,0.10),n,TRUE).
 
 You really need to learn something about R if you are going to use R.
 Start with An Introduction to R available (under Manuals) from the R web 
 site.
 
 You also need to learn to express yourself clearly and unambiguously. Do not 
 expect your readers to be telepathic.
 
 cheers,
 
 Rolf Turner
 
 On 05/05/14 19:41, Ragia Ibrahim wrote:
 
 thanks for replying
 in the following paper
 http://www.cs.cornell.edu/home/kleinber/kdd03-inf.pdf
 page 6 third paragraph
 
 
 the author writes:
 assigned a uniform probability of p to each edge of the graph, choosing
 p to be 1% and 10%
 in separate trials.
 
 
 how to use R function to get such probability ?
 Regards
 
 
  Date: Mon, 5 May 2014 19:27:43 +1200
  From: r.tur...@auckland.ac.nz
  To: ragi...@hotmail.com
  CC: r-help@r-project.org
  Subject: Re: [R] uniform number
 
  On 05/05/14 17:05, Ragia Ibrahim wrote:
  
   Dear group,
   How to generate uniform probability choosing p to be 2% and 5%, in
 separate trials for 100 times.
 
  No idea WTF you are talking about. Can you formulate a question that is
  comprehensible to the human mind?
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.