Re: [R] newbie- how to add a row to a matrix

From: Simone Gabbriellini <ogabbrie_at_tin.it>
Date: Thu 18 Aug 2005 - 18:47:20 EST

thank you all

rbind solved my problems!!!

simone

Il giorno 18/ago/05, alle ore 00:34, Martin Lam ha scritto:

> # row bind
> a <- matrix(1:5)
> a
> a <- rbind(a, 6)
> a
>
> # column bind
> b <- matrix(1:5)
> b
> b <- cbind(b, 6:12)
> b
> b <- cbind(b, 13)
> b
>
> Hope this helps,
>
> Martin
>
>
> --- Simone Gabbriellini <ogabbrie@tin.it> wrote:
>
>
>> dear list,
>> if I have a matrix
>>
>> s<-matrix(1:5, ncol=5)
>>
>> how can I add another row with other data to that
>> matrix?
>>
>> thank you,
>> simone
>>
>> ______________________________________________
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>>
http://www.R-project.org/posting-guide.html
>>
>>
>
>
>
>
> __________________________________
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 18 19:01:40 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:28:38 EST