similar to: how calculate mean for each group

Displaying 20 results from an estimated 20000 matches similar to: "how calculate mean for each group"

2003 Sep 13
2
what does this error mean?
Dear R-users: I am runing R 1.6.2 with Windows XP. I try to calculate Pearson correlation and Spearman correlation of any pairwise columns of 8000 x 80 data matrix with missing values and randomize the matix 1000 times and calculate this two correlations again. The code bellow for Pearson is working fine but for Spearman got the error bellow for randomized data matrix and R console is stop
2009 Nov 06
3
Calculate Mean for each Treatment/Trial Interaction in DF
Hi, I am create a new DF that summarizes the mean angle per treatment/trial, of the original DF (see below). I have had some success using: (tapply(df$Angle, INDEX=interaction(df$State, df$Trial), FUN=mean)); however, this gives the answer as a list, which means I would have to split the name to get the categories back. Does anyone know a simple way to transform the Original DF into Summary
2004 Oct 12
2
Why I can't retrieve GO identifier correctly?
Hello, R experts, I tried to retrieve all biological process GO terms at level 3 starting "biological process" as level 1 using the code as bellows: 1 library(GO) 2 library(GOstats) 3 level2<-getGOChildren("GO:0008150")$"GO:0008150"$Children 4 for ( i in 1:length(level2)) { 5 level3 <- getGOChildren(level2[i])$level2[i]$Children 6 for ( j in
2004 Aug 24
2
how to in XML on windows XP for R 1.9.1
Dear R experts: I tried two ways to install Package:XML on windows xp for R 1.9.1, all failed. Messages are given as bellows: 1> download from CRAN > install.packages("XML", CRAN = getOption("CRAN"), + contriburl = contrib.url("http://cran.r-project.org"), + available = NULL, destdir = NULL, + installWithVers = FALSE) trying URL
2004 Jan 15
3
how to overlap plots
Dear R experts: Can you help me to overlap a histogram and theoretical density curve of poison distribution? for example data like this: The numbers of sanils found in each of 100 sampling quadrats in an area were as follows: number of snails, r 0 1 2 3 4 5 8 15 f=frequency of r 69 18 7 2 1 1 1 1 apparently this is not Poison but near to Poison, How to overlap the theoretical desity curve to
2003 Aug 26
3
Subsetting a dataframe
Hi R-people I have a question concerning subsetting. I have a dataframe which contains among other variables the variable "subject". For each subject number there are several rows, e.g.: subject treatment concentration day 19 a 15,4 1 19 a 18,3 2 19 a 2,3 3 etc. Im trying to subset the dataframe to get for
2004 Feb 05
2
Incomplete Factorial design
Hello, I am planning a study with the main point to evaluate the interaction of two treatments, but for ethical reasons one cell is empty, that with patients receaving no treatment at all Treatment B
2011 May 07
4
how to calculate the mean of a group in a table
Hi its me again I don't mean to get on your nerves, but the use of R proofs to be a bit more complicated than envisaged. I would like to calculate the mean of a group of values, here "wage_accepted". The group is determined by the stage and period, so in the end there should be a column with the values of the wages in period 1 stage1, period 1 stage 2, period 2 stage1...
2007 Mar 14
1
How to transform matrices to ANOVA input datasets?
Hello, R experts, I have a list called dataHP which has 30 elements (m1, m2, ..., m30). Each element is a 7x6 matrix holding yield data from two factors experimental design, with treatment in column, position in row. For instance, the element 20 is: dataHP[[20]] col1 col2 col3 trt1 trt2 trt3 [1,] 22.0 20.3 29.7 63.3 78.5 76.4 [2,]
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2008 Oct 30
3
why does sample(x, n) give the same n items in every separate runs?
Hello R users, I have gene expression data of two groups of genes (large and small). Gene expression intensities of those genes are classified into 1 to 10 levels. What I want is to make a random set of genes that have the same levels as the small group from large group using sample(). I used smallvec to hold the number of genes in each levels (1 to 10) for small group, largevec for large group.
2007 Jul 12
1
how to estimate treatment-interaction contrasts
Hello, R experts, Sorry for asking this question again again since I really want a help! I have a two-factor experiment data and like to calculate estimates of interation contrasts say factor A has levels of a1, a2, and B has levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the constrast estimate I got is right using the script below:
2003 Nov 21
3
what does this mean in R-1.8.1 release notes?
what does this mean in R-1.8.1 release notes? o median() no longer `works' for odd-length factor variables.
2003 Nov 18
3
Copula calculation in R?
Hello Anyone that now of any function in R that can calculate copulas? Or if anyone have any code avaible I would be more than interested. Thank you in advance /Thomas ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
2010 Jul 16
3
how to skip a specific value when using apply() function to a matrix?
Hello R experts, I'd like to studentize a matrix (tmp1) by column using apply() function and skip some specific values such as zeros in the example below to tmp2 but not tmp3. I used the script below and only can get a matrix tmp3. Could you please help me to studentize the matrix (tmp1) without changing the zeros and generate a new matrix tmp2? Thanks, Joshua tmp1 [,1] [,2] [,3] [,4]
2003 Aug 12
8
capturing output from Win 98 shell
How can I best achieve the following (works in Splus): filenames <- dos("dir *.sasb7dat /b") What I am asking, more generically, is: how can I capture the output of a DOS command in R? I have tried using system("COMMAND.COM /c dir /b", intern=T, show.output.on.console=T) where intern: a logical, indicates whether to make the output of the command an R
2003 Aug 28
1
how to randomize data matrix
Dear R users: Is there a function or easier way to randomize the data between rows (considering a row as a whole unit)? For example, original data: A1 A2 A3 A4 B1 1 2 3 4 B2 5 6 7 8 B3 9 10 11 12 B4 13 14 15 16 randomized data: A1 A2 A3 A4 B4 13 14 15 16 B2 5 6 7 8 B1 1 2 3 4 B3 9 10 11 12 Thank you for your attention! Joshua
2005 Dec 02
1
how to make a sub list from a long list using the component name?
Hello, R users, I have a long list with over 20,000 elements (say foo), now I want to make a sub list of 30 elements from this list using the component names such as subname<-c( "a", "b", "d", "f", "g", "h", "o", "q",...). One way to do it is to make rest of elements in the list NULL, that is too silly. Is there
2003 Jul 31
6
Problem with data.frames
Hi, I just encountered a problem in R that may easily be fixed: If one uses attach for a data.frame e.g. 10000 times and forgets detach, then R gets incredibly slow (less then 10% of the original speed). My system: platform powerpc-apple-darwin6.0 arch powerpc os darwin6.0 system powerpc, darwin6.0 status major 1 minor 6.1 year 2002
2003 Nov 18
3
plot, plot, methods, crash (PR#5173)
(If this only happens in Win 98, I'm sure I could live with it. Just may be helpful to report it, I hope.) Start up R GUI, then > plot(1:4,1:4) # then close manually by clicking X > plot(1:4,1:4) # ditto > methods(plot) sometimes produces normal output and even the following prompt, but then crashes immediately, or more often, crashes immediately with no output. I can do any