similar to: averaging pairs of columns in a dataframe

Displaying 20 results from an estimated 2000 matches similar to: "averaging pairs of columns in a dataframe"

2007 Jun 07
1
Averaging across rows & columns
I use Windows, R version 2.4.1. I have a dataset in which columns 1-3 are replicates, 4-6, are replicates, etc. I need to calculate an average for every set of replicates (columns 1-3, 4-6, 7-9, etc.) AND each set of replicates should be averaged every 14 rows (for more detail, to measure fruit color using a spectrometer, I recorded three readings per fruit -replicates- that I need to average to
2010 Jul 16
2
multivariate graphs, averaging on some vars
Hello I have a table of this kind: function x1 x2 x3 2.232 1 1 1.00 2.242 1 1 1.01 2.732 1 1 1.02 2.770 1 2 1.00 1.932 1 2 1.01 2.132 1 2 1.02 3.222 1.2 1 1 ..... ... .. .. The table represents the values of a function(x1, x2, x3) for each combination x1, x2, x3. I'd like to generate a plot where each point has the coordinates x=x1, y=x2,
2009 Jul 14
2
averaging two matrices whilst ignoring missing values
Hi folks, I'm trying to do something that seems like it should easy, but it apparently isn't. I have two large matrices, both containing a number of missing values at different cells. I would like to average these matrices, but the NAs are preventing me. I get a "non-numeric argument to binary operator" error. That's the first problem.
2009 Jul 15
1
Averaging dataframes that are stored in a list
Dear R-helpers, I have a list containing 5000 elements, each element is a dataframe containing one ID column (identical over the 5000 dataframes) and 9 numeric variables, e.g. ID VAR1 VAR2 VAR3 ... VAR9 I would like to create a new dataframe containing the ID column and the mean values of the 9 numeric variables. So, the structure of this new dataframe would be identical to the structure of the
2006 May 29
2
newbie question: ROW average
Dimitris Rizopoulos wrote: > look at ?rowMeans; you can also use "apply(mat, 1, mean)" but > rowMeans() is better. By my reading of the question, this is not what Ezhil wants. He said: ``I have a 992 x 74 matrix. I would like to form a new matrix by averaging each 4 rows from the original one.'' I.e. he wants (I think) the first row of the new matrix to be the
2012 Jun 26
2
MuMIn - assessing variable importance following model averaging, z-stats/p-values or CI?
Dear R users, Recent changes to the MuMIn package now means that the model averaging command (model.avg) no longer returns confidence intervals, but instead returns zvalues and corresponding pvalues for fixed effects included in models. Previously I have used this package for model selection/averaging following Greuber et al (2011) where it suggests that one should use confidence intervals from
2006 Feb 08
1
Baysian model averaging method
HI, List I want to know weather any body has used BMA Package for model averaging for prediction of future values.....What are the paprmeters we have to suplly to the model. Any script for the same. thanks in advance ANIL KUMAR( METEOROLOGIST) LRF SECTION NATIONAL CLIMATE CENTER ADGM(RESEARCH) INDIA METEOROLOGICAL DEPARTMENT SHIVIJI NAGAR PUNE-411005 INDIA MOBILE +919422023277
2011 Dec 02
2
Moving column averaging
# need zoo to use rollapply() # your data (I called df) df <- structure(list(a = 1:2, b = 2:3, c = c(5L, 9L), d = c(9L, 6L), e = c(1L, 5L), f = c(4, 7)), .Names = c("a", "b", "c", "d", "e", "f"), class = "data.frame", row.names = c(NA, -2L)) # transpose and make a zoo object df2 <- zoo(t(df)) #rollapply to get
2011 May 05
6
Averaging uneven measurements by time with uneven numbers of measurements
I have a new device that takes measurements anywhere from every second, to every 15 minutes (depending on changes). The matrix has a date, time and Y column (Y is the measurement). For three days it is 25,000 rows. How do I average the measurements by every 30 minutes so my matrix is 48 rows per day? I have been working on this and cannot figure out a simple method. Any ideas? Thank you. ----- In
2005 Nov 18
2
R-News 5/2, Bayesian Model Averaging, a detail
The article on BMA (Bayesian model averaging) presents most valuable tools for model selection, but I find one detail confusing in Example 1. In page 4 of RNews 5/2, second paragraph says that the probability of Time variable not being in the model is 0.445. It seems to me that the figure should be 1 - 0.445 = 0.555, because p!=0.445 is the prob. of Time variable being in the model. The plot in
2006 Dec 11
1
Weighted averaging partial least squares regression
Hello, is it possible in R to calculate a Weighted averaging partial least squares regression? I'm not firm in statistics and didn't found anything about weighted averaging in combination with PLS in the help archives. Or is it possible to develop a workaround with the pls-package? thanks for help in advance Andreas Plank -- _____________________________________________ Dipl. Biol.
2013 Mar 27
1
Averaging Out many rows from a column AND funtion to string
Dear all, 1) I have a very large matrix of  str(keep)  num [1:153899, 1:3415] -98.6 -95.8 -96.4 -95.8 -98 ... that  I would like to reduce its size to something like str(keep)  num [1:1000, 1:3415] -98.6 -95.8 -96.4 -95.8 -98 ...  or anything similar in size as this is a matrix that needs plotting (so is ok if it is 1000 row, 995, or 1123) I think what I need here is a way of selecting
2011 Jul 22
2
averaging rows based on string¿?
Hi Folks, Ran into something I'd really like to do in R simply/elegantly, but my R - coding skills seem surpassed. This is the thing. Imagine the following data: labs<-c("abcdef","abcgg","tgthefdk","tgtijuel","tgtnjmoi","gbnt","dlift") dat<-c(0.5,0.25,1,2,16,0.250,4) dframe<-data.frame(labs,dat) I would like to
2010 Sep 14
1
Model averaging with (and without) interaction terms
I?ve used logistic regression to create models to assess the effect of 3 variables on the presence or absence of a species, including the interaction terms between variables and model averaging using MuMI: model.avg The top models (delta<4) include several models with interaction terms and some models without; model weights are quite low for all models (<0.25). My problem is that the models
2010 Oct 19
1
What Amazon EC2 AMI do you recommend?
I''m looking at using EC2 for hosting deploying my Rails site. The reasons for the decision are these: I want something that will work for 10 users, but with capacity to expand to 10,000,000 if needed. EC2 starts at $15/month (before bandwidth) which seems reasonable even for a site in its infancy. And the costs seem to scale up well, along with the capacity. There isn''t the
2009 Jul 29
3
how to skip a numeric column for averaging other columns?
Data has the first row for variable name and the first column for sample name. I want to take "Log" for all data, but how to compute without the first column for sample name. That is, column 1: sample ID column 2-10: data I want to find an average on each column (2-10) > apply(raw_data,2,mean) Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, :
2015 Nov 23
2
Model averaging en R
Hola a todos, He realizado un dredge (para obtener todos los modelos GAM posibles a parir de un full model), luego he seleccionado un confidence set (los modelos que no se diferencian en 2 en AIC) y he hecho un model averaging con ese confidence set. Ahora me gustaría aplicar ese modelo "average" ajustado sobre otro set de datos pero no se como especificar en R que use el mismo modelo
2005 Jul 03
1
code for model-averaging by Akaike weights
Dear all, does anyone have r code to perform model-averaging of regression parameters by Akaike weights, and/or to do all-possible-subsets lm modelling that reports parameter estimates, AICc and number of parameters for each model? I have been looking for these in the archive but found none. (I am aware that many of you would warn me against these methods advocated by Burnham and Anderson
2010 Jan 07
1
Simple averaging question
I have the following data: http://i.imagehost.org/0650/Untitled2.jpg How would i average, say the 5th and the 8th entries? Thanks in advance -- View this message in context: http://n4.nabble.com/Simple-averaging-question-tp1009086p1009086.html Sent from the R help mailing list archive at Nabble.com.
2005 Feb 26
3
averaging within columns
I have a dataframe with names in the first column and wait times between decisions in the second column. Since individuals make multiple decisions, I want the average for each individual. For example, the data might look like this name wtime jo 1 jo 2 jo 1 jo 3 tim 3 tim 2 tim 2 ro 1 ro 2 etc. I'm hoping there is something like mean(dataname$wtime[name]) which will just