Is there any way of using vector's assigned string value as a variable name.

nomotionx <- matrix()
for(i in 1:9){
  nomotionx[i] = print(paste(nomotion,i,sep =""))
}

This is the code I have. Now I would like to use stored string value in corresponding vector as a variable name using loop. Is it possible to do so using R?

Could you show what you want nomotionx to be at the end?

Usually, readable and safe R code doesn't mix variables' names and values. What task is this part of? If you're new to R, we could tell you an easier way to do what you want. A reproducible example (reprex) would make it easy for us to help you:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.