Re: [R] writing a simulation

2009-08-06 Thread Meenu Sahi
Dear All I 've solved this problem... Thanks Meenu On Thu, Aug 6, 2009 at 1:28 AM, Meenu Sahi meenus...@gmail.com wrote: No its not an or condition. Please see the changed attachment. Many thanks for your help. Regards Meenu On Wed, Aug 5, 2009 at 6:36 PM, David Winsemius dwinsem

[R] Write the results of sample function which uses a dataframe into an Array

2009-08-06 Thread Meenu Sahi
Dear All? Basically I want to write the results of the sample function into an array is a specific order. The sample function uses a dataframe x.1 and therefore the result is also a dataframe and so I cannot write the result into the array in the correct order. If I convert x.1 into a matrix then

Re: [R] writing a simulation

2009-08-05 Thread Meenu Sahi
No its not an or condition. Please see the changed attachment. Many thanks for your help. Regards Meenu On Wed, Aug 5, 2009 at 6:36 PM, David Winsemius dwinsem...@comcast.netwrote: On Aug 4, 2009, at 2:12 PM, Meenu Sahi wrote: Dear R Users I'm writing my first simulation in R. I've put

Re: [R] Add columns in a dataframe and fill them from another table according to a criteria

2009-08-04 Thread Meenu Sahi
...@comcast.netwrote: Apologies to list: Should have replied to all. -- DW Begin forwarded message: From: David Winsemius dwinsem...@comcast.net Date: August 1, 2009 3:02:58 PM EDT To: Meenu Sahi meenus...@gmail.com Subject: Re: [R] Add columns in a dataframe and fill them from

[R] Caculate first difference from a dataframe; write a simulation

2009-08-04 Thread Meenu Sahi
Dear R Users I'm writing my first simulation in R. I've put across my problems with a smaller example in the attachment along with the questions. Please help. Best regards Meenu mydat-read.table(textConnection(Level spread change State 4.57 1.6 BlF NA 4.45 2.04 BrS NA 3.07 2.49 BlS NA 3.26

[R] Add columns in a dataframe and fill them from another table according to a criteria

2009-08-01 Thread Meenu Sahi
Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below:- This table gives the probabilities of the changes in the swap curve depending on the state of the swap curve. I want to put these probabilities in my dataframe mydata(given

Re: [R] Add columns in a dataframe and fill them from another table according to a criteria

2009-08-01 Thread Meenu Sahi
1, 2009 at 9:43 PM, David Winsemius dwinsem...@comcast.netwrote: On Aug 1, 2009, at 9:52 AM, Meenu Sahi wrote: Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below:- This table gives the probabilities of the changes

[R] Fill dataframe from a table according to a criteria

2009-07-31 Thread Meenu Sahi
Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below Prob of States Changes State1 State2 State3 State4 A Pa1 Pa2 Pa3 Pa4 B Pb1 Pb2 Pb3 Pb4 C Pc1

[R] Sort a dataframe on the column Date

2009-07-28 Thread Meenu Sahi
Dear Users I have a dataframe called mydata4 of the following order with the first column as a date and the rest of the columns are numeric with rate. Column 1 Rate1 : Rate 20 (PxMid) 01/01/2003 07/01/2001 -- I wish to sort this dataframe on the first col in ascending order. I

[R] Sort a column in a dataframe

2009-07-28 Thread Meenu Sahi
Dear Users This is my dataset called mydata4. I want to sort the dataframe on the first column PxMid which is basically a column with dates. I've tried mydata4-mydata4[order(mydata4$PxMid),] but it doesnt work. Could it be because these are dates? Please help I'm really stuck !! Thank you for

[R] Connection to SQL Server

2009-05-18 Thread Meenu Sahi
Dear Users I am new to R. I'm trying to make a connection to Microsoft SQL Server via R. How can I find the correct syntax to make the connection? The Help pdf file has an example for mySql but there's isnt much on SQL Server. Please help. Thanks ! Me. [[alternative HTML version

[R] Connection to Microsoft SQL Server

2009-05-18 Thread Meenu Sahi
Dear Users I am new to R. I'm trying to make a connection to Microsoft SQL Server via R. How can I find the correct syntax to make the connection? The Help pdf file has an example for mySql but there's isnt much on SQL Server. Please help. I am trying the following code library(RODBC)