Sorry to disturb again the list subscribers,
but I fixed my problem, by simply using the c
operator:

x <- c(my.matrix[1,1:3])

Alessandro


* Alessandro Antonucci <[EMAIL PROTECTED]> [200706, 12:12]:
> I wrote a function f whose argument is an array
> 
> If I set
> 
> x <- c(5,1,2)
> 
> and I run f(x) everything works fine.
> 
> On the other hand, If I extract the same array
> from a matrix by:
> 
> x <- my.matrix[1,1:3]
> 
> such that the first three elements of the
> first row of my.matrix are exactly 5  1  2,
> something seems to work differently.
> 
> Any idea about that?
> 
> Thanks in advance,
> Alessandro
> 
> -- 
> ============================================================
> Alessandro Antonucci
> Dalle Molle Institute for Artificial Intelligence (IDSIA)
> at Idsia                      e-mail: [EMAIL PROTECTED]
> Galleria 2                    web:   idsia.ch/~alessandro
> Via Cantonale                 mobile:   +39 339-567-23-28
> CH-6928                               tel:       +41 58-666-66-69
> Manno - Lugano                        fax:       +41 58-666-66-61
> Switzerland                   skype: alessandro.antonucci
> 
> ______________________________________________
> [email protected] 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.

-- 
============================================================
Alessandro Antonucci
Dalle Molle Institute for Artificial Intelligence (IDSIA)
at Idsia                        e-mail: [EMAIL PROTECTED]
Galleria 2                      web:   idsia.ch/~alessandro
Via Cantonale                   mobile:   +39 339-567-23-28
CH-6928                         tel:       +41 58-666-66-69
Manno - Lugano                  fax:       +41 58-666-66-61
Switzerland                     skype: alessandro.antonucci

______________________________________________
[email protected] 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