Displaying 3 results from an estimated 3 matches for "rsidp".
Did you mean:
rsdp
2012 Oct 25
3
How generate random numbers from given vector???
I wanna generate random numbers from a vector...
for example number<-c(0,1,3,4,5,6,8)
so
rsidp<-function(x){
i=0
for (i in seq(1:x))
{y<-sample(number,x, replace=T)}
return(y)
}
so all random numbers have to be from vector "number";
so if I type rsidp(5)..... it has to give me 5 random numbers except 2,7,9
(because they are not in the vector "numbers"). help m...
2012 Oct 26
3
wanna create all points.....
Plz help me ;(( I lost 7 hours for thinking and doing this code ;( I need to
create points.....20 points(dots). All these dots have to be in one graph...
when i run this code....it gives me only one dote.....
number<- (0,2,3,4,5,6,8)
for (i in seq(1:20))
{rsidpVector=rsidp(i)
mean(rsidpVector)
plot (length(rsidpVector), mean(rsidpVector), ylab="sample mean", xlab=
"sample size")
}
rsidp<- function(x){
i+0
{y<-sample(number,x,replace = TRUE)}
return(y)
}
--
View this message in context: http://r.789695.n4.nabble.com/wanna-crea...
2012 Oct 26
1
Why my code does not draw? how to fix it? plz....
number<-c(0,1,3,4,5,6,8)
rsidp<-function(x){
i=0
{y<-sample(number,x,replace=TRUE)}
return(y)
}
plot(o, xlim=c(0,20), ylim(0,20), type="n", xlab="Sample size", ylab="Sample
variance")
for (i in seq(1:20)){
retVal=rsidp(i)
var(rsidpVector)
points (i, var(rsidpVector),pch=i,col=i)
}...