I'm trying to assign something to the output of Sys.Date(). For example, say I want to name the object with today's date:
format(Sys.Date(), "%b%d") <- mtcars
I get the error:
invalid (NULL) left side of assignment.
I tried:
eval(parse(text = format(Sys.Date(), "%b%d"))) <- mtcars
Gets the same error msg. What am I missing / is there a solution?
eval()andassign()functions because they create unnecessary overhead.x[["Sep11"]] <- mtcarsor a function that returns a string valuex[[format(Sys.Date(), "%b%d")]] <- mtcars. Then you'll have all the values nicely stored inxand you can get at them withx[["Sep11"]]orx$Sep11or even apply a function to each element in the list.