[R] Assignment problems

Rui Barradas ruipbarradas at sapo.pt
Wed Apr 25 00:10:08 CEST 2012


Hello again,

Try changing the lines where you create 'EMUmix3' and 'EMUmix4' by the
following.


EMUmix3 <- Reduce(`&`, lapply(countries, function(x,y){country1 %in% euro2 &
!country2 %in% euro2}))

# euro2 are also the EMUcountries, BUT in 2001 Greece became a EMU member.
So in the interval (1999:2000)  
# all euro countries are represented and from 2001- all euro+GREECE=euro2
are represented.

EMUmix4 <- Reduce(`&`, lapply(countries, function(x,y){!country1 %in% euro2
& country2 %in% euro2}))


The problem is that Greece is part of 'noneuro', like this you negate
'country* %in% euro2'.
See if it works, I'm not sure.


Rui Barradas


--
View this message in context: http://r.789695.n4.nabble.com/Assignment-problems-tp4578672p4584971.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list