similar to: aggregation question

Displaying 20 results from an estimated 700 matches similar to: "aggregation question"

2011 May 12
1
separate date and time
I have a combined date and time. I would like to separate them out into two columns so I can do things such as take the mean by time across all dates. meas<-runif(435) nTime<-seq(1303975800, 1304757000, 1800) nDateT<-as.POSIXct(nTime, origin="1970-01-01") mat1<-cbind(nDateT,meas) means1<- aggregate(mat1$meas, list(nDateT), mean) This doesn't do anything as each day
2006 Jul 18
1
Reconfiguring wide frame to long frame
Greetings, fellow R'ers. How can I get this frame in R: ID meas ID.1 meas.1 1 1.1 3 1.2 2 2.1 4 2.2 to look like this (stacking): ID meas 1 1.1 2 2.1 3 1.2 4 2.2 It's not really the reshape function (or is it?) because we can consider the additional columns, viz., ID.1 and meas.1, as independent of ID and meas so it is basically a stacking
2011 Jan 23
2
Ordering box plots
Hello all, I want box plots by group to display in order of increasing mean (or median) of each group but can't seem to figure it out and couldn't find anything on R-seek, either. My data looks like this: meas unit sid grade rsprti 1 2.24 1002 99999902 NA 0.8600000 2 3.04 1007 43589520 3 0.9400000 3 4.95 2002 39910470 5 1.5300000 4 2.24 2002 39986280 5
2000 Jul 28
4
Language element manipulation
I am very confused about this. I want to convert a string to a name so I can use it to extract an element of a data frame using `$'. Here is my (non-working) code: do.graph <- function (meas) { fn <- paste("a", meas, ".dat", sep='') themeas <- read.table(fn, header=F) ameas <- as.name(paste("a", meas, sep=''))
2008 Jul 25
1
glht after lmer with "$S4class-" and "missing model.matrix-" errors
Hello everybody. In my case, calculating multiple comparisons (Tukey) after lmer produced the following two errors: > sv.mc <- glht(model.sv,linfct=mcp(comp="Tukey")) Error in x$terms : $ operator not defined for this S4 class Error in factor_contrasts(model) : no 'model.matrix' method for 'model' found! What I have done before: > sv.growth <-
2011 May 12
3
assigning creating missing rows and values
I have a dataset where I have missing times (11:00 and 16:00). I would like the outputs to include the missing time so that the final time vector looks like "realt" and has the previous time's value. Ex. If meas at time 15:30 is 0.45, then the meas for time 16:00 will also be 0.45. meas are the measurements and times are the times at which they were taken. meas<-runif(18)
2011 Dec 07
1
Convert a string to a variable name
Hello, I am trying to ask the user for which column their data is in, and then use this information in a function. So far I have: data <- read.csv(file.choose(), header=TRUE) col <- (winDialogString("Which column contains your data?","")) and I want to be able to reference such as: meas <- data$col and use this meas in the function. However, I can't seem to
2005 Sep 14
1
Long lines with Sweave
I have used Sweave a lot the latest year, but never really used any long function calls. If I have code which look like this ------------------------------------------------------------- gof <- benthic.flux(ID="Gulf of Finland", meas.conc=conc, bw.conc=bw.conc, time=times,
2005 Nov 04
1
t test on data frame
Hi, I have constructed a dataframe as follows: Oil <- rep(c("Oil1","Oil2","Oil3"),8) Comp <- rep(rep(c("C1","C2"),c(4,4)),3) Mth <- rep(c("M1","M1","M2","M2"),6) Meas <- rep(c(1,2),12) Result <- rnorm(24,mean=100, sd=5) df <- data.frame(Oil, Comp, Mth, Meas, Result) The same compound
2007 Apr 16
1
Dataimport with readLines using skip= and nlines= ?
Hello, I have a problem with readLines. I have a data file with many informations added with a different number of measurments (example at the end). I only want to read the measurments witch start with "START OF HEIGHT DATA" and end with "END OF HEIGHT DATA". The difficulty is: -I want to read the file with "readLines", because the measurments have letters and
2012 Mar 13
1
Error " subscript out of bounds"
Hello, R-users,   I have a datafile with 37313 records and each record has 5 different measurements on the same variables. The format looks like this: treeID, VIG0, VIG1, VIG2, VIG3, VIG4 I was trying to convert the one row record to 5 rows record with format like this (treeID, MEASUREMENT, VIGOR). My code like this:   treeMeas<-matrix(data=0,nrow=(length(tree1$indivTree)*5), ncol=3)
2010 Jan 04
1
[LLVMdev] Assembly Printer
On Sunday 03 January 2010 01:00, Chris Lattner wrote: > On Jan 1, 2010, at 12:51 PM, mmms1841 wrote: > > I am trying to understand how LLVM does code generation and I have a > > couple of questions. I am using LLVM 2.6. > > > > First, > > if I want to change the name of an instruction, all I need to do is to > > modify the XXXInstrInfo.td, right? Using Sparc
2008 Feb 29
2
Two Way ANOVA
Hi, I am using the: pcf.aov<-aov(meas~op+part, data=pcf.ex2), command to perform a two way ANOVA. When I save the: sumpcf<- summary.aov(pcf.aov), result of the summary.aov command in a variable I need to access the individual pieces of information in the summary. The summary appears to be a list and I am having a hard time finding a way to get at the information in the summary.
2008 Jul 05
2
Bland-Altman method to measure agreement with repeated measures
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/20080705/878753db/attachment.pl>
2010 Oct 04
2
i have aproblem --thank you
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have
2001 Aug 07
1
question about combining data in two frames
Dear R Experts, I am still learning the subtleties or R programming and have a question about the best (==most elegant) way to combine data in two frames. One frame is a table of measurements of sizes of objects in multiple image fields and the other is a table of areas for each field. I want to calculate densities by dividing total number of objects in each field by the appropriate area. I
2010 Oct 29
1
Tukey post hoc comparison (glht?) after 3factorial mixed model (lmer)
Hello, dear R-community. This is a question about TukeyHSD between factor combinations of a Three-Way ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but a Generalised Linear Mixed Model (GLMM), calculated with "lmer". > growth <- groupedData(length~meas|box_id,outer=~spec*comp*water,data=all.spec) > model <-
2011 Feb 24
1
accuracy of measurements
Dear R people Could you please help with following Trying to compare accuracy of tumor size evaluation by different methods. So data looks like id true metod1 method2 ... 1 2 2 2.5 2 1.5 2 2 3 2 2 2 etc. Could you please give a hint how to deal with that. Seems like {merror} does not suite to me because I am trying to compare accuracy of measurements with their true known values not just
2011 Jan 25
0
ANOVA table look
Y'all, I need to get the look of a "standard" fixed effect ANOVA table: anova(aov(meas~op*part,data=fs)) Analysis of Variance Table Response: meas Df Sum Sq Mean Sq F value Pr(>F) op 2 2.62 1.308 1.3193 0.2750 part 19 1185.43 62.391 62.9151 <2e-16 *** op:part 38 27.05 0.712 0.7178 0.8614 Residuals 60 59.50 0.992 when I perform a
2008 Jul 25
0
glht after lmer with "$S4class-" and "missing model.matrix-" errors with DATA
maybe it's in the data? So here it comes. > sv.growth Grouped Data: length ~ meas | box_id meas spec comp water box_id sprouts leaves length long.sprout 1 1 Sv control moist 1 8.800000 37.80 211.2000 60.6 2 1 Sv xfull moist 2 7.000000 8.00 174.8000 62.8 3 1 Sv control moist 3 9.000000