Displaying 1 result from an estimated 1 matches for "var_2000".
Did you mean:
aa_2000
2018 Apr 10
1
Fail to save an object using name as string
...member,
I think that I have detected a strange behavior of the save() command:
> year <- "2000"
> assign(paste0("Var_", year), list(A=10, B=20))
> get(paste0("Var_", year))
$A
[1] 10
$B
[1] 20
# At this point all is ok, I have created a list of name Var_2000
> save(paste0("Var_", year), file=paste0("Var_", year, ".Rdata"))
Error in save(paste0("Var_", year), file = paste0("Var_", year,
".Rdata")) :
? objet ?paste0("Var_", year)? introuvable
(introuvable=cannot be found)
but...