Re: [R] Summary Table for Quantile Regression for Complex Survey

2019-07-16 Thread Mavra Ahmed
ace it here? Thanks for your help, Mavra From: Koenker, Roger W Sent: July 16, 2019 11:37:54 AM To: Mavra Ahmed Cc: r-help@r-project.org Subject: Re: [R] Summary Table for Quantile Regression for Complex Survey try summary(newer, se = �nid�) Roger Koenker

Re: [R] Summary Table for Quantile Regression for Complex Survey

2019-07-16 Thread Koenker, Roger W
try summary(newer, se = “nid”) Roger Koenker r.koen...@ucl.ac.uk Department of Economics, UCL London WC1H 0AX. On Jul 16, 2019, at 2:46 AM, Mavra Ahmed mailto:mavz.ah...@utoronto.ca>> wrote: Hello All, I am running quantile regression for a complex survey

Re: [R] summary function did not work with multcomp with 27 comparisons

2018-11-11 Thread Michael Dewey
Dear Richard If you look in the R-help archives you will find that Gerrit Eichner suggested that you might need to be more patient. Try using increasing numbers of comparisons from 4 and plot time taken against n of comparisons then extrapolate to 27. Michael On 11/11/2018 00:51, Friedman,

Re: [R] summary function does not work with Westfall correction in multcomp with 27 comparisons

2018-11-08 Thread Gerrit Eichner
Dear Rich, w/o the original data we can actually only guess, but I think you may haven't been patient enough to let summary.glht finish its job. Have you tried to increase the number of contrasts, i.e. comparisons, step by step to see how the computational burden and hence the required computing

Re: [R] Summary to data frame in R!!

2014-05-21 Thread peter dalgaard
On 07 May 2014, at 17:55 , Marc Schwartz marc_schwa...@me.com wrote: as.data.frame(sapply(mtcars[, c(mpg, disp)], summary)) I'd use lapply() rather than sapply() here. That goes directly from a list to a data frame, avoiding the detour via a matrix. -- Peter Dalgaard, Professor Center for

Re: [R] Summary to data frame in R!!

2014-05-07 Thread Marc Schwartz
On May 7, 2014, at 5:15 AM, Abhinaba Roy abhinabaro...@gmail.com wrote: Hi R-helpers, sumx - summary(mtcars[,c(mpg,disp)]) sumx mpg disp Min. :10.40 Min. : 71.1 1st Qu.:15.43 1st Qu.:120.8 Median :19.20 Median :196.3 Mean :20.09 Mean :230.7 3rd

Re: [R] summary() and the mode

2014-01-23 Thread Rolf Turner
On 24/01/14 09:27, Ruhil, Anirudh wrote: A student asked: Why does R's summary() command yield the Mean and the Median, quartiles, min, and max but was written to exclude the Mode? I said I had no clue, googled the question without much luck, and am now posting it to see if anybody knows why.

Re: [R] summary() and the mode

2014-01-23 Thread Jim Lemon
On 01/24/2014 07:27 AM, Ruhil, Anirudh wrote: A student asked: Why does R's summary() command yield the Mean and the Median, quartiles, min, and max but was written to exclude the Mode? I said I had no clue, googled the question without much luck, and am now posting it to see if anybody knows

Re: [R] summary() and the mode

2014-01-23 Thread Marc Schwartz
On Jan 23, 2014, at 2:27 PM, Ruhil, Anirudh ru...@ohio.edu wrote: A student asked: Why does R's summary() command yield the Mean and the Median, quartiles, min, and max but was written to exclude the Mode? I said I had no clue, googled the question without much luck, and am now posting

Re: [R] summary many regressions

2013-11-26 Thread PIKAL Petr
Hi It is work for split/lapply or sapply approach. ff-function(data) {ss-lm(y~x, data); c(coef(ss), summary(ss)$adj.r.squared)} lapply(split(data[,1:2], data$city), ff) Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On

Re: [R] summary many regressions

2013-11-25 Thread David Winsemius
On Nov 25, 2013, at 3:35 PM, Gary Dong wrote: Dear R users, I have a large data set which includes data from 300 cities. I want to run a biviriate regression for each city and record the coefficient and the adjusted R square. For example, in the following, I have 10 cities represented

Re: [R] summary many regressions

2013-11-25 Thread arun
Hi, Try: res - do.call(rbind,lapply(split(data,data$city),function(z) {fit_city - lm(y~x,data=z);data.frame(City=unique(z$city),Coefficient=coef(fit_city)[2],Adjusted_R_square= summary(fit_city)$adj.r.squared)})) A.K. On Monday, November 25, 2013 6:37 PM, Gary Dong pdxgary...@gmail.com

Re: [R] summary and plot

2013-10-10 Thread Richard M. Heiberger
## I would use the likert function in the HH package ## if necessary ## install.packages(HH) ## install.packages(reshape) library(HH) library(reshape) pop - read.table(header=TRUE, text= city year sex obs 1 1990 M 25 1 1990 F 32 1 1991 M 15 1 1991 F 22 2

Re: [R] summary and plot

2013-10-10 Thread Richard M. Heiberger
This is better for plotting the percents likert(city ~ F + M | year, data=popwide, as.percent=noRightAxis, main=F M population by city within year) likert(year ~ F + M | city, data=popwide, as.percent=noRightAxis, main=F M population by year within city) We can also plot the

Re: [R] summary and plot

2013-10-10 Thread arun
Hi, May be: dat1- read.table(text=city year sex  obs 1  1990  M  25 1  1990  F  32 1  1991  M  15 1  1991  F  22 2  1990  M  42 2  1990  F  36 2  1991  M  12 2  1991  F  16,sep=,header=TRUE,stringsAsFactors=FALSE) library(plyr) #by city  d1 -

Re: [R] Summary functions in sqldf() XXXX

2013-10-08 Thread Gabor Grothendieck
On Tue, Oct 8, 2013 at 11:46 AM, Dan Abner dan.abne...@gmail.com wrote: Hi everyone, Is it possible to obtain the 1st 3rd quartiles the median in a sqldf() select statement? If so, can you please provide the summary fn code? See the list of functions in Example15 on the sqldf home page:

Re: [R] summary(object) not showing all values of a factor

2013-09-04 Thread PIKAL Petr
Hi see ?contrasts ?model.matrix go through archives and through chapter 11.1.1 Contrasts from R-Intro document. Anyway, when you go through this chapter you will probably benefit from reading previous chapters too. Regards Petr -Original Message- From:

Re: [R] summary(object) not showing all values of a factor

2013-09-03 Thread Bert Gunter
These are **not** odd results. You just don't understand how linear models work, in particular, you need to understand contrasts for categorical factors. As this is not the place for a statistics tutorial, I suggest you read up on linear models or consult a local expert. Cheers, Bert On Tue,

Re: [R] Summary of data for each year

2013-02-01 Thread Felipe Carrillo
, January 31, 2013 11:52 PM Subject: Re: [R] Summary of data for each year Hello, One possibility is: creek - read.csv(creek.csv) colnames(creek) - c(date,flow) creek$date - as.Date(creek$date, %m/%d/%Y) creek - within(creek, year - format(date, '%Y')) with(creek, aggregate(flow, by=list

Re: [R] Summary of data for each year

2013-02-01 Thread arun
Hi, You could use: creek - read.csv(creek.csv,sep=\t)  colnames(creek) - c(date,flow) creek$date - as.Date(creek$date, %m/%d/%Y) creek1 - within(creek, year - format(date, '%Y')) library(data.table)  creek2- data.table(creek1)  

Re: [R] Summary of data for each year

2013-01-31 Thread Pascal Oettli
Hello, One possibility is: creek - read.csv(creek.csv) colnames(creek) - c(date,flow) creek$date - as.Date(creek$date, %m/%d/%Y) creek - within(creek, year - format(date, '%Y')) with(creek, aggregate(flow, by=list(year=year), summary)) HTH, Pascal Le 01/02/2013 16:32, Janesh Devkota a

Re: [R] Summary command: Two independent variables against dependent.

2012-12-06 Thread Daniel Martin
Brilliant, thanks very much!! Works fine. Dan On 6 Dec 2012, at 18:25, arun kirshna [via R] wrote: Hi, Your question is not very clear. I hope you are not looking for the subset option in summary(lm()). If you want just the summary(), then use '' or '|' For e.g.

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread frespider
23, 2012 10:23 AM Subject: Re: [R] Summary statistics for matrix columns Thank you all Sent from my iPhone On 2012-11-23, at 10:19, arun [hidden email] wrote: HI, You are right. It is slower when compared to Pete's solution: set.seed(125) x - matrix(sample(1:80),nrow=1000

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread William Dunlap
[mailto:r-help-boun...@r-project.org] On Behalf Of frespider Sent: Saturday, November 24, 2012 4:58 AM To: r-help@r-project.org Subject: Re: [R] Summary statistics for matrix columns HI A.k, I need one more question, if you can answer it please M - matrix(sample(1:8000),nrow=100

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread arun
#or rowDiffs(colRanges(x)) A.K. - Original Message - From: frespider frespi...@hotmail.com To: r-help@r-project.org Cc: Sent: Saturday, November 24, 2012 7:58 AM Subject: Re: [R] Summary statistics for matrix columns HI A.k, I need one more question, if you can answer it please M

Re: [R] Summary statistics for matrix columns

2012-11-24 Thread David Winsemius
On Nov 24, 2012, at 4:58 AM, frespider wrote: HI A.k, I need one more question, if you can answer it please M - matrix(sample(1:8000),nrow=100) colnames(M)- paste(Col,1:ncol(M),sep=) apply(M,2,function(x) c(Min=min(x),1st Qu =quantile(x, 0.25,names=FALSE), Range =

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread Pete Brecknock
frespider wrote Hi, it is possible. but don't you think it will slow the code if you convert to data.frame? Thanks Date: Thu, 22 Nov 2012 18:31:35 -0800 From: ml-node+s789695n4650500h51@.nabble To: frespider@ Subject: RE: Summary statistics for matrix columns

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread Fares Said
0.000 0.384 A.K. - Original Message - From: Pete Brecknock peter.breckn...@bp.com To: r-help@r-project.org Cc: Sent: Friday, November 23, 2012 8:42 AM Subject: Re: [R] Summary statistics for matrix columns frespider wrote Hi, it is possible. but don't you think

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread arun
-project.org Cc: Sent: Friday, November 23, 2012 8:42 AM Subject: Re: [R] Summary statistics for matrix columns frespider wrote Hi, it is possible. but don't you think it will slow the code if you convert to data.frame? Thanks Date: Thu, 22 Nov 2012 18:31:35 -0800 From: ml-node

Re: [R] Summary statistics for matrix columns

2012-11-23 Thread arun
...@hotmail.com To: arun smartpink...@yahoo.com Cc: Pete Brecknock peter.breckn...@bp.com; R help r-help@r-project.org Sent: Friday, November 23, 2012 10:23 AM Subject: Re: [R] Summary statistics for matrix columns Thank you all Sent from my iPhone On 2012-11-23, at 10:19, arun smartpink

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread Pete Brecknock
frespider wrote Hi, is there a way I can calculate a summary statistics for a columns matrix let say we have this matrix x - matrix(sample(1:8000),nrow=100) colnames(x)- paste(Col,1:ncol(x),sep=) if I used summary summary(x) i get the output for each column but I need the output

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
I also don't like to use split function because I have like around 800 columns Date: Thu, 22 Nov 2012 18:08:54 -0800 From: ml-node+s789695n4650496...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns Hi, How about this:

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi peter, but this doesn't give me them in the order I want. Is there a better approach Thanks -- View this message in context: http://r.789695.n4.nabble.com/Summary-statistics-for-matrix-columns-tp4650489p4650492.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
There is still missing some statistics, like sd and IQR and I prefer the output to be matrix Thanks Date: Thu, 22 Nov 2012 18:00:20 -0800 From: ml-node+s789695n4650493...@n4.nabble.com To: frespi...@hotmail.com Subject: Re: Summary statistics for matrix columns HI, You could try

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
HI, but Sd and IQR not in the order I want , Thanks Date: Thu, 22 Nov 2012 18:08:57 -0800 From: ml-node+s789695n4650496...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns Hi, How about this:

Re: [R] Summary statistics for matrix columns

2012-11-22 Thread frespider
Hi, it is possible. but don't you think it will slow the code if you convert to data.frame? Thanks Date: Thu, 22 Nov 2012 18:31:35 -0800 From: ml-node+s789695n4650500...@n4.nabble.com To: frespi...@hotmail.com Subject: RE: Summary statistics for matrix columns HI, Is it possible

Re: [R] Summary of variables with NA, empty

2012-10-24 Thread Lopez, Dan
. Dan -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Tuesday, October 23, 2012 3:15 PM To: David Winsemius Cc: Lopez, Dan; R help (r-help@r-project.org) Subject: Re: [R] Summary of variables with NA, empty To highlight: Basically all Null values

Re: [R] Summary of variables with NA, empty

2012-10-24 Thread David Winsemius
, Dan; R help (r-help@r-project.org) Subject: Re: [R] Summary of variables with NA, empty To highlight: Basically all Null values is a meaningless phrase in R. ?Null ?NA ?NaN have **very specific meanings** in R and have nothing to do with the various sorts of whitespace characters

Re: [R] Summary of variables with NA, empty

2012-10-23 Thread David Winsemius
On Oct 23, 2012, at 11:17 AM, Lopez, Dan wrote: Hi, Is there a function I can use on my dataframe to give me a concise summary of variables that are NA,blank,etc? Basically all Null values, Empty strings, white space, blank values. Ideally it would look something like the below: # it

Re: [R] Summary of variables with NA, empty

2012-10-23 Thread Bert Gunter
To highlight: Basically all Null values is a meaningless phrase in R. ?Null ?NA ?NaN have **very specific meanings** in R and have nothing to do with the various sorts of whitespace characters that David mentions (spaces, tabs...). If you wish to use R, you **must** understand the distinctions

Re: [R] Summary using by() returns character arrays in a list

2012-10-12 Thread PIKAL Petr
: Wednesday, October 10, 2012 4:03 PM To: PIKAL Petr Cc: Alex van der Spek; r-help@r-project.org Subject: RE: [R] Summary using by() returns character arrays in a list Thank you Petr, Try this str(by(iris, iris$Species, summary)) and you will see what is actually returned is a list

Re: [R] Summary using by() returns character arrays in a list

2012-10-10 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Alex van der Spek Sent: Wednesday, October 10, 2012 2:48 PM To: r-help@r-project.org Subject: [R] Summary using by() returns character arrays in a list I use by() to

Re: [R] Summary using by() returns character arrays in a list

2012-10-10 Thread Alex van der Spek
Thank you Petr, Try this str(by(iris, iris$Species, summary)) and you will see what is actually returned is a list of 3, each element containing a character table, not a numeric table. The rownames of these tables are empty but should contain the names of the summary stats. I have a workaround

Re: [R] Summary using by() returns character arrays in a list

2012-10-10 Thread Rui Barradas
Hello, If 'by' is giving you trouble, why not 'aggregate'? agg.df - aggregate(iris, list(iris$Species), FUN = summary) str(agg.df) Hope this helps, Rui Barradas Em 10-10-2012 15:02, Alex van der Spek escreveu: Thank you Petr, Try this str(by(iris, iris$Species, summary)) and you will see

Re: [R] Summary using by() returns character arrays in a list

2012-10-10 Thread arun
HI, May be this helps you: Using the dataset iris: by.list-by(iris, iris$Species, summary) dat1-do.call(rbind,lapply(by.list,function(x) gsub(.*\\:,,x))) row.names(dat1)-paste(rep(unlist(dimnames(by.list),use.names=F),each=6),unlist(lapply(lapply(by.list,`[`,1:6),function(x)

Re: [R] summary() after changing contrasts

2012-08-10 Thread S Ellison
You might take a look in he car package. if I recall correctly, it includes some 'pretty' versions of contrasts that tidy up the displayed format. S Ellison -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Daniel Weitzenfeld

Re: [R] summary(svyglm) Pr ( | t |) ?

2012-08-02 Thread John Fox
Dear Diana, The Anova() function in the car package will produce a Wald test for each term in a model fit by svyglm(). I hope this helps, John -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Diana Marcela Martinez Ruiz Sent:

Re: [R] summary(svyglm) Pr ( | t |) ?

2012-08-02 Thread Diana Marcela Martinez Ruiz
in the model Thanks From: j...@mcmaster.ca To: dianamm...@hotmail.com CC: r-help@r-project.org; tlum...@uw.edu Subject: RE: [R] summary(svyglm) Pr ( | t |) ? Date: Thu, 2 Aug 2012 16:50:37 -0400 Dear Diana, The Anova() function in the car package will produce a Wald test for each term

Re: [R] summary(svyglm) Pr ( | t |) ?

2012-08-02 Thread John Fox
Dear Diana, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Diana Marcela Martinez Ruiz Sent: August-02-12 5:00 PM To: j...@mcmaster.ca; tlum...@uw.edu; Ayuda en R Subject: Re: [R] summary(svyglm) Pr ( | t |) ? Thanks

Re: [R] summary for weekdays()

2012-05-11 Thread Rui Barradas
Hello Try table(mydata$day) Works with any type of character input. Hope this helps, Rui Barradas Kai Mx wrote Hi all, probably really simple: I seem to be lacking some understanding for the character class: I have a bunch of dates in a dataframe and I want to add a string variable

Re: [R] Summary about how to divide data by week

2012-04-17 Thread Rui Barradas
Hello, I'm glad you have a solution that works. Maybe you could do the same without hard-coding the values 1:7, 8:14. $ library(chron) dat - with(my_dataframe, paste(month, day, year, sep=/)) week - cut(chron(dat), breaks=weeks) head(week) tapply(my_dataframe$Freq, week, mean) Hope this

Re: [R] Summary Statistics Help

2012-04-09 Thread bobo
I've got this solved via Talks Stat mod.1-lm(Patents~FHouse, data=datpat) summary(mod.1) anova(mod.1) xtable(mod.1) -- View this message in context: http://r.789695.n4.nabble.com/Summary-Statistics-Help-tp4541923p4542103.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Summary values from Glm function (rms package)

2012-03-22 Thread Frank Harrell
The smearingEst function in the Hmisc package, given a set of residuals, can compute the smearing estimator of the mean. To get the confidence interval for the mean or difference in the mean will take some work (unless you have no covariates to adjust for; in that case you can just bootstrap the

Re: [R] summary per group

2012-01-02 Thread Petr PIKAL
Hi Hello, I know that it'll be quite easy to do what I want but somehow I am lost as I am new to R. I want to get summary results arranged by groups. In detail I'd like get the number (levels) of Species per Family like for this dataset: SPEC - factor(c(a,a,b,b,c,c,c,d,e,e,e,e))

Re: [R] summary per group

2012-01-02 Thread Sarah Goslee
Hi, On Mon, Jan 2, 2012 at 8:08 AM, Johannes Radinger jradin...@gmx.at wrote: Hello, I know that it'll be quite easy to do what I want but somehow I am lost as I am new to R. I want to get summary results arranged by groups. In detail I'd like get the number (levels) of Species per Family

Re: [R] summary per group

2012-01-02 Thread Johannes Radinger
Original-Nachricht Datum: Mon, 2 Jan 2012 14:29:07 +0100 Von: Petr PIKAL petr.pi...@precheza.cz An: Johannes Radinger jradin...@gmx.at CC: r-help@r-project.org Betreff: Re: [R] summary per group Hi Hello, I know that it'll be quite easy to do what I want

Re: [R] summary per group

2012-01-02 Thread David Winsemius
On Jan 2, 2012, at 11:14 AM, Johannes Radinger wrote: Thank you Petr, that is exactly what I was looking for... no I played a little bit around with that because I want to create a summary with FAM as a grouping variable. Beside the number of unique SPEC per FAM also want to get their

Re: [R] summary per group

2012-01-02 Thread Petr PIKAL
Hi Hi Hello, I know that it'll be quite easy to do what I want but somehow I am lost as I am new to R. I want to get summary results arranged by groups. In detail I'd like get the number (levels) of Species per Family like for this dataset: SPEC -

Re: [R] Summary tables of large datasets including character and numerical variables

2011-12-27 Thread John Kane
A function like the one below will give you the class and number of valid entries for a dataset.  At sample data set would help determine if it works. It works on a simple data set I created and one from the ggplot2 package but it is not really tested. With your data set as df1 something like

Re: [R] Summary tables of large datasets including character and numerical variables

2011-12-26 Thread John Kane
It would be  very helpful to have an actual sample of your data. As usual in R there are probably several different ways to approach the problem but a small sample of the data or a mock-up would be most helpful. Probably the easiest way to supply some data would be something like df1 -

Re: [R] Summary tables of large datasets including character and numerical variables

2011-12-26 Thread Duncan Murdoch
On 11-12-26 5:44 AM, sparandekar wrote: Hello ! I am attempting to switch from being a long time SAS user to R, and would really appreciate a bit of help ! The first thing I do in getting a large dataset (thousands of obervations and hundreds of variables) is to run a SAS command PROC CONTENTS

Re: [R] Summary tables of large datasets including character and numerical variables

2011-12-26 Thread David Winsemius
On Dec 26, 2011, at 5:44 AM, sparandekar wrote: Hello ! I am attempting to switch from being a long time SAS user to R, and would really appreciate a bit of help ! The first thing I do in getting a large dataset (thousands of obervations and hundreds of variables) is to run a SAS

Re: [R] summary vs anova

2011-12-19 Thread David Winsemius
On Dec 19, 2011, at 9:09 AM, Brent Pedersen wrote: Hi, I'm sure this is simple, but I haven't been able to find this in TFM, say I have some data in R like this (pasted here: http://pastebin.com/raw.php?i=sjS9Zkup): One of the reason this is not in TFM is that these are questions that

Re: [R] summary vs anova

2011-12-19 Thread peter dalgaard
On Dec 19, 2011, at 15:09 , Brent Pedersen wrote: Hi, I'm sure this is simple, but I haven't been able to find this in TFM, It's not _that_ simple. You likely need TFtextbook rather than TFM. Most (but not all) will go into at least some detail of coding categorical variables using dummy

Re: [R] Summary coefficients give NA values because of singularities

2011-12-06 Thread Uwe Ligges
On 05.12.2011 21:57, Gathurst wrote: Hello, I have a data set which I am using to find a model with the most significant parameters included and most importantly, the p-values. The full model is of the form: sad[,1]~b_1 sad[,2]+b_2 sad[,3]+b_3 sad[,4]+b_4 sad[,5]+b_5 sad[,6]+b_6

Re: [R] Summary stats in table

2011-10-30 Thread Duncan Murdoch
On 11-10-24 7:16 PM, Hadley Wickham wrote: On Mon, Oct 24, 2011 at 5:39 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Suppose I have data like this: A- sample(letters[1:3], 1000, replace=TRUE) B- sample(LETTERS[1:2], 1000, replace=TRUE) x- rnorm(1000) I can get a table of means via

Re: [R] Summary stats in table

2011-10-24 Thread Hadley Wickham
On Mon, Oct 24, 2011 at 5:39 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Suppose I have data like this: A - sample(letters[1:3], 1000, replace=TRUE) B - sample(LETTERS[1:2], 1000, replace=TRUE) x - rnorm(1000) I can get a table of means via tapply(x, list(A, B), mean) and I can

Re: [R] Summary stats in table

2011-10-23 Thread Tyler Rinker
I had to set it up as a data frame and then it workd beautifully with the reshape package. DF-data.frame(A,B,x) library(reshape) cast(DF, A ~ B, fun.aggregate=mean, margins=c(grand_row, grand_col)) Cheers Tyler Date: Sun, 23 Oct 2011

Re: [R] summary in functions

2011-02-16 Thread Simon Blomberg
On 17/02/11 09:44, Sam Steingold wrote: summary() in functions seems to print nothing. str() does print something. why? summary() returns the summary information as its value. If you want to see this value from inside a function, use print(summary()). The reason you see the summary

Re: [R] summary for factors is not very informative

2011-02-15 Thread Thomas Lumley
It does print frequency stats, just not all of them. The reason it doesn't print all of them is that there could be thousands of them. If you want a table, use table() -thomas On Wed, Feb 16, 2011 at 11:31 AM, Sam Steingold s...@gnu.org wrote: summary() for a factor prints:     ColName

Re: [R] summary(list) is awesome, but I want more than summary

2011-01-08 Thread Duncan Murdoch
On 11-01-08 2:07 AM, Krishna Kirti Das wrote: When I load a table from a data source and run summary() on it, the summary gives me basic summary statistics I'm looking for, and it also discriminates between quantitative and qualitative data and summarizes them accordingly. For example, if I do

Re: [R] Summary (Re: (S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?)

2010-12-13 Thread Claudia Beleites
Dear Emmanuel and dear list, Therefore, I let this problem to sleep. However, I Cc this answer (with the original question below) to Max Kuhn and Friedrich Leisch, in the (faint) hope that this feature, which does not seem to have been missed by anybody in 8 years, I've been missing it every

Re: [R] Summary (Re: (S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?)

2010-12-13 Thread Liviu Andronic
On Mon, Dec 13, 2010 at 12:30 AM, Emmanuel Charpentier emm.charpent...@free.fr wrote: Therefore, I let this problem to sleep. However, I Cc this answer (with the original question below) to Max Kuhn and Friedrich Leisch, in the (faint) hope that this feature, which does not seem to have been

Re: [R] Summary (Re: (S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?)

2010-12-12 Thread Duncan Murdoch
On 12/12/2010 6:30 PM, Emmanuel Charpentier wrote: Dear list, see comment at end. On Sat, 11 Dec 2010 22:58:10 +, Emmanuel Charpentier wrote : Dear list, Inspired by the original Knuth tools, and for paedaogical reasons, I wish to produce a document presenting some source code with

Re: [R] Summary (Re: (S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?)

2010-12-12 Thread Gabor Grothendieck
On Sun, Dec 12, 2010 at 6:30 PM, Emmanuel Charpentier emm.charpent...@free.fr wrote: Dear list, see comment at end. On Sat, 11 Dec 2010 22:58:10 +, Emmanuel Charpentier wrote : Dear list, Inspired by the original Knuth tools, and for paedaogical reasons, I wish to produce a document

Re: [R] summary in Hmisc and Latex

2010-08-31 Thread Marc Schwartz
On Aug 31, 2010, at 12:42 PM, moleps wrote: Dear all, With the latest update of Hmisc I no longer have any problems with latex. However using the ctable option produces latex code that at least on both the miktex distribution at work and mactex distribution at home refuses to run due to

Re: [R] summary stats on continuous data

2010-06-15 Thread Daniel Malter
Hi, you should be able to do most of your summaries using tapply() or aggregate(). for your example, tapply(d$Acc,list(d$Sample),table) Here tapply takes Acc, splits it by Sample, and then tables Acc (which returns how many 0s/1s were observed in variable Acc for each stratum of Sample).

Re: [R] summary stats on continuous data

2010-06-15 Thread Matthew Finkbeiner
Hi Daniel, thanks for your reply. Unfortunately, that is not doing what I need. In the example I sent, there are three subjects (S1, S2 S3). Each subject has 3 trials worth of data and each trial has 10 samples. What I want to return is the accuracy rate for each subject. The answer is

Re: [R] summary stats on continuous data

2010-06-15 Thread Daniel Malter
You can define a function that does just that: sum the 1s in Acc and divide by the length of Acc. Then use tapply to apply the function for each subject. f=function(x){sum(as.numeric(as.character(x)))/length(x)} tapply(d$Acc,list(d$S),f) HTH, Daniel -- View this message in context:

Re: [R] summary of arima model in R

2010-05-26 Thread Joris Meys
I reckon you misunderstand the function arima. If you're interested in the significance of any regressor, you should use the proper fitting tools. Check all the code examples from the book I recommended before on : http://www.stat.pitt.edu/stoffer/tsa2/index.html There's a nice tutorial that

Re: [R] summary of arima model in R

2010-05-26 Thread David Scott
Joris Meys wrote: Check http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.pdf for some ideas on testing time series in R. I'd go with the acf() and pacf() on the residuals of the arima model. If arima works, both plots will indicate absence of autocorrelation. also check ?tsdiag And if

Re: [R] summary of arima model in R

2010-05-25 Thread Joris Meys
Check http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.pdf for some ideas on testing time series in R. I'd go with the acf() and pacf() on the residuals of the arima model. If arima works, both plots will indicate absence of autocorrelation. also check ?tsdiag And if you're really going

Re: [R] summary statistics for grouped data

2010-02-12 Thread Greg Snow
There are several depending on what specifically you want to do. Some of the things to look at include: tapply, aggregate, the plyr package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From:

Re: [R] summary statistics for grouped data

2010-02-12 Thread Søren Højsgaard
You might find the summaryBy function in the doBy package useful. Regards Søren Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org] P#229; vegne af jose romero [jlauren...@yahoo.com] Sendt: 12. februar 2010 18:23 Til: r-help@r-project.org

Re: [R] summary statistics for grouped data

2010-02-12 Thread William Revelle
At 6:44 PM +0100 2/12/10, Søren Højsgaard wrote: You might find the summaryBy function in the doBy package useful. Regards Søren see also the describe.by function in the psych package. Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org]

Re: [R] Summary

2009-09-29 Thread Henrique Dallazuanna
Try this: sapply(xc, summary) On Tue, Sep 29, 2009 at 12:42 PM, Ashta sewa...@gmail.com wrote: My data is called  xc and has more than 15 variables. When I used summary(xc)   it gave me the detail description of each variable. Summary(xc)              Y1                x1            

Re: [R] Summary

2009-09-29 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Henrique Dallazuanna Sent: Tuesday, September 29, 2009 9:57 AM To: Ashta Cc: R help Subject: Re: [R] Summary Try this: sapply(xc, summary) This fails if there are NA's

Re: [R] Summary

2009-09-29 Thread Henrique Dallazuanna
Dallazuanna Sent: Tuesday, September 29, 2009 9:57 AM To: Ashta Cc: R help Subject: Re: [R] Summary Try this: sapply(xc, summary) This fails if there are NA's in xc.  Try I think you need a custom summary-like function for this.  E.g., df-data.frame(X1=sqrt(-1:5), X2=-1:5, X3=log(-1:5

Re: [R] Summary/Bootstrap for Design library's lrm function

2009-09-26 Thread David Winsemius
On Sep 26, 2009, at 5:11 PM, kkr...@uci.edu wrote: Can anyone tell me what I might be doing incorrectly for an ordinal logistic regression for lrm? I cannot get R(2.9.1)to run either summary nor will it let me bootstrp to validate. ### Y is a 5 value measure with a range from 1-5, the

Re: [R] summary of rpart-Object in tktext window?

2009-09-14 Thread Henrique Dallazuanna
Try this: tkinsert(tex, end, paste(capture.output(summary(fit)), collapse = \n)) On Mon, Sep 14, 2009 at 10:43 AM, Anne Skoeries h...@anne-skoeries.dewrote: Hi, is it possible to put a summary of an rpart-Object into a tktext-window? Here is what I'm trying to do: fit - rpart(Kyphosis ~

Re: [R] summary of rpart-Object in tktext window?

2009-09-14 Thread Anne Skoeries
Thanks! That's it! Perfect! -- Anne Skoeries Olgastr. 54 74072 Heilbronn Phone: +49 (0)7131 - 390 33 33 Mobil: +49 (0)176 - 212 37 770 Mail: h...@anne-skoeries.de Am 14.09.2009 um 15:50 schrieb Henrique Dallazuanna: tkinsert(tex, end, paste(capture.output(summary(fit)), collapse = \n))

Re: [R] summary(table)

2009-08-10 Thread Erik Iverson
We cannot reproduce your example since we don't have access to probF. It seems probF is not an object of class table, but perhaps of class data.frame. Also, summary is not cutting off the other variables, it is pooling levels of a factor into the Other category. All the levels belong to the

Re: [R] Summary help

2009-05-06 Thread Dieter Menne
mathallan mathanmath at gmail.com writes: Hi, I have fittet a gamma model, and is wondering if I can read the shape and the scale direct from the summary Estimate Std. Errort valuePr(|t|) (Intercept) 1.612e+00 4.735e-02 34.052

Re: [R] Summary help

2009-05-06 Thread mathallan
To glm is glm(log(mydata)~log(max_data)*as.factor(grp),family=Gamma(link=log)) And I was wondering if you can read the scale and shape from summary There a quite a few gamma models around, so you should tell us more. glmXXX? lmer? Dieter __

Re: [R] Summary of data.frame according to colnames and grouping factor

2009-03-08 Thread baptiste auguie
Hi, You could use the reshape package: d$e - e recast(d, variable~e, fun=sum) The doBy package is another option. baptiste On 8 Mar 2009, at 17:14, soeren.vo...@eawag.ch wrote: A dataframe holds 3 vars, each checked true or false (1, 0). Another var holds the grouping, r and s: ###

Re: [R] Summary of data.frame according to colnames and grouping factor

2009-03-08 Thread David Winsemius
If you prefer to do it with base functions, you could start by thinking about one column at a time, for which the tapply function is a logical choice: tapply(d[,A], e, sum) r s 3 6 Then wrap that in an apply call that handles each column sequentially: apply(d, 2, function (x) tapply(x, e,

Re: [R] Summary grouped by factor

2009-03-06 Thread Jorge Ivan Velez
Dear Sören, How about this? do.call(cbind,tapply(v, k, summary)) HTH, Jorge On Fri, Mar 6, 2009 at 10:48 AM, soeren.vo...@eawag.ch wrote: ### example:start v - sample(rnorm(200), 100, replace=T) k - rep.int(c(locA, locB, locC, locD), 25) tapply(v, k, summary) ### example:end ...

Re: [R] Summary grouped by factor

2009-03-06 Thread Domenico Vistocco
soeren.vo...@eawag.ch wrote: ### example:start v - sample(rnorm(200), 100, replace=T) k - rep.int(c(locA, locB, locC, locD), 25) tapply(v, k, summary) ### example:end Maybe this could be a solution: t1 - tapply(v, k, summary) t2 - sapply(t1, cbind) rownames(t2) - names(t1[[1]]) t2 Ciao,

Re: [R] Summary grouped by factor

2009-03-06 Thread Domenico Vistocco
soeren.vo...@eawag.ch wrote: ### example:start v - sample(rnorm(200), 100, replace=T) k - rep.int(c(locA, locB, locC, locD), 25) tapply(v, k, summary) ### example:end This one is better: do.call(cbind, tapply(v,k,summary)) Ciao, domenico ... (hopefully) produces 4 summaries of v according to

Re: [R] Summary grouped by factor

2009-03-06 Thread soeren . vogel
On 06.03.2009, at 16:48, soeren.vo...@eawag.ch wrote: ### example:start v - sample(rnorm(200), 100, replace=T) k - rep.int(c(locA, locB, locC, locD), 25) tapply(v, k, summary) ### example:end ... (hopefully) produces 4 summaries of v according to k group membership. How can I transform the

  1   2   >