r:使用lapply为栅格分配值

I'm trying to assign values to a number of raster files in a folder, and apply the raster() function to them, with the eventual aim to plot, stack, and subject algebra to them. So each raster file in the folder would be assigned to "r1", "r2" etc. So far I have:

f <- list.files(path="path/to/files", pattern="*.tif", full.names=TRUE, recursive=FALSE)
r <- lapply(f, raster)
lapply(r, function(i){
  assign(paste0("r", i), i)
})

但是,如果我返回r1,则仅给出以下输出:

> r1
[1] 1

我不太确定如何确保r返回实际的栅格,而不仅仅是返回整数。