Re: [R] R: cbind

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Mon 08 Aug 2005 - 20:55:19 EST

Clark Allan wrote:

> hi all
>
>
> are we able to combine column vectors of different lengths such that the
> result appears in matrix form?
>
> e.g.
>
> a=1
> b=1:3
> d=1:4
>
> then
>
> z=CBIND(a,b,d)
>
>
> 1 1 1
> 2 2
> 3 3
> 4
>
> i stil want the following!
> z[,1]=1
> z[,2]=1:3
> z[,3]=1:5
>
> i made up the name of this function. we could use "cbind" but it does
> not seem to allows this!

See my other message: You probably want a list.

If not, the sparce matrix classes provided by package Matrix might be worth considering.

Uwe Ligges

> thanking you in advance.
>
> /
> allan
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> 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



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 Mon Aug 08 21:00:10 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:08:58 EST