[R] Convert string to list?

Ross Darnell r.darnell at uq.edu.au
Fri Jul 27 02:51:55 CEST 2007

Is this what your want?


Ross Darnell

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Manuel Morales
Sent: Friday, 27 July 2007 10:39 AM
To: r-help
Subject: [R] Convert string to list?

Let's say I have the following string:

str <- "P = 0.0, T = 0.0, Q = 0.0"

I'd like to find a function that generates the following object from

list(P = 0.0, T = 0.0, Q = 0.0)



R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list