search for: newmean

Displaying 4 results from an estimated 4 matches for "newmean".

Did you mean: newman
2011 Sep 01
2
R Help finding Mean
bob<-read.csv('shi.csv', header=T) newmean<-matrix(0, test, dim(bob)[2]-6);a<-0; for (i in c(4,8:(dim(bob)[2]))) {a<-a+1;newmean[,a]<-tapply(bob[,i], bob$Exam, mean)} colnames(newmean)<-colnames(bob)[c(4,8:(dim(bob)[2]))] Could anyone please help me what does the above code does ... I want to find mean ... but would like to...
2007 Mar 12
1
How to avoid a for-loop?
Hi all, as I am trying to move slowly from just "working" to "good" code, I'd like to ask if there's a smarter way than using a for-loop in tasks like the example below. I need to obtain the extrema of the cumulated sum of a detrended time series. The following code is currently used, please have a look at the comments for my questions and remarks: system.time({ X
2010 Aug 06
2
Pausing script to allow user input from keyboard.
...) new$TotalIntensity <- new$a.Intensity_IntegratedIntensity_OrigGFP + new $EstCytoIntensity new$NucToCytoRatio <- new$a.Intensity_IntegratedIntensity_OrigGFP / new $TotalIntensity #creates a table that determines the means for the measurements of all objects within an image library(plyr) newmean <- ddply(new, c("a.ImageNumber"), summarize, NuclearMean=mean(a.Intensity_IntegratedIntensity_OrigGFP, trim=0.01), CytoMean=mean(EstCytoIntensity, trim=0.01), IntensityMean=mean(TotalIntensity, trim=0.01), RatioMean=mean(NucToCytoRatio, trim=0.01)) # input file name name <-...
2012 Jun 20
2
Using object as literal value in list vector
...ector of strings to name a number of list elements. For instance #Create vector of strings Et<- c("ACC","RTL","WHL") MeanValues_ <- list("ACC" = 1000, "RTL" = 2000, "WHL" = 3000) #Iterate through each element of vector NewMeans_ <- list() for(et in Et){ NewMeans_ <- c(NewMeans_,list(et = unlist(MeanValues_[et]) * .80 )) } Returns > NewMeans_ $et ACC 800 $et RTL 1600 $et WHL 2400 But I want 'et' to be the object value of et, so it would be $ACC, $RTL, and $WHL. I realize there may be ano...