[R] Error : subscript out of bounds

David Winsemius dwinsemius at comcast.net
Sat Sep 10 22:38:01 CEST 2011


On Sep 10, 2011, at 4:33 PM, avinash barnwal wrote:

> Hi ,
>
> I appreciate ur help, i do my homework carefully but here the  
> problem is i m
> declaring a m as null matrix

Yes. That IS the problem.

> to be filled by columns not by rows and
> afterwards i m storing the values directly into the matrix and i had  
> gone
> through same above mentioned error in previous r-help queries.
>
> I am not understanding what is wrong in it?

Keep reading Weylandt's reply until the light dawns.

-- 
David.
>
> If we cant use matrix to store the 2D- array please advise some other
> technique to store values in 2D dynamically  that would be more  
> suitable for
> above algorithm .
>
> I am beginner in R.
>
> Thanx again
> -- 
> Avinash Barnwal
> Final year undergraduate student
> Statistics and informatics
> Department of Mathematics
> IIT Kharagpur
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list