Re: [R] save() unable to find object

2019-10-31 Thread Christofer Bogaso
Thanks Duncan. It worked. On Thu, Oct 31, 2019 at 3:02 PM Duncan Murdoch wrote: > > On 31/10/2019 5:17 a.m., Christofer Bogaso wrote: > > As I said the name 'AAA31' is itself a variable. So I cant hard-code > > it within the save() function > > Use the list= argument to save(). > > Duncan Murdoch

Re: [R] save() unable to find object

2019-10-31 Thread peter dalgaard
Try the list= argument save(list= c("Date", paste(.)), file=) If you use ..., you'll get bitten by ...: the names of the objects to be saved (as symbols or character strings). and the paste() construct is neither. (Internally, it gets converted by as.character(substitute

Re: [R] save() unable to find object

2019-10-31 Thread Duncan Murdoch
On 31/10/2019 5:17 a.m., Christofer Bogaso wrote: As I said the name 'AAA31' is itself a variable. So I cant hard-code it within the save() function Use the list= argument to save(). Duncan Murdoch On Thu, Oct 31, 2019 at 2:45 PM Jim Lemon wrote: Hi Christofer, This is a guess, but have

Re: [R] save() unable to find object

2019-10-31 Thread Ivan Krylov
On Thu, 31 Oct 2019 14:39:48 +0530 Christofer Bogaso wrote: > Error in save("Date", paste("AAA", format(Date, "%d"), sep = ""), file > = "Save.RData") : > object ‘paste("AAA", format(Date, "%d"), sep = "")’ not found save() uses non-standard evaluation [*], which means that, instead of just ge

Re: [R] save() unable to find object

2019-10-31 Thread Christofer Bogaso
As I said the name 'AAA31' is itself a variable. So I cant hard-code it within the save() function On Thu, Oct 31, 2019 at 2:45 PM Jim Lemon wrote: > > Hi Christofer, > This is a guess, but have you tried: > > save(AAA31,file="Save.RData") > > Jim > > On Thu, Oct 31, 2019 at 8:10 PM Christofer Bo

Re: [R] save() unable to find object

2019-10-31 Thread Jim Lemon
Hi Christofer, This is a guess, but have you tried: save(AAA31,file="Save.RData") Jim On Thu, Oct 31, 2019 at 8:10 PM Christofer Bogaso wrote: > > Hi, > > I wanted to save a few R objects in RData file for some future use. > The names of such R objects are actually dynamic so I used below code

[R] save() unable to find object

2019-10-31 Thread Christofer Bogaso
Hi, I wanted to save a few R objects in RData file for some future use. The names of such R objects are actually dynamic so I used below code to save them - Date = Sys.Date() assign(paste('AAA', format(Date, "%d"), sep = ""), 5) save('Date', paste('AAA', format(Date, "%d"), sep = ""), file = 'Sav