search for: bengood1

Displaying 1 result from an estimated 1 matches for "bengood1".

2012 Jun 11
2
replacing values of matrix with random values of another dataframe
...1,]) for (i in 2:21) { search_strat_good <- cbind(search_strat_good,sample(landscenarios,1000,replace=T,prob=com_avgpgood[i,])) } #replace all search strategies of value "1" within matrix "search_strat_good" #with a random value from dataframe "m_good_D1" bengood1=ifelse(search_strat_good==1,sample(m_good_D1,replace=F),search_strat_good) Any help would be greatly appreciated. -- Curtis Burkhalter [[alternative HTML version deleted]]