On Tue, Jul 7, 2009 at 12:20 PM, David Winsemius<dwinsem...@comcast.net> wrote:
> It looks like you are printing a matrix and that you want to print all rows
> of the first column before all rows of the second column. Apply should do
> it. Assume the matrix is named "AA"
>
> apply(AA, c(2,1), cat, "\n")   # the \n is the line-feed character
>

I thought along these lines, too, but:

> AA
     [,1]                [,2]                    [,3]
[1,] "overallimpression" "yourinitialimpression" "managementprocess_as_ord"
[2,] 0.7440637           0.7270246               0.5550202
     [,4]
[1,] "userinterfacechangedisplayorder:It was very easy to use with
either option"
[2,] -0.4476622

[ remainder deleted ]

> apply(AA, c(2,1), cat, "\n")
Error in cat(list(...), file, sep, fill, labels, append) :
  argument 1 (type 'list') cannot be handled by 'cat'

This may give more information about what AA is:

> attributes(AA)
$dim
[1]  2 13

> is.matrix(AA)
[1] TRUE

 - Godmar

______________________________________________
R-help@r-project.org 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