Re: [R] Trouble with arguments to 'order'

2013-05-28 Thread Barry King
Thank you for your assistance. I went with Peter's solution. All is working well now. - Barry On Tue, May 28, 2013 at 4:12 AM, Patrick Burns wrote: > If I understand your problem correctly, > you want to use '[[' instead of '$': > > order(parameters[["ItemColumn"**]], parameters[["PriceColumn"

Re: [R] Trouble with arguments to 'order'

2013-05-28 Thread Patrick Burns
If I understand your problem correctly, you want to use '[[' instead of '$': order(parameters[["ItemColumn"]], parameters[["PriceColumn"]]) On 28/05/2013 07:06, Barry King wrote: I have an Excel worksheet with 20 rows. Using XLConnect I successfully read the data into 'indata'. In order to

Re: [R] Trouble with arguments to 'order'

2013-05-27 Thread peter dalgaard
On May 28, 2013, at 08:06 , Barry King wrote: > I have an Excel worksheet with 20 rows. Using XLConnect I successfully > read the data into 'indata'. In order to sort it on the 'Item' column > and the 'Price_Per_Item' column I submit: > > index <- with(indata, order(Item, Price_Per_Item)) > so

[R] Trouble with arguments to 'order'

2013-05-27 Thread Barry King
I have an Excel worksheet with 20 rows. Using XLConnect I successfully read the data into 'indata'. In order to sort it on the 'Item' column and the 'Price_Per_Item' column I submit: index <- with(indata, order(Item, Price_Per_Item)) sortedData <- indata[index, ] The above works fine but now I