On 08/12/2011 3:28 PM, Pavan G wrote:
Hello All,
This works,
results<- read.table("plink.txt",T)

while this doesn't.
results<- read.table("plink.txt")
   Make sure your data frame contains columns CHR, BP, and P

What does adding the "T" in read.table do? Which argument does this
correspond to? I tried searching for it but didn't find the answer in:


      read.table(file, header = FALSE, sep = "", quote = "\"'",
                 dec = ".", row.names, col.names,
                 as.is = !stringsAsFactors,
                 na.strings = "NA", colClasses = NA, nrows = -1,
                 skip = 0, check.names = TRUE, fill = !blank.lines.skip,
                 strip.white = FALSE, blank.lines.skip = TRUE,
                 comment.char = "#",
                 allowEscapes = FALSE, flush = FALSE,
                 stringsAsFactors = default.stringsAsFactors(),
                 fileEncoding = "", encoding = "unknown")


Could someone please explain?

You didn't name your arguments, so positional matching is used. Your call is equivalent to

read.table(file = "plink.txt", header = T)

In most users' sessions, that's the same as

read.table(file = "plink.txt", header = TRUE)

and I'd guess that's true about yours.


Duncan Murdoch

______________________________________________
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