Re: [R] Converting a character string into a data frame name and performing assignments to that data frame

2010-04-07 Thread Kavitha Venkatesan
iable.df, file=some.file) Thanks! Kavitha On Sat, Mar 20, 2010 at 5:07 PM, Kavitha Venkatesan wrote: > Hi, > > I would like to do the following operations: > > variable.df is a character string that contains the name of the data > frame that I want to do the following op

[R] Converting a character string into a data frame name and performing assignments to that data frame

2010-03-20 Thread Kavitha Venkatesan
Hi, I would like to do the following operations: variable.df is a character string that contains the name of the data frame that I want to do the following operations on: variable.df <- data.frame(); # I can do the above command using assign( variable.df, data.frame() ) How can I perform the as

Re: [R] tapply with multiple arguments that are not part of the same data frame

2009-10-22 Thread Kavitha Venkatesan
I just realized my earlier post of my question below was not in "Plain" Text mode, hence the repeat post...apologies! Kavitha On Thu, Oct 22, 2009 at 4:19 PM, Kavitha Venkatesan wrote: > Hi all, > > I would like to invoke a function that takes multiple arguments (some of &g

[R] tapply with multiple arguments that are not part of the same data frame

2009-10-22 Thread Kavitha Venkatesan
Hi all, I would like to invoke a function that takes multiple arguments (some of which are specified columns in the data frame, and others that are independent of the data frame) on split parts of a data frame, how do I do this? For example, let's say I have a data frame >fitness_data name heigh

Re: [R] split-apply question

2009-10-04 Thread Kavitha Venkatesan
t; > From: r-help-boun...@r-project.org > > [mailto:r-help-boun...@r-project.org] On Behalf Of hadley wickham > > Sent: Friday, October 02, 2009 6:07 AM > > To: jim holtman > > Cc: r-help@r-project.org; Kavitha Venkatesan > > Subject: Re: [R] split-apply quest

[R] split-apply question

2009-10-01 Thread Kavitha Venkatesan
Hi, I have a data frame that looks like this: >x x1 x2 x3 A 11.5 B 20.9 B 32.7 C 71.8 D 71.3 I want to "group" by the x1 column and in the case of multiple x$x1 values (e.g., "B")d, return rows that have the smallest values of x2. In the case of rows with only on

Re: [R] Obtaining the value of x at a given value of y in a smooth.spline object

2009-08-12 Thread Kavitha Venkatesan
onding x values. > > Hope this helps, > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >>

[R] Obtaining the value of x at a given value of y in a smooth.spline object

2009-08-12 Thread Kavitha Venkatesan
I have some data fit to a smooth.spline object as follows: (x=vector of data for the predictor variable, y=vector of data for the response variable) fit <- smooth.spline(x,y) Now, given a spline fit point y_new, I want to be able to find out what value of x_new yielded this fit value. How to do s

Re: [R] applying a function to a pair of components for each row of a list

2009-06-27 Thread Kavitha Venkatesan
; mylist<-list(x=1:25, y=runif(n=25)) > plot(mylist, type="n") > points(mylist, type="p", col=mylist$x) > Hth, > > miltinho > > > > On Sun, Jun 28, 2009 at 1:03 AM, Kavitha Venkatesan < > kavitha.venkate...@gmail.com> wrote: &g

[R] applying a function to a pair of components for each row of a list

2009-06-27 Thread Kavitha Venkatesan
Hi, I have a set of (x,y) coordinate pairs that are stored as a list > my_list $x [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 $y [1] -8.0866819 -7.3876052 -6.6849311 -5.9837693 -5.2967432 -4.6525466 [7] -4.0999453 -3.6556190 -3.3076102 -3.0360780 -2.8220465