[Rd] Error importing data (PR#9409)

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Dec 5 10:44:22 CET 2006


Please, how do you define a "blank" value?

The following works perfectly for me:

File looks like:

SpaceTabSpace
1Tab2


R> read.table(file, sep="\t")
   V1 V2
1 NA NA
2  1  2


Uwe Ligges


neoscopio at gmail.com wrote:
> Full_Name: Miguel Andrade
> Version: 2.3.1
> OS: Linux
> Submission from: (NULL) (213.63.192.244)
> 
> 
> $platform
> [1] "i486-pc-linux-gnu"
> $arch
> [1] "i486"
> $os
> [1] "linux-gnu"
> $system
> [1] "i486, linux-gnu"
> $status
> [1] ""
> $major
> [1] "2"
> $minor
> [1] "3.1"
> $year
> [1] "2006"
> $month
> [1] "06"
> $day
> [1] "01"
> $`svn rev`
> [1] "38247"
> $language
> [1] "R"
> $version.string
> [1] "Version 2.3.1 (2006-06-01)"
> 
> 
> Description:
> 
> When importing data with like read.table("data.csv",blank.lines.skip = FALSE)
> Gives an error if first line is blank: "Empty beginning of file"
> 
> This is not wanted, as the case someone needs to fill a blank value as a first
> case. This is useful to import data to a variable in a dataset. If first line is
> not blank, then it behaves normally.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list