Displaying 1 result from an estimated 1 matches for "vecaa".
Did you mean:
vec_a
2008 Jun 10
2
How to join data.frames and vectors of different length, in an inteligent way?
...e(x=dafSamp[,2], by=list(dafSamp[,1]), FUN='length')
> Cy
Group.1 x
1 1969 1
2 1972 1
3 1976 3
4 1984 2
5 1996 1
6 1999 1
I would like to create a new vector with the adjusted values (dafSmap[,2] * Ay(for a relevant year) / Ag)
I tried to write:
vecAA <- dafSamp[,2] * Ay[which(Ay[,1]==dafSamp[,1]),2] / Ag
but the result is all NAs :-( Might have seen that coming, Not the same length...
Question: How do I go about making such calculation?
:-) Martin Hvidberg
Here is the code in full, if you want to try it...
dafSamp <-...