Skip to content

Instantly share code, notes, and snippets.

@aurielfournier
Created May 30, 2018 16:17
Show Gist options
  • Select an option

  • Save aurielfournier/5feabdea7bd3f0a809767386a528bc1e to your computer and use it in GitHub Desktop.

Select an option

Save aurielfournier/5feabdea7bd3f0a809767386a528bc1e to your computer and use it in GitHub Desktop.
len = 10
position = seq(2,length)
vectors <- list()
vectors[[1]] <- rep(1, times=len)
for(i in position){
newvec <- vectors[[1]]
newvec[i] <- 1.01
vectors[[i]] <- newvec
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment