Skip to content
Prev 279998 / 398506 Next

how to assign a value?

On 2011-12-12 0:00, David Winsemius wrote:
yes, it was what I intended.
The question is why

get(paste("a.", i, sep = ""))[i] <- i+50

give the following error message:

Error in get(paste("a.", i, sep = ""))[i] <- i + 50 :
   target of assignment expands to non-language object

The a.1 to  a.9 was created in the previous step.

if only

get(paste("a.", i, sep = ""))[i]

can give correct output. Why I cannot assign values to it?


Regards,
Jinsong