similar to: Select top three values from data frame

Displaying 20 results from an estimated 10000 matches similar to: "Select top three values from data frame"

2010 Jan 25
3
binary
Hi all Assume I have a data set xx; Group: 1=group1 ?, 2=group2 IQ: ?1= High, 0 =low fit <- glm(IQ ~group, data = xx, family = binomial()) summary(fit) Results ?????? ????????????Estimate Std. Error z value Pr(>|z|) (Intercept) -2.55456??? 0.210 -12.273? < 5e-16 *** group????????? 0.36180 ?????0.076?? 3.952 ????5.24e-05 *** the odd ratio = exp(0.36180 )= 1.435912 My question
2013 Mar 15
3
reviewer comment
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20130315/7300f19c/attachment.pl>
2009 Sep 09
2
How to sum and group data by DATE in data frame
Dear all, Lets say I have a data frame as follows: > Date <- as.Date(c('2006-08-23', '2006-08-30', '2006-09-06', '2006-09-13', '2006-09-20')) > Income <- c(73.79, 72.46, 76.32, 72.43, 72.62) > data.frame(Date, Income) Date Income 1 2006-08-23 73.79 2 2006-08-30 72.46 3 2006-09-06 76.32 4 2006-09-13 72.43 5 2006-09-20 72.62 >
2009 Sep 07
2
Averaging rows if a condition is true.
Dear All, I have matrix (50000 X 60) of subjects and their responses to a set of questions. All responses are classified into categories (500). I would like to average all subject's responses for each category. I wrote a code using a for loop but is not working. Could please tell me what's wrong with the code? I guess, there is a elegant R way of doing the same thing. Thanks in advance.
2010 May 05
2
t.test per line
Dear All, I apologize for this trivial question, I can not find the solution I try to use t.test function per line in the data.frame, But i dont'understand the error message my program is as follows group1<-gl(2,20) fun<-function(x){ m<-data.frame(group1,x) #anova(aov(x ~ group1, m)) t.est(x ~ group1,m) } ttest<- apply(data, 1, fun) Error in t.test.default(x = c(1, 1,
2009 Nov 11
2
Error in lm() function
Hi all, I wanted to have a seasonality study like whether a particular month has significant effect as compared to others. Here is my data : 0.10499 0 0 1 0 0 0 0 0 0 0 0 0.00259 0 0 0 1 0 0 0 0 0 0 0 -0.06015 0 0 0 0 1 0 0 0 0 0 0 0.10721 0 0 0 0 0 1 0 0 0 0 0 0.03597 0 0 0 0 0 0 1 0 0 0 0 0.10584 0 0 0 0 0 0 0 1 0 0 0 0.02063 0 0 0 0 0 0 0 0 1 0 0 -0.03509 0 0 0 0 0 0 0 0 0 1 0 -0.03485 0 0 0
2011 May 25
1
transpose ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110525/acc78a27/attachment.pl>
2010 May 25
4
R eat my data
HI, Dear R community, My original file has 1932 lines, but when I read into R, it changed to 1068 lines, how comes? cdu@nuuk:~/operon$ wc -l id_name_gh5.txt 1932 id_name_gh5.txt > gene_name<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t", skip=0, header=F, fill=T) > dim(gene_name) [1] 1068 3 -- Sincerely, Changbin -- Changbin Du DOE Joint Genome
2010 Feb 17
2
Is the aggregate function the best way to do this?
Hi, I''m having a dataframe ''Subset1'' with a number of factor variables and 160 numerical variables Now I want to make sums for all rows that have the same values for the different factor variables, except for the factor variables: VAR1,VAR2,VAR3 who may have the same values. With the formula given below this works great, but in a situation with 15000 rows and 13
2010 Apr 30
3
Find solution for an error in the condition of if
Dear r-help, Could you help me to find a solution for this error: Il y a eu 50 avis ou plus (utilisez warnings() pour voir les 50 premiers) > warnings() Messages d'avis : 1: In if ((data[pa, k] == df[, j]) & (data[ch, k] == i)) { ... : la condition a une longueur > 1 et seul le premier élément est utilisé 2: In if ((data[pa, k] == df[, j]) & (data[ch, k] == i)) { ... : la
2010 Apr 14
6
sum specific rows in a data frame
I have a data frame called "pose": DESCRIPTION QUANITY CLOSING.PRICE 1 WHEAT May/10 1 467.75 2 WHEAT May/10 2 467.75 3 WHEAT May/10 1 467.75 4 WHEAT May/10 1 467.75 5 COTTON NO.2 May/10 1 78.13 6 COTTON NO.2 May/10 3 78.13 7 COTTON NO.2 May/10 1 78.13
2012 Feb 28
6
Cleaning up messy Excel data
Unfortunately, some data I need to work with was delivered in a rather messy Excel file. I want to import into R and clean up some things so that I can do my analysis. Pulling in a CSV from Excel is the easy part. My current challenge is dealing with some text mixed in the values. i.e. 118 5.7 <2.0 3.7 Since this column in Excel has a "<2.0" value, then R reads the
2010 Feb 16
2
Error of Stepwise Regression with number of rows in use has changed: remove missing values?
Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + ?: ??number of rows in use has changed: remove missing values?
2009 Aug 26
6
Managing output
Hi, Is there a way to build up a vector, item by item. In perl, we can "push" an item onto an array. How can we can do this in R? I have a loop that generates values as it goes. I want to end up with a vector of all the loop results. In perl it woud be: for(item in list){ result <- 2*item^2 (Or whatever formula, this is just a pseudo example) Push(@result_list,
2011 May 25
2
Fwd: transpose ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110525/4926c5ee/attachment.pl>
2009 Sep 03
2
Easy way to get top 2 items from vector
Hi, I use the max function often to find the top value from a matrix or column of a data.frame. Now I'm looking to find the top 2 (or three) values from my data. I know that I could sort the list and then access the first two items, but that seems like the "long way". Is there some way to access "max_2" or similar? Thanks! -- Noah
2010 Jun 01
4
Plot multiple columns
I'm running a long MCMC chain that is generating samples for 22 variables. I have each run of the chain as a row in a matrix. So: Chain[,1] is the column with all the samples for variable one. Chain[,2] is the column with all the samples for variable 2, etc. I'd like to fit all 22 on a single page to print a nice summary. It is OK if the graphs are small, I just need to show the
2010 May 30
1
Building a list
Hello, I need to build a "list of lists" We have 20 groups we are generating MCMC samples for. There are 10 coefficients, and 10000 MCMC iterations. I would like to store each iteration by-group in a list. My problem is with the first iteration. Here is a toy example: Chain <- list() for (j in 1:10000){ coef <- c(1,2,3,4,5,6,7,8,9,10) #would be actual MCMC samples
2011 Dec 15
1
Multicollinearty in logistic regression models
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20111215/d9983681/attachment.pl>
2010 May 31
1
Comparing multiple columns in matrix
We're running Monte Carlo repeated measures for several groups. The goal is to determine the number of time each group has the highest score. A toy example: [,1] [,2] [,3] 0.1 0.2 0.3 0.1 0.2 0.3 0.1 0.2 0.3 0.1 0.3 0.2 0.1 0.3 0.2 0.2 0.3 0.1 For this example: group 1 was the top 0 times, group 2 was the top 3 times., group 3 was the top 3 times I can do