search for: calcualate

Displaying 2 results from an estimated 2 matches for "calcualate".

2006 Sep 25
4
Beginner question: select cases
...e mean of all locations results <- subset(results, subset== 1 ) mean(results$q1) # calculate the mean of London results <- subset(results, subset== 1 , select=c(London)) mean(results$q1) # calculate the mean of Rome results <- subset(results, subset== 1 , select=c(Rome)) mean(results$q1) # calcualate the mean of Vienna results <- subset(results, subset== 1 , select=c(Vienna)) mean(results$q1) As all results are 1.68 and there is defenitely a difference in the three locations I wonder whats going on. I get confused as the Rcmdr asks me to overwrite things and there is no "just filter&qu...
2005 Dec 29
1
use of tapply?
...ta.frame( x=c(0.230,0.411,0.477,0.241,0.552,0.230), y=c(0.119,0.515,0.261,0.431,0.304,0.389), angle=vector(length=6), length=vector(length=6), row.names=c('tbr','trg','dbr','dbg','pbr','pbg')) calcDist<-function(x,y){ #calcualates distance from origin (C) origin<-data.frame(x=0.34,y=0.36) dx<-origin$x-x dy<-origin$y-y length<-sqrt(dx^2+dy^2) angle<-asin(dy/length) return(list('length'=length,'angle'=angle)) } for(iLoc in 1:length(data.intersects[,1])){ result<-...