Hi Joris,
sorry for the late response. But I was away for a couple of days. Apparently
i also did something wrong than.
Now both these loops are working as they suppose to.
Thanks again for all the help.
Assa
On Fri, Jul 9, 2010 at 17:05, Joris Meys jorism...@gmail.com wrote:
Could you
Hi Joris,
I guess i did it wrong again.
but your example didn't work either. I still get the error massage.
but replicate function just fine. I can even replicate the whole array
lines.
THX
Assa
On Thu, Jul 8, 2010 at 15:20, Joris Meys jorism...@gmail.com wrote:
Don't know what exactly
Could you elaborate?
Both
x - 1:4
set - matrix(nrow = 50, ncol = 11)
for(i in c(1:11)){
set[,i] -sample(x,50)
print(c(i,-, set), quote = FALSE)
}
and
x - 1:4
set - matrix(nrow = 50, ncol = 11)
for(i in c(1:50)){
set[i,] -sample(x,11)
print(c(i,-, set), quote =
Hello R users,
I'm trying to extract random samples from a big array I have.
I have a data frame of over 40k lines and would like to produce around 50
random sample of around 200 lines each from this array.
this is the matrix
ID xxx_1c xxx__2c xxx__3c xxx__4c xxx__5T xxx__6T xxx__7T
Don't know what exactly you're trying to do, but you make a matrix
with 11 columns and 50 rows, then treat it as a vector. On top of
that, you try to fill 50 rows/columns with 50 values. Off course that
doesn't work. Did you check the warning messages when running the
code?
Either do :
for(i in
5 matches
Mail list logo