[R] R: x-y data
Jeff Newmiller
jdnewmil at dcn.davis.ca.us
Wed Jun 6 17:23:09 CEST 2007
Or read ?attach
attach(something)
(x+y)/2
detach(something)
jim holtman wrote:
> Can you provide an example of your data. Assuming that you have a .cvs file
> and the column names are 'x' and 'y' and you have used 'read.csv', then you
> would have:
>
> (something$x + something$y) / 2
>
>
>
> On 6/5/07, tronter <pev340002003 at yahoo.com> wrote:
>>
>> Hello
>>
>> I have an Excel file with x-y data. I saved this file as a cvs file. Then
>> I
>> used the read.table() function to read the data into R. If I have a
>> formula
>> like (x+y)/2, how would I access x and y in R? I have the table named as
>> something. But how do I access the individual columns if I want to plug
>> them
>> into the formula?
--
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
More information about the R-help
mailing list