As the other poster noted, you can just skip lines.

Big matrix should work just fine, except I am not sure how the dates will
be handled

Here is some sample code from my stuff
txtName   is the file name of the file you are reading
Directory   is the path where you want to write the file.backed matrix
filename    is the file.backed big matrix
dname      is a filename for describing the data
sep           What's your separator, comma or space?  below I use tab,
because my file is tab delimited

replace my column names with yours

PERMNO          DATE    TICKER        PERMCO             PRC
VOL    NUMTRD        vwretd        ewretd"

Your dates may be coerced in factors. Not sure how that will work.
You can also try ff

  options(bigmemory.allow.dimnames=TRUE)
 D    <- read.big.matrix(txtName, skip = 5,
                             backingpath = Directory,
                              backingfile = filename,
                             descriptorfile = dname,
                             sep = "\t",
                             type = "double",
                             col.names =
 c("Id","SeriesNo","Date","Temp","Unc","Obs","Tobs")
                             )



On Sat, Mar 24, 2012 at 9:20 PM, iliketurtles <isaacm...@gmail.com> wrote:

> Thanks to all the suggestions. To the first individual that replied, I
> can't
> do any stuff with unix or perl. All I know is R.
>
> @KEN:
> I'm using Windows 7, 64 bit.
>
> @Steve:
> Here's the readLines output.. As we can see, lines 1-3 are empty and line 5
> is empty, and there's also empty elements after line 5!.
>
>  [1] " "
>  [2] "
> "
>  [3] " "
>  [4] "  PERMNO          DATE    TICKER        PERMCO             PRC
> VOL    NUMTRD        vwretd        ewretd"
>  [5] ""
>  [6] "   10000    06/01/1986                    7952          .
> .         .     -0.000138      0.001926"
>  [7] "   10000    07/01/1986    OMFGA           7952        -2.56250
> 1000         .      0.013809      0.011061"
>  [8] "   10000    08/01/1986    OMFGA           7952        -2.50000
> 12800         .     -0.020744     -0.005117"
>  [9] "   10000    09/01/1986    OMFGA           7952        -2.50000
> 1400         .     -0.011219     -0.011588"
>  [10] "   10000    10/01/1986    OMFGA           7952        -2.50000
> 8500         .      0.000083      0.003651"
>  [11] "   10000    13/01/1986    OMFGA           7952        -2.62500
> 5450         .      0.002749      0.002433"
>
> -----
> ----
>
> Isaac
> Research Assistant
> Quantitative Finance Faculty, UTS
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Handling-8GB-txt-file-in-R-tp4500971p4502706.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to