0

I have a list and need to assign a name to an element within that list that happens to contain brackets, but I need to do this without converting the name to a quoted string. For example:

    try = list()
    try[[1]] = list(beta[1,1]=1.74)

which would result in

   > try
   [[1]]
   [[1]]$beta[1,1]
   [1] 1.74

However, I can't figure out how to do this in R without converting the name to a quoted string

    try[[1]] = list('beta[1,1]'=1.74)

which results in

   > try
   [[1]]
   [[1]]$`beta[1,1]`
   [1] 1.74

Any help would be appreciated. I hope what I'm trying to do is possible. Thanks in advance.

4

0 回答 0