r - Replace 10000 elements -


suppose there object of million numbers: c(1:1000000).
10000-element subset of these c(78,460,...,999390,999612) ideally replaced numbers c(1:10000).

total<-c(1:1000000) out<-c(78,460,...,999390,999612) in<-c(1:10000) # reach output: total<-c(1:77,1,79:459,2,461:...etc) 

i create hugely long logical total==78|total==460|total==...|etc, takes ages run. gsub, subset, , lapply attempts have not brought success. have solution?

thank in advance!!

red


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -