You are trying to access data$column
instead of data$X1
.
data <- data.frame(X1=1:3)
data$X1
## [1] 1 2 3
data$column
## NULL
Instead try to actually access the column with the name X1 as follows:
fct <- function(data, column){
data[,column]
}
fct(data, "X1")
## [1] 1 2 3