R Create Variable Name Using paste Function (Example) | New Data Object | assign & paste0 Functions

preview_player
Показать описание
R code of this video:

x1 <- 1:5 # Typical way to create variable
x1 # Return variable to console

assign(paste0("x_", 2), 1:5) # Using assign function
x_2 # Return new variable to console

Follow me on Social Media:
Рекомендации по теме
Комментарии
Автор

I've been looking for this solution. Thank you.

dangunwangum