search for: calcualates

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

Did you mean: calcualate
2006 Sep 25
4
Beginner question: select cases
Hello all, I hope i chose the right list as my question is a beginner-question. I have a data set with 3 colums "London", "Rome" and "Vienna" - the location is presented through a 1 like this: London Rome Vienna q1 0 0 1 4 0 1 0 2 1 0 0 3 .... .... .... I just want to calculate the means of a variable q1. I tried following script: # calculate the mean
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<-c...