On Mon, Jul 30, 2012 at 04:11:40AM -0700, GiuseppeRicci wrote:
> Hi,
> 
> thank Petr for your help.
> I have implemented you code suggestion but there is another problem.
> It seems that the code:
> 
> for (i in 1:m){
>  Z[i,,]=table(occ, data_matrix[,i])
> }
> 
> don't charge any values in Z.
> Is there some error?

Hi.

I do not see an error in this part of the code, but there
may be an error in the context, in which this code is used.

Did you look at the value of table(occ, data_matrix[,i])
at the time, when the command is executed?

If the command 

  Z[i,,]=table(occ, data_matrix[,i])

does not stop with an error, then it does not change Z[i,,] if
Z[i,,] contains the values equal to table(occ, data_matrix[,i])
already before the command is executed. This may happen, for 
example, if you run the command twice.

Petr Savicky.

______________________________________________
R-help@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.

Reply via email to