Displaying 5 results from an estimated 5 matches for "ikwsimmo".
Did you mean:
akwsimmo
2023 Aug 06
1
Stacking matrix columns
...4
> ## in painful and unnecessary detail as dim() should be used instead
> attr(x, "dim") <- NULL
> is.matrix(x)
[1] FALSE
> x
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
## well, you get it...
-- Bert
On Sat, Aug 5, 2023 at 5:21?PM Iris Simmons <ikwsimmo at gmail.com> wrote:
>
> You could also do
>
> dim(x) <- c(length(x), 1)
>
> On Sat, Aug 5, 2023, 20:12 Steven Yen <styen at ntu.edu.tw> wrote:
>
> > I wish to stack columns of a matrix into one column. The following
> > matrix command does it. Any other...
2023 Aug 06
1
Stacking matrix columns
...) should be used instead
> > attr(x, "dim") <- NULL
> > is.matrix(x)
> [1] FALSE
> > x
> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
>
> ## well, you get it...
>
> -- Bert
>
> On Sat, Aug 5, 2023 at 5:21?PM Iris Simmons <ikwsimmo at gmail.com> wrote:
> >
> > You could also do
> >
> > dim(x) <- c(length(x), 1)
> >
> > On Sat, Aug 5, 2023, 20:12 Steven Yen <styen at ntu.edu.tw> wrote:
> >
> > > I wish to stack columns of a matrix into one column. The following
>...
2023 Aug 06
1
Stacking matrix columns
...) should be used instead
> > attr(x, "dim") <- NULL
> > is.matrix(x)
> [1] FALSE
> > x
> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
>
> ## well, you get it...
>
> -- Bert
>
> On Sat, Aug 5, 2023 at 5:21?PM Iris Simmons <ikwsimmo at gmail.com> wrote:
> >
> > You could also do
> >
> > dim(x) <- c(length(x), 1)
> >
> > On Sat, Aug 5, 2023, 20:12 Steven Yen <styen at ntu.edu.tw> wrote:
> >
> > > I wish to stack columns of a matrix into one column. The following
>...
2023 Aug 06
1
Stacking matrix columns
...im") <- NULL
> > > is.matrix(x)
> > [1] FALSE
> > > x
> > [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> >
> > ## well, you get it...
> >
> > -- Bert
> >
> > On Sat, Aug 5, 2023 at 5:21?PM Iris Simmons <ikwsimmo at gmail.com> wrote:
> > >
> > > You could also do
> > >
> > > dim(x) <- c(length(x), 1)
> > >
> > > On Sat, Aug 5, 2023, 20:12 Steven Yen <styen at ntu.edu.tw> wrote:
> > >
> > > > I wish to stack columns of a m...
2023 Aug 06
2
Stacking matrix columns
You could also do
dim(x) <- c(length(x), 1)
On Sat, Aug 5, 2023, 20:12 Steven Yen <styen at ntu.edu.tw> wrote:
> I wish to stack columns of a matrix into one column. The following
> matrix command does it. Any other ways? Thanks.
>
> > x<-matrix(1:20,5,4)
> > x
> [,1] [,2] [,3] [,4]
> [1,] 1 6 11 16
> [2,] 2 7 12 17
> [3,]