Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> project.org] On Behalf Of Bob Green
> Sent: Saturday, October 18, 2008 3:59 AM
> To: r-help@r-project.org
> Subject: [R] sorting matrix output alphabet
Do you mean sort by the *names* of a *vector* alphabetically? (tot is a
vector)? In which case tot[sort.list(names(tot))]
If you want to sort new.matrix by its *colnames* of new.matrix,
new.matrix[, sort.list(colnames(new.matrix))]
See 'An Introduction to R' for the ideas involved, and the help
Hello,
I have been using the TM package to create a TermDocMatrix, which I
have saved as a matrix so that I can view word frequencies. Below is
a section of the code that I have used and an excerpt of the output:
What I wanted to be able to do is to view the output alphabetically -
rather t
3 matches
Mail list logo