On 07/10/2013 7:56 AM, Charles Annis wrote:
Greetings:

I have a 24 row,  2-column csv file.  The first column is character, with
the names of parameters.  The second column is numeric, containing the
parameter values.

I can produce a 2-column data.frame with  case.study.parameters <-
read.csv(...)

I want to convert the data.frame to 24 parameters having those names and
their associated numeric values.

I've tried using package "ParamHelpers" with no success.  Likely because it
really isn't intended for that purpose.

Can anyone help?

You say you want "parameters", but that's not an R type. So here's one way, but it might not be what you're looking for.

df <- data.frame(names=letters, values=1:26)
parameters <- df$values
names(parameters) <- df$names

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to