if your data for the rest of the file looks like this then read.fwf will
work.
depending which vars you want to pull)
widths= c(18,32,41)
E-CBIL-28-raw-cel-1435145228.cel1
would pull 3 vars, E-CBIL-28-raw-cel-; 1435145228.cel;1
widths <-c(32,41)
E-CBIL-28-raw-cel-1435145228.cel;1
you
Or do we, what's the word... imbue it."
- Jubal Early, Firefly
From:
Henrique Dallazuanna
To:
amindlessbrain
Cc:
r-help@r-project.org
Date:
10/26/2010 11:08 AM
Subject:
Re: [R] Reading in a tab delimitated file
Sent by:
r-help-boun...@r-project.org
Try this:
Lines <- "
Try this:
Lines <- "SampleIDDisease
E-CBIL-28-raw-cel-1435145228.cel1
E-CBIL-28-raw-cel-1435145451.cel2
E-CBIL-28-raw-cel-1435145479.cel2
E-CBIL-28-raw-cel-1435145132.cel3
E-CBIL-28-raw-cel-1435145417.cel3
E-CBIL-28-raw-cel-1435145301.cel2
E-
"A call to read.table(..., sep = "", ...) reads in any length of whitespace
as the delimiter. On your sample text it read in a 2 column dataframe. "
Thanks! That works for the file, but when I enter in my next line of code it
doesn't work. I'm not sure if this is the problem, or if the next line
If I try that I get this:
Error in scan(file, what = "", sep = sep, quote = quote, nlines = 1, quiet =
TRUE, :
invalid 'sep' value: must be one byte
?
--
View this message in context:
http://r.789695.n4.nabble.com/Reading-in-a-tab-delimitated-file-tp3013620p3013771.html
Sent from the R he
(304) 724-4480
"Is the room still a room when its empty? Does the room,
the thing itself have purpose? Or do we, what's the word... imbue it."
- Jubal Early, Firefly
From:
Ùukasz Ræcùawowicz
To:
amindlessbrain
Cc:
r-help@r-project.org
Date:
10/26/2010 09:34 AM
Subject:
2010/10/26 amindlessbrain
>
> (I'm not sure why the disease column isn't showing up as a tab here, but it
> is sep by "\t" in my file.
>
You've got a double tab space, I don't know is there a prettier way, but
paste this:
pd<-read.delim("new_treat.txt",sep="")
--
Mi³ego dnia
7 matches
Mail list logo