Re: [R] Ranking

2015-11-15 Thread Bert Gunter
t; and added the fill= argument I mentioned before. > > > > David > > > > Original message > From: Ashta > Date: 11/14/2015 6:40 PM (GMT-06:00) > To: David L Carlson > Cc: R help > Subject: Re: [R] Ranking > > Thank you David, > &

Re: [R] Ranking

2015-11-15 Thread David L Carlson
I used your code but deleted sep="\t" since there were no tabs in your email and added the fill= argument I mentioned before. David Original message From: Ashta Date: 11/14/2015 6:40 PM (GMT-06:00) To: David L Carlson Cc: R help Subject: Re: [R] Ranking Thank

Re: [R] Ranking

2015-11-14 Thread Ashta
gt; USA 1 2 3 > > I'll let you figure out how to get the last column. > > David L. Carlson > Department of Anthropology > Texas A&M University > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ashta > Sent: Saturday

Re: [R] Ranking

2015-11-14 Thread David L Carlson
ssage- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ashta Sent: Saturday, November 14, 2015 4:28 PM To: R help Subject: [R] Ranking Hi all, I have the following raw data some records don't have the second variable. test <- read.table(textConnection(" Country STATUS

[R] Ranking

2015-11-14 Thread Ashta
Hi all, I have the following raw data some records don't have the second variable. test <- read.table(textConnection(" Country STATUS USA USAW USAW GER GERW GERw GERW UNKW UNK UNKW FRA FRA FRAW FRAW FRAW SPA SPAW SPA "),header = TRUE, sep= "

Re: [R] ranking a vector in R

2012-06-21 Thread Prof Brian Ripley
On 21/06/2012 07:24, Petr Savicky wrote: On Thu, Jun 21, 2012 at 12:24:47AM +0200, Jessy wrote: Hello, May someone help me with how in R I can rank a vector from highest to lowest. i.e rank 1 (smallest rank) is given to the highest value instead of the usual way that it get's the highest rank

Re: [R] ranking a vector in R

2012-06-21 Thread arun
Hi, > dat<-c(5,4,3,12,15) > rank(-dat) [1] 3 4 5 2 1 > rank(dat) [1] 3 2 1 4 5 A.K. - Original Message - From: Jessy To: r-help@r-project.org Cc: Sent: Wednesday, June 20, 2012 6:24 PM Subject: [R] ranking a vector in R Hello, May someone help me with how in R I can r

Re: [R] ranking a vector in R

2012-06-21 Thread Christian Brechbühler
On Wed, Jun 20, 2012 at 6:24 PM, Jessy wrote: > May someone help me with how in R I can rank a vector from highest to > lowest. i.e rank 1 (smallest rank) is given to the highest value instead > of the usual way that it get's the highest rank. > How about rank(-v), e.g., > > rank(-c(3,1,4,6,5)

Re: [R] ranking a vector in R

2012-06-20 Thread Petr Savicky
On Thu, Jun 21, 2012 at 12:24:47AM +0200, Jessy wrote: > Hello, > > > May someone help me with how in R I can rank a vector from highest to > lowest. i.e rank 1 (smallest rank) is given to the highest value instead > of the usual way that it get's the highest rank. Hello: Try x <- c(3, 2, 4

Re: [R] ranking a vector in R

2012-06-20 Thread Jorge I Velez
Hi Jessy, ?sort ?rank will be a good starting point. HTH, Jorge.- On Wed, Jun 20, 2012 at 6:24 PM, Jessy wrote: > Hello, > > > May someone help me with how in R I can rank a vector from highest to > lowest. i.e rank 1 (smallest rank) is given to the highest value instead > of the usual way

[R] ranking a vector in R

2012-06-20 Thread Jessy
Hello, May someone help me with how in R I can rank a vector from highest to lowest. i.e rank 1 (smallest rank) is given to the highest value instead of the usual way that it get's the highest rank. Regards, Jessy [[alternative HTML version deleted]] __

Re: [R] Ranking submodels by AIC (more general question)

2011-06-23 Thread Alexandra Thorn
Thanks for the suggestion. Those functions only provide part of the functionality I want. After a great deal more of drawing the internet, I've concluded that the correct answer to my question is dredge() from the package MuMIn. It seems to use the same AIC algorithm as AIC, which is perfect f

Re: [R] Ranking submodels by AIC (more general question)

2011-06-23 Thread Jan van der Laan
Alexandra, Have a look at add1 and drop1. Regards, Jan On 06/23/2011 07:32 PM, Alexandra Thorn wrote: Here's a more general question following up on the specific question I asked earlier: Can anybody recommend an R command other than mle.aic() (from the wle package) that will give back a ran

[R] Ranking submodels by AIC (more general question)

2011-06-23 Thread Alexandra Thorn
Here's a more general question following up on the specific question I asked earlier: Can anybody recommend an R command other than mle.aic() (from the wle package) that will give back a ranked list of submodels? It seems like a pretty basic piece of functionality, but the closest I've been able

Re: [R] Ranking correlation with R

2010-04-15 Thread Peter Ehlers
On 2010-04-14 16:04, David Nemer wrote: Hello Guys, thank you all very much for the help! Sorry for my total lack of knowledge in R... so I did the correlation.. and got these results: cor(A, C, method = "spearman") [1] 0.4922165 cor(B, C, method = "spearman") [1] 0.1922412 cor(A, B, method =

Re: [R] Ranking correlation with R

2010-04-14 Thread David Nemer
Hello Guys, thank you all very much for the help! Sorry for my total lack of knowledge in R... so I did the correlation.. and got these results: > cor(A, C, method = "spearman") >[1] 0.4922165 > cor(B, C, method = "spearman") >[1] 0.1922412 > cor(A, B, method = "spearman") > [1] -0.00889328 I do

Re: [R] Ranking correlation with R

2010-04-10 Thread Gabor Grothendieck
Try this: > A <- c("file1.java", "file3.java", "file2.java") > B <- c("file2.java", "file4.java", "file1.java") > cor(A, B, method = "spearman") [1] 0.5 On Fri, Apr 9, 2010 at 11:22 AM, David Nemer wrote: > Hey Everyone, > > Im fresh new in R, and Im supposed to write a code to give me a correl

Re: [R] Ranking correlation with R

2010-04-10 Thread Jim Lemon
On 04/10/2010 01:22 AM, David Nemer wrote: Hey Everyone, Im fresh new in R, and Im supposed to write a code to give me a correlation between two rankings. So I have two ranking lists, which contain file names, e.g.: Ranking list 1: file1.java file3.java file2.java Ranking list 2: fiile2.java f

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
On Fri, Apr 9, 2010 at 10:23 AM, David Nemer wrote: > Would that also work if in one ranking I have a filename that it is not in > the other ranking? match() will return an NA, if it cannot find a match, in which case you could use the argument: use="pairwise.complete.obs") in cor() to have it on

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
>> cor() requires numeric data.  To use it in this case, you would need >> to come up with rankings based on the position for each file name, and >> use those pairs of numbers with cor(). > > One possible source for such numbers would be row.names(dfrm) since by > default (assuming they are in a da

Re: [R] Ranking correlation with R

2010-04-09 Thread David Winsemius
On Apr 9, 2010, at 12:14 PM, Joshua Wiley wrote: On Fri, Apr 9, 2010 at 8:58 AM, David Nemer wrote: Hello Joshua, Thanks for your help. The ranking list doesn't have numbers (it doesn't matter the name of the file), just the file name, and the ranking is assumed base on the position of t

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
On Fri, Apr 9, 2010 at 8:58 AM, David Nemer wrote: > Hello Joshua, > Thanks for your help. The ranking list doesn't have numbers (it doesn't > matter the name of the file), just the file name, and the ranking is assumed > base on the position of the file name in the list (so the first filename to

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
Dear David, Are the rankings the numbers? Like List 1: 1 3 2 If so you should be able to do it fairly easily with cor() If you have a lot of file names and need to extract the numbers look at ?strsplit or ?substring. This will be easier or harder depending how variable the names are. For

[R] Ranking correlation with R

2010-04-09 Thread David Nemer
Hey Everyone, Im fresh new in R, and Im supposed to write a code to give me a correlation between two rankings. So I have two ranking lists, which contain file names, e.g.: Ranking list 1: file1.java file3.java file2.java Ranking list 2: fiile2.java file4.java file1.java I need to see how much

[R] ranking the results of a questionnaire

2008-11-28 Thread Wolfgang Lindner
dear experts, I reproduced an experiment (questionnaire) some times. The result of the experiment is a vector of 5 factors, say (A,B,C,D,E). In the original article the result is given in 5 pairs of mean and stDev for A .. E, e.g. mean_A=37.4 and sd_A=8.1. The interval for A,B,C,D,E values is 0..5