Re: [R] for loop and if problem

2009-01-13 Thread Sake
Thanks! Why did I not think at that myself. .csv means 'Comma Separated Value' David Winsemius wrote: > > write.csv does exactly what you would expect ... creates a *Comma* > Separated Values file. If you don't want a comma separated value > format then use write.table with sep=";" > > Yo

Re: [R] for loop and if problem

2009-01-12 Thread Prof Brian Ripley
There is write.csv2 on the same help page as write.csv! 'write.csv' uses '"."' for the decimal point and a comma for the separator. 'write.csv2' uses a comma for the decimal point and a semicolon for the separator, the Excel convention for CSV files in some Western Europ

Re: [R] for loop and if problem

2009-01-12 Thread David Winsemius
write.csv does exactly what you would expect ... creates a *Comma* Separated Values file. If you don't want a comma separated value format then use write.table with sep=";" You can still name it "whatever.csv". Or you if you also intend commas for decimal points, use write.csv2 as describ

Re: [R] for loop and if problem

2009-01-12 Thread jim holtman
Try using: write.table(..., sep=";") write.csv just calls write.table On Mon, Jan 12, 2009 at 6:38 AM, Sake wrote: > > I have one final question... > How can I save a CSV ifile with ; separation in stead of , separation? > I know the write.csv(file="filename.csv") an that you can use sep=";" wh

Re: [R] for loop and if problem

2009-01-12 Thread Sake
I have one final question... How can I save a CSV ifile with ; separation in stead of , separation? I know the write.csv(file="filename.csv") an that you can use sep=";" when you open a .csv file, but that doesn't work with the write.csv command. -- View this message in context: http://www.nabbl

Re: [R] for loop and if problem

2009-01-07 Thread Gabor Grothendieck
On Wed, Jan 7, 2009 at 3:51 AM, Sake wrote: > aggregate(data[, c("Exon_Start.Chr.")], by = list(data$Gene), min) > aggregate(data[, c("Exon_Stop.Chr.")], by = list(data$Gene), max) That could be written: aggregate(data["Excon_Start.Chr."], data["Gene"], min) aggregate(data["Excon_Start.Chr."], d

Re: [R] for loop and if problem

2009-01-07 Thread Sake
Sake wrote: > > Hi, > > I'm heaving difficulties with a dataset containing gene names and > positions of those genes. > Not such a big problem, but each gene has multiple exons so it's hard to > say where de gene starts and where it ends. I want the starting and ending > position of each gene i

Re: [R] for loop and if problem

2009-01-06 Thread Charles C. Berry
On Tue, 6 Jan 2009, Sake wrote: Hi, I'm heaving difficulties with a dataset containing gene names and positions of those genes. Not such a big problem, but each gene has multiple exons so it's hard to say where de gene starts and where it ends. I want the starting and ending position of each g

Re: [R] for loop and if problem

2009-01-06 Thread Philipp Pagel
On Tue, Jan 06, 2009 at 07:21:48AM -0800, Sake wrote: > I'm heaving difficulties with a dataset containing gene names and positions > of those genes. > Not such a big problem, but each gene has multiple exons so it's hard to say > where de gene starts and where it ends. I want the starting and endi

Re: [R] for loop and if problem

2009-01-06 Thread Richard . Cotton
> I'm heaving difficulties with a dataset containing gene names and positions > of those genes. > Not such a big problem, but each gene has multiple exons so it's hard to say > where de gene starts and where it ends. I want the starting and ending > position of each gene in my dataset. > Attached

[R] for loop and if problem

2009-01-06 Thread Sake
Hi, I'm heaving difficulties with a dataset containing gene names and positions of those genes. Not such a big problem, but each gene has multiple exons so it's hard to say where de gene starts and where it ends. I want the starting and ending position of each gene in my dataset. Attached is the