Re: [R] Remove carriage return in writing tab-delimited file.

2012-04-05 Thread Patrick Connolly
On Wed, 04-Apr-2012 at 02:58PM -0700, kickout wrote:

|> Having problems with the write.table function. I can write a tab delimited
|> file just fine, but for each line in my matrix its inputs a carriage return
|> when i dont want it to.
|> 
|> For example my matrix might be:
|> 
|> ID V1 V2 V3
|> FARY1004 1 2 3
|> FARY2067 2 3 1
|> FARY4587 2 2 2
|> 
|> And I want the written File to be:
|> 
|> FARY1004 1 2 3FARY2067 2 3 1FARY4587 2 2
|> 2

If you're really keen on using write.table, setting eol = "" should
produce what you want.  (I'm assuming the last character in your email
was line wrapped by your email client.)

HTH






|> 
|> TIA
|> 
|> --
|> View this message in context: 
http://r.789695.n4.nabble.com/Remove-carriage-return-in-writing-tab-delimited-file-tp4533322p4533322.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.

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
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.


Re: [R] Remove carriage return in writing tab-delimited file.

2012-04-04 Thread Justin Haynes
take a look at ?paste

paste(yourmatrix, sep='\t', collapse='')

On Wed, Apr 4, 2012 at 2:58 PM, kickout  wrote:
> Having problems with the write.table function. I can write a tab delimited
> file just fine, but for each line in my matrix its inputs a carriage return
> when i dont want it to.
>
> For example my matrix might be:
>
> ID V1 V2 V3
> FARY1004 1 2 3
> FARY2067 2 3 1
> FARY4587 2 2 2
>
> And I want the written File to be:
>
> FARY1004     1     2     3FARY2067     2     3     1FARY4587     2     2
> 2
>
> TIA
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Remove-carriage-return-in-writing-tab-delimited-file-tp4533322p4533322.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.

__
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.


Re: [R] Remove carriage return in writing tab-delimited file.

2012-04-04 Thread David Winsemius


On Apr 4, 2012, at 5:58 PM, kickout wrote:

Having problems with the write.table function. I can write a tab  
delimited
file just fine, but for each line in my matrix its inputs a carriage  
return

when i dont want it to.

For example my matrix might be:

ID V1 V2 V3
FARY1004 1 2 3
FARY2067 2 3 1
FARY4587 2 2 2

And I want the written File to be:

FARY1004 1 2 3FARY2067 2 3 1FARY4587  
2 2

2


> apply(dat,1,cat)
FARY1004 1 2 3FARY2067 2 3 1FARY4587 2 2 2NULL

--

David Winsemius, MD
West Hartford, CT

__
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.


[R] Remove carriage return in writing tab-delimited file.

2012-04-04 Thread kickout
Having problems with the write.table function. I can write a tab delimited
file just fine, but for each line in my matrix its inputs a carriage return
when i dont want it to.

For example my matrix might be:

ID V1 V2 V3
FARY1004 1 2 3
FARY2067 2 3 1
FARY4587 2 2 2

And I want the written File to be:

FARY1004 1 2 3FARY2067 2 3 1FARY4587 2 2
2

TIA

--
View this message in context: 
http://r.789695.n4.nabble.com/Remove-carriage-return-in-writing-tab-delimited-file-tp4533322p4533322.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.