You might want to consider the use of 'attr' to assign attributes to an
object.  That way you can keep your object as a data.frame:

> attr(x,"title") <- "Most Significant"
> attr(x,"title")
[1] "Most Significant"



On 4/4/06, Larry Howe <linux@comjet.com> wrote:
>
> Hi,
>
> I'm new to R, and I'm not a statistician (stunned silence). I am trying to
> do
> the following:
>
> 1. read in a 2-column data file, e.g.
>
> status  new
> db      green
> title   "Most Significant Excursions"
>
> 2. end up with an R list such that I can write e.g.
>
> lst$title
>
> and have R return "Most Significant Excursions".
>
> I know I could do this by coding
>
> lst = list(title="Most Significant Excursions")
>
> however I would like to populate the list at runtime from a data file. I
> have
> tried
>
> df = read.delim("params.txt", as.is=T)
>
> and that gives me a data frame with the data in it. It seems to be a
> 2-element
> list where the first element is the first column of data and the second
> element is the second column of data. Not what I want.
>
> Maybe this is a related question: what's the relation between names,
> dimnames,
> row.name, and rownames? Is there any way to select records out of a data
> frame or vector based on any of these attributes?
>
> Thanks,
> Larry Howe
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>



--
Jim Holtman
Cincinnati, OH
+1 513 646 9390 (Cell)
+1 513 247 0281 (Home)

What the problem you are trying to solve?

	[[alternative HTML version deleted]]


