[R] artificial data matrix with 100000 rows

2007-09-09 Thread kevinchang
Hi guys, I tried to made the matrix with this size by either matrix() or array(). However, there seems to be default limit of number for rows made. I got sort of error message from R .To be specific, m--matrix(ncol=3,nrow=10) error message:[ reached getOption(max.print) -- omitted 7

[R] loop execution problem

2007-09-09 Thread kevinchang
This is bizzare. The for loop I set seems to go infinitly because the hourglass cursor never disappers and I never get the result. But when I click on X of the window try to exit R, the execution finishes right after I abort exiting when RGui asks me to save the workplace or not. Please help

[R] remove particular elements in a vector

2007-09-07 Thread kevinchang
Hi, Is there any build-in function allowing us to remove a particular group of elements in a vector? For example, if I want to remove all the NA in the output of answer function . Please help. Thanks answer(100) [1] 1 2 NA 4 NA NA 7 8 NA NA 11 NA 13 14 NA 16 17 NA 19 NA NA 22 23 NA