All,
Can someone explain why this does not print the contents of x when I source
this file?
CoinTosses - function(n,print=TRUE) {
x - sample(c(0,1), n, replace=TRUE)
y - x
y[y==0] - T
y[y==1] - H
p - sum(x)/n
p
}
x - CoinTosses(40)
x
On the other hand, if I source this file:
On Fri, Aug 3, 2012 at 3:39 PM, darnold dwarnol...@suddenlink.net wrote:
All,
Can someone explain why this does not print the contents of x when I source
this file?
CoinTosses - function(n,print=TRUE) {
x - sample(c(0,1), n, replace=TRUE)
y - x
y[y==0] - T
y[y==1] - H
p -
PM
To: darnold
Cc: r-help@r-project.org
Subject: Re: [R] Printing contents of a variable
On Fri, Aug 3, 2012 at 3:39 PM, darnold dwarnol...@suddenlink.net wrote:
All,
Can someone explain why this does not print the contents of x when I source
this file?
CoinTosses - function(n
On 03-Aug-2012 20:46:56 R. Michael Weylandt wrote:
On Fri, Aug 3, 2012 at 3:39 PM, darnold dwarnol...@suddenlink.net wrote:
All,
Can someone explain why this does not print the contents of x when I source
this file?
CoinTosses - function(n,print=TRUE) {
x - sample(c(0,1), n,
4 matches
Mail list logo