Re: [R] RODBC question: problem importing series with blank cells

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 09 Jun 2005 - 00:06:00 EST

On Wed, 8 Jun 2005, Lapointe, Pierre wrote:

> Hello,
>
> I have an excel file that I load through RODBC. Some of my columns are
> blank. They are equity time series and the stocks did not exist at the
> earlier dates. My problem is that the whole column becomes <NA> even though
> there are numbers at later dates.

My Excel ODBC driver is sending NULLs for those rows, so I think this is an ODBC driver problem.

>
> Here's my excel file
>
> http://www.tradebit.com/download.php/35699
> <http://www.tradebit.com/download.php/35699>
>
> And here's the code I use:
>
> library(RODBC)
> chan <- odbcConnectExcel("C:/book54.xls") #load data
> ts<- sqlFetch(chan, "Sheet1")
> close(chan)
> ts<-ts[-1,]
>
> str(ts)
> head(ts)
> tail(ts)
>
>
>
> Regards,
>
> Pierre Lapointe
> Assistant Market Strategist
> National Bank Financial
>
>
> ***********************************************************************************
> AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jun 09 00:14:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:27 EST