Displaying 1 result from an estimated 1 matches for "ecdfs1".
Did you mean:
ecdfs
2009 Jun 19
1
Error "the condition has length > 1 and only the first element will be used"
Ahoy. I'm trying to run a function for each country in a multinational
dataset. Keeping it simple, an example is
for(j in 11:14) {
if(data$country_str == "j") {
mu <- mean(data$ecdfs1)
} else {
mu <- 0
}
}
The number of countries is greater and the functions are more complex, but
this fails just the same. The consistent error is
In if (data$country_str == "j") { :
the condition has length > 1 and only the first element will be used
Using the inelegantly...