Suppose I have a variable:
x <- "Cat"
This variable x must define the name of another variable"
[x] <- c(1,2,3)
that is, in this example:
Cat <- c(1,2,3)
Any tip?
CodePudding user response:
Here.
x <- "cat"
assign(x = x, value = 1:3)
Suppose I have a variable:
x <- "Cat"
This variable x must define the name of another variable"
[x] <- c(1,2,3)
that is, in this example:
Cat <- c(1,2,3)
Any tip?
CodePudding user response:
Here.
x <- "cat"
assign(x = x, value = 1:3)