[R] accessing information in data.frame

Dr. Berthold Kramm berthold.kramm at epost.de
Tue Nov 27 14:32:27 CET 2001

After reading a data.frame using, such as a <- read.spss("data.sav")
I want to give the column index 'i', or a[i] to a function, which after
some calculation, should print out the results to the standard output.

I am struggling how to access the data itself, as e.g. sum(a[i]) does
not work in this context. In addition I need to know the name of the
variable within the function in order to generate a meaningful output,
and  have not found any way to obtain the name of the variable.

Thanks for your input,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: berthold.kramm.vcf
Type: text/x-vcard
Size: 214 bytes
Desc: Card for Dr. Berthold Kramm
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20011127/318db43d/berthold.kramm.vcf

More information about the R-help mailing list