Skip to content
Prev 9510 / 21318 Next

[Bioc-devel] Experimental data package or ExperimentHub

dear Valerie,

This is a simple R question, but I can't seem to find the answer. I'm
assuming ExperimentHub wants object created by save() and not
saveRDS().

In make-data.R, I have a loop where I programmatically make a
GAlignmentPairs object for each of 4 samples. I'm then using assign()
to assign the value to an appropriate name, e.g.

assign(sample.name[i], x)

where x is a GAlignmentPairs object I've made.

I'm having trouble though saving this to a file. My first try was:

save(sample.name[i], file=paste0(sample.name[i],".rda"))

But this gives:

Error in save(sample.name[i], file = ...
  object 'sample.name[i]' not found

I also tried get(), but it's also giving the "not found" error.

save(get(sample.name[i]), file=paste0(sample.name[i],".rda"))


thanks
Mike

On Thu, Jun 30, 2016 at 6:41 PM, Obenchain, Valerie
<Valerie.Obenchain at roswellpark.org> wrote:
Message-ID: <CADqzidUpRt9tOiXwjV_qannxpC-fv3cBJm+8eg+UbQo3ivxEtw@mail.gmail.com>
In-Reply-To: <DM2PR12MB00316BB15141292B418B286CFF240@DM2PR12MB0031.namprd12.prod.outlook.com>