[R] Problem creation tensor
Petr Savicky
savicky at cs.cas.cz
Mon Jul 30 20:36:11 CEST 2012
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.
More information about the R-help
mailing list