Most efficient way to create sequential string vector in R -
this question has answer here:
what efficient way in r?
vic <- c() for(i in 1:12){ vic[i] <- paste0("ng.fwd.p_tfi_m",i,":hello") }
vectorizing loop:
paste0("ng.fwd.p_tfi_m",1:12,":hello") wiki
Comments
Post a Comment