שבוע טוב לכולם
rnormal <- function(n,mean=0,sd=1){
rnorm(as.list(match.call())[-1])
}
set.seed(2015)
rnormal(n=200,0,1)
[1] -1.5454484 -0.5283932 -1.0867588
rnormal <- function(n,mean=0,sd=1){
rnorm(mget(names(formals()),sys.frame(sys.nframe())))
}
set.seed(2016)
rnormal(n=200,0,1)
[1] -0.91474184 1.00124785 -0.05642291
set.seed(2016)
rnormal(n=1,0,1)
[1] -0.91474184 1.00124785 -0.05642291
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
\\\
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.