similar to: Sort matrix with duplicate row names alphabetically by rowname

Displaying 20 results from an estimated 10000 matches similar to: "Sort matrix with duplicate row names alphabetically by rowname"

2009 May 27
3
Sort matrix by column 1 ascending then by column 2 decending
I've got a matrix with 2 columns and n rows. I need to sort it first by the values in column 1 ascending. Then for values which are the same in column 1, sort by column 2 decending. For example: 2 .5 1 .3 1 .5 3 .2 Goes to: 1 .5 1 .3 2 .5 3 .2 This is easy to do in spreadsheet programs but I can't seem to work out how to do it in R and haven't been able to find a solution anywhere.
2014 Mar 21
1
"ERROR: installing package indices failed" message when building my package?
Hey all, I'm currently trying to build an R package and don't really know what to make of the error message I'm getting. I couldn't find anything helpful online so hopefully somebody here can give me a couple of pointers. I see the following when I try to build: s$ R CMD build --verbose r_package_files/ Warning: unknown option '--verbose' * checking for file
2008 May 22
4
Sort output of dovecot -n alphabetically?
Is there a way? Postfix does this by default, and it makes it much less likely to miss/overlook a setting... If there is no way, any chance to modify it so that it does? Thanks for dovecot! Really looking forward to 1.1 release! -- Best regards, Charles
2008 Sep 17
3
using for variable as rowname
Is there a way to use the cycle variable for rowname? v=1:6 for (a in 1:3){ for (b in 4:5) { v=rbind(v,a.b=1) } } v This above obviously does not work, but I couldn't find out how to use a and b to construct a rowname like 14, 15, 24, 25. Thanks for the help. Balazs -- View this message in context: http://www.nabble.com/using-for-variable-as-rowname-tp19533203p19533203.html Sent from
2009 Mar 02
3
Error setting rowname if rowname currently NULL
Hi, My first post here and new to R so please bear with me (long time programmer though, helping a friend with some scripts). I've noticed a behaviour when using rownames() that I think is odd, wondering if I'm doing something wrong. To illustrate, say I create a very simple matrix (called fred): fred<-matrix(,4,2) It looks like this: [,1] [,2] [1,] NA NA [2,] NA NA
2019 Oct 08
2
[Bug 1369] New: ipset save|list -sorted sorts alphabetically instead of naturally
https://bugzilla.netfilter.org/show_bug.cgi?id=1369 Bug ID: 1369 Summary: ipset save|list -sorted sorts alphabetically instead of naturally Product: ipset Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P5 Component: default
2008 Oct 18
2
sorting matrix output alphabetically
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 than the results being sorted by frequency as below, that an alphabetical list would be generated. This
2006 May 20
3
Alphabetically sorted list pages + dynamic forms
Hey everyone, I''m new to RoR - how can I get my database content filtered by alphabet? Eg, on my php site now I use this format: http://www.scenepointblank.com/reviews/index.php?page=B How can I get this kind of functionality out of ruby? Also, how could I go about making a multiple select box of authors, then depending on how many you chose, the next page of the form displays a
2008 Oct 30
1
row.names(data.frame(matrixWithDimnames)) depends on first rowname being "" or not. (PR#13230)
Full_Name: Bill Dunlap Version: R version 2.9.0 Under development (unstable) (2008-10-29 r46795) OS: Linux Submission from: (NULL) (76.28.245.14) When data.frame() is given a matrix with rownames, then the type of the output row names depends on whether the first element of the input row names is "" or not. The other elements of the input row names don't affect things. E.g.,
2007 Jul 31
5
extract columns of a matrix/data frame
Hello all, I have a matrix whose column names look like a1 a2 b1 b2 b3 c1 c2 1 2 3 7 1 3 2 4 6 7 8 1 4 3 Now, I can have any number of a's. not just two as shown above and same goes for b's and c's. I need to extract all the a's columns and put them in another matrix, extract all b's columns and put them in some matrix
2009 Jul 09
1
Rpy not working after upgrade to R2.9.1
Hi, I'm running Ubuntu Jaunty, downloading R and Rpy from this repository: deb http://cran.uk.r-project.org/bin/linux/ubuntu jaunty/ When was automatically upgraded, Rpy (which should be downloaded from the same repository) seems to have stopped working. I've tried re-installing the python-rpy package manually. I get the following error when I try to import rpy: >>> import
2004 Jun 11
4
rownames of single row matrices
Hi I want to extract rows of a matrix, and preserve rownames even if only one row is selected. Toy example: R> a <- matrix(1:9,3,3) R> rownames(a) <- letters[1:3] R> colnames(a) <- LETTERS[1:3] R> a A B C a 1 4 7 b 2 5 8 c 3 6 9 Extract the first two rows: R> wanted <- 1:2 R> a[wanted,] A B C a 1 4 7 b 2 5 8 rownames come through fine. Now extract just
2004 Jul 27
1
library manual: documentation of funcs not alphabetically ordered
Hello everybody I'm putting finishing touches to a library, and have noticed that the .dvi file that R CMD check creates does not sort the functions in alphabetical order. I find this odd because I used the "tidy" routines in section 3.1 of the R-exts manual, which produce R code in which the functions are alphabetically ordered (and I performed R CMD check using the
2008 Jan 04
1
predict.lm removes rownames for a single row. Why?
predict.lm keeps row names when working from several rows in newdata, but always removes rowname from a single row. The rownames are removed by the line in predict.lm predictor <- drop(X[, piv, drop = FALSE] %*% beta[piv]) What is the reason for that decision? I usually want to retain the row names. tmp <- data.frame(x=1:4, y=c(1,3,2,5)) tmp.lm <- lm(y ~ x, data=tmp) tmp.new <-
2011 Apr 14
1
PSE5 actions in effects folder loosing alphabetical sort
Distro: Archlinux 2.6.38 Wine version: 1.3.17 (The system is fully updated) Code: Affected folder: ~/.wine/drive_c/users/Public/Application Data/Adobe/Photoshop Elements/5.0/Photo Creations/special effects/photo effects/CoffeShop Actions Code: Unaffected folders: ~/.wine/drive_c/users/Public/Application Data/Adobe/Photoshop Elements/5.0/Photo Creations/special effects/photo
2010 Aug 16
1
Combining values from a data.frame row with matrix rownames.
Hello, I am trying to iteratively build a build a panel of variables to discriminate between two groups. My starting position is a matrix of experimental data and I have a function that will work through all pairs of variables and produce sensitivities, specificities and p-values for each pair and write it to a file (above particular cut-offs). I have a second function that will read that file
2008 Sep 25
2
How to order some of my columns (not rows) alphabetically
Hello, I have a dataframe with 9 columns, and I would like to sort (order) the right-most eight of them alphabetiaclly, i.e.: ID1 ID2 F G A B C E D would become ID1 ID2 A B C D E F G Right now, I'm using this code: attach(data) data<-data.frame(ID1,ID2,data[,sort(colnames(data)[3:9])]) detach(data) but that's not very elegant. Ideally I could specify which columns to sort and
2013 Aug 08
6
[Bug 10074] New: rsync reorders --from-files alphabetically
https://bugzilla.samba.org/show_bug.cgi?id=10074 Summary: rsync reorders --from-files alphabetically Product: rsync Version: 3.0.6 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: nicholas.man at
2009 Jul 15
4
Extract pairs (rowname, columname) from a matrix where value is 0
Dear sir, I have a matrix like a<-matrix(c(0,2,0,4,0,6,5,8,0),nrow=3) colnames(a)<-c("F1","F2","F3") rownames(a)<-c("A1","A2","A3") a F1 F2 F3 A1 0 4 5 A2 2 0 8 A3 0 6 0 I want to extract all pairs (rownames, columnames) from which the value in the matrix is 0 The result should be something like this A1, F1 A2,
2010 Nov 29
1
Extracting selected rows from a matrix
Hi, I have matrix of 104 columns and 30000 rows (Each Row has rowname). I have 13 different  list of selected rownames (character) say 1000 each. Now I want to extract the all the columns according to the rownames in each the list. How can I do that in R ? 1 ) For a single list 2) For all the 13 list at a time  Regards, Pankaj Barah Department of Biology,  Norwegian University of