Displaying 20 results from an estimated 9000 matches similar to: "Summary stats in table"
2013 Jun 26
1
Margins in dcast (reshape2)
Hi,
I'd like to get mean values for the margins of my casted data.frame.
For the casting I am using dcast() from reshape2. However, when I set
the margins parameter (margins=c("grand\_row")) I get following error
concerning
an unrecognized escape character '\_'. So what is the correct command
to get the outermost margins only in reshape2?
/johannes
[[alternative HTML
2010 Jun 15
3
summary stats on continuous data
I'm sorry for what I'm sure is a terribly simple question. I have a large
dataframe along these lines:
S<- 1:3
d<- data.frame(cbind(S=rep(paste('S',S,sep=""),each=30),
trial=rep(1:3,each=10),
FactorA=rep(paste('L',1,sep=""),each=30), Acc=
c(rep(1,each=20),rep(0,each=10)),
Sample=rep(1:10,3), DV= sample(runif(10),10)))
but where each
2009 Jan 22
2
Frequency and summary statistics table with different variables and categories
Hello helpers,
This is probably quite simple, but I'm stuck.
I want to create a summary statistics table with frequencies and summary
statistics for a large number of variables. The problem here is that (1)
there are two different classes of categories (sex, type of substance abuse
and type of treatent) which overlap, (2) the data for different variables
should be presented in different
2008 Dec 22
3
Summary information by groups programming assitance
All -
I have data that looks like
psd Species Lake Length Weight St.weight Wr
Wr.1 vol
432 substock SMB Clear 150 41.00 0.01 95.12438
95.10118 0.0105
433 substock SMB Clear 152 39.00 0.01 86.72916
86.70692 0.0105
434 substock SMB Clear 152 40.00 3.11 88.95298
82.03689 3.2655
435 substock SMB Clear
2008 Nov 20
5
summary statistics into table/data base, many factors to analyse
Dear list,
I reduced my data to the following:
x <- c(1,4,2,6,8,3,4,2,4,5,1,3)
y <- as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2))
z <- as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3))
I can produce the statistical summary just fine.
s1 <- tapply(x, y, summary)
d1 <- tapply(x, y, sd)
s2 <- tapply(x, z, summary)
d2 <- tapply(x, z, sd)
First thing:
I have 100 plus factors to analyse. Theirs
2006 Mar 01
3
How to do a "proc summary" in R?
Hi,
I'm a SAS user trying to convert myself to R but I still have problems with some pretty simple commands.
First I wanted to add up a number of red-tailed hawks seen per day (julian day) per year. So I tried:
RTyrday <- tapply(RThr,list(year,julian),sum)
And then I tried the following regression:
mod1 <- glm(RTyrday~julian+year, family=gaussian (link=identity),data=RT)
Wich
2009 Mar 06
4
Summary grouped by factor
### 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 output into a nice table with the
croups as columns and the interesting statistics as lines?
Thx,
2009 Apr 17
1
cast function in package reshape
Hello R useRs,
I have a function which returns a list of functions :
freq1 <- function(x) {
lev <- unique(x[!is.na(x)])
nlev <- length(lev)
args <- alist(x=)
if (nlev == 1) {
body <- c("{", "sum(!is.na(x))", "}")
f <- function() {}
formals(f) <- as.pairlist(args)
body(f) <- parse(text = body)
namef <-
2012 Jan 02
2
summary per group
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 <-
2006 Feb 12
0
SUMMARY: aggregate vs. tapply
Hi all;
Thanks for the responses to my query of how to make tapply into a table
instead of an n-dimensional array. Summary of responses follows:
Peter Dalgaard:
as.data.frame(with(tmp,as.table(tapply(C,list(A=A,B=B),sum))))
Phil Spector wrote:
z = tapply(y,list(var1,var2,var3,var4),sum)
data.frame(do.call('expand.grid',dimnames(z)),y=do.call('rbind',as.list(z)))
Hans
2005 Jan 31
2
Anyone have the userguide''s tc script and the corresponding ethloop input files?
I''m trying to get picture from ethloop and gnuplot. But the output seems weird. I still do not know why and want some examples.
Thanks in advance.
---------------------------------
Do You Yahoo!?
注册世界一流品质的雅虎免费电邮
--0-1760319804-1107141989=:62961
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit
<DIV>I''m trying to get picture from ethloop and
2007 Mar 08
3
Sender phone ringing while recipient talking
I've had asterisk running for about a month now between our PBX and our
T1, and everything seems fine but for one simple nit-pick: When a call
to the outside workd is made, and if the recipient picks up while a the
sender's phone is still relaying the ring, the sender won't be heard
until after the ring stops. This often translates a simple "hello?" into
a
2003 Oct 24
1
Dataframes of marginal summaries
Hi dear R-community,
I wonder if anyone has written code that will post-process the results of a
tapply to create a dataframe that includes the outcome, the factor by which
the function has been applied, and, if the factor is also an interaction,
then also the levels of contributing factors?
>From this
outcome <- tapply(data, A.B, function)
I'd like to arrange something like this:
2007 Nov 06
1
A suggestion for an amendment to tapply
Dear R-developers,
when tapply() is invoked on factors that have empty levels, it returns
NA. This behaviour is in accord with the tapply documentation, and is
reasonable in many cases. However, when FUN is sum, it would also
seem reasonable to return 0 instead of NA, because "the sum of an
empty set is zero, by definition."
I'd like to raise a discussion of the possibility of an
2004 May 05
3
sample
Dear List:
I have the following simple program:
x<- sample(site)
VarGuilda1<- var(tapply(x,site,func1))
VarGuilda2<- var(tapply(x,site,func2))
VarGuilda3<- var(tapply(x,site,func3))
VarGuilda4<- var(tapply(x,site,func4))
VarGuilda5<- var(tapply(x,site,func5))
VarGuilda6<- var(tapply(x,site,func6))
VarGuilda7<- var(tapply(x,site,func7))
VarGuilda8<-
2007 Sep 13
5
Apache mod_proxy_balancer hang on high traffic hour
more info
just 1 server
webserver + appserver + dbserver
On 9/14/07, Yan Meng <dreamwords at gmail.com> wrote:
>
> Hi, Guys
>
> Our team is running a web2.0 finance site in China
>
> http://www.caibangzi.com/
>
> We use APACHE + mod_proxy_balancer + mongrel to deploy our application, it
> workd super in the past few monthes.
>
> However, just from last
2017 Jan 27
1
RFC: tapply(*, ..., init.value = NA)
The "no factor combination" case is distinguishable by 'tapply' with simplify=FALSE.
> D2 <- data.frame(n = gl(3,4), L = gl(6,2, labels=LETTERS[1:6]), N=3)
> D2 <- D2[-c(1,5), ]
> DN <- D2; DN[1,"N"] <- NA
> with(DN, tapply(N, list(n,L), FUN=sum, simplify=FALSE))
A B C D E F
1 NA 6 NULL NULL NULL NULL
2 NULL NULL 3 6
2017 May 30
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
>>>>> Serguei Sokol <sokol at insa-toulouse.fr>
>>>>> on Mon, 29 May 2017 15:28:12 +0200 writes:
> Sorry, I have seen it too late that we had different tab
> width in the original file and my editor. Here is the
> patch with all white spaces instead of mixing tabs and
> white spaces.
thank you - it still gives quite a few
2004 May 13
2
tapply & hist
I'm learning how to use tapply.
Now I'm having a go at the following code in which dati contains almost 600
lines, Pot - numeric - are the capacities of power plants and SGruppo - text
- the corresponding six technologies ("CCC", "CIC","TGC", "CSC","CPC", "TE").
.....................................................
2012 Sep 03
1
Scatter plot from tapply output, labels of data
Hei,
i am trying to plot the means of two variables (d13C and d15N), by 2
grouping factors (Species and Year) that i obtained by the function tapply.
I would like to plot with different colours according to the Year and show
the "Species" as data labels.
My data looks like this:
Species d13C d13N Year
"Species1" 14,4 11.5 2009
"Species2"