[R-SIG-Finance] XTS Modification
Tyler Hammond
thammond at millburncorp.com
Wed Oct 22 17:05:17 CEST 2008
You can also look into Rdbi and RdbiPgSQL from http://bioconductor.org.
For inserting large datasets, psql with \copy is much faster.
On 2008 Oct 22, at 10:53 AM, Jeff Ryan wrote:
> Take a look at:
>
> http://cran.r-project.org/web/packages/RPostgreSQL/index.html
>
> or as Wayne mentioned RODBC.
>
> I have used neither yet.
>
> You might find it faster to use the database's own bulk import
> mechanism with the csv files though.
>
> Jeff
>
> On Wed, Oct 22, 2008 at 9:46 AM, SMS CHAUHAn <sms.chauhan at mu-
> sigma.com> wrote:
>> It would upload this data to a Postgresql server.
>>
>>
>>
>> Regards,
>>
>> SMS
>>
>>
>>
>> _____
>>
>> From: malcolm croucher [mailto:malcolm.croucher at gmail.com]
>> Sent: Wednesday, October 22, 2008 8:02 PM
>> To: Wayne.W.Jones at shell.com
>> Cc: sms.chauhan at mu-sigma.com; r-sig-finance at stat.math.ethz.ch
>> Subject: Re: [R-SIG-Finance] XTS Modification
>>
>>
>>
>> Would this package allow you to upload straight to a mysql or sql
>> database ?
>>
>> Regards
>>
>> Malcolm
>>
>> On Wed, Oct 22, 2008 at 4:10 PM, <Wayne.W.Jones at shell.com> wrote:
>>
>>
>>
>> Another method would be to use the package RODBC.
>>
>> Wayne
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: r-sig-finance-bounces at stat.math.ethz.ch
>> [mailto:r-sig-finance-bounces at stat.math.ethz.ch]On Behalf Of SMS
>> CHAUHAn
>> Sent: 22 October 2008 14:40
>> To: r-sig-finance at stat.math.ethz.ch
>> Subject: [R-SIG-Finance] XTS Modification
>>
>>
>> Hi,
>>
>> I am a newbie to R.
>>
>> I am trying to write some stock data to a csv file.
>>
>> Here is the code.
>>
>>
>>
>> <code>
>>
>> library(xts)
>>
>> library(Defaults)
>>
>> library(quantmod)
>>
>> library(TTR)
>>
>> getSymbols("IBM")
>>
>> write.csv(IBM, file="IBM.csv")
>>
>> </code>
>>
>>
>>
>> Later I would use this csv file to write data into an SQL database.
>> Here is
>> where I face the problem. In the tool I will be using, column
>> headers have
>> to be mapped between csv and SQL fields. In the CSV file I get, the
>> date
>> column does not have any column header. There is a workaround to
>> edit the
>> csv and add the column header. But can I dynamically add the date
>> id field
>> as a regular field in the xts data above before I write it to the
>> csv.
>>
>>
>>
>> Thanks,
>>
>> SMS Chauhan
>>
>>
>> ***********************************************************************
>> This e-mail and any files transmitted with it are for the sole use
>> of the
>> intended recipient(s) and may contain confidential and privileged
>> information. If you are not the intended recipient, please contact
>> the
>> sender by reply e-mail and destroy all copies and the original
>> message. Any
>> unauthorized review, use, disclosure, dissemination, forwarding,
>> printing or
>> copying of this email or any action taken in reliance on this e-
>> mail is
>> strictly prohibited and may be unlawful.
>>
>> The recipient acknowledges that Mu Sigma or its subsidiaries and
>> associated
>> companies (collectively " Mu Sigma Inc), are unable to exercise
>> control or
>> ensure or guarantee the integrity of over the contents of the
>> information
>> contained in e-mail transmissions and further acknowledges that any
>> views
>> expressed in this message are those of the individual sender and no
>> binding
>> nature of the message shall be implied or assumed unless the sender
>> does so
>> expressly with due authority of Mu Sigma. Before opening any
>> attachments
>> please check them for viruses and defects.
>> ***********************************************************************
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>>
>>
>>
>> --
>> Malcolm A.B Croucher
>>
>>
>> ***********************************************************************
>> This e-mail and any files transmitted with it are for the sole use
>> of the intended recipient(s) and may contain confidential and
>> privileged information. If you are not the intended recipient,
>> please contact the sender by reply e-mail and destroy all copies
>> and the original message. Any unauthorized review, use, disclosure,
>> dissemination, forwarding, printing or copying of this email or any
>> action taken in reliance on this e-mail is strictly prohibited and
>> may be unlawful.
>>
>> The recipient acknowledges that Mu Sigma or its subsidiaries and
>> associated companies (collectively " Mu Sigma Inc), are unable to
>> exercise control or ensure or guarantee the integrity of over the
>> contents of the information contained in e-mail transmissions and
>> further acknowledges that any views expressed in this message are
>> those of the individual sender and no binding nature of the message
>> shall be implied or assumed unless the sender does so expressly
>> with due authority of Mu Sigma. Before opening any attachments
>> please check them for viruses and defects.
>> ***********************************************************************
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>
>
>
> --
> Jeffrey Ryan
> jeffrey.ryan at insightalgo.com
>
> ia: insight algorithmics
> www.insightalgo.com
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
######################################################################
This email is confidential, does not constitute investment advice, is
only for the use of the intended recipient and should not be
redistributed, except with the sender's consent. If you received this
email in error, please notify us immediately by telephone; receipt by
anyone other than the intended recipient is not a waiver of any
work-product or attorney-client privilege. All email to and from
Millburn Ridgefield Corporation and its affiliates is monitored,
stored and made available to regulators if requested.
######################################################################
More information about the R-SIG-Finance
mailing list