[Solved] Calling variable in matrix with another variable, R
[ad_1] It looks like you’re talking about a data frame, not a matrix. You can use names(Fires) to get a vector of column names, and use that to go from your variables to a column reference: X <- 1 Y <- 1 column.name <- paste0( X, Y ) Fires[ , column.name ] EDIT: in fact, … Read more