You can also use write.table(y,"D:/Desktop/export_table.txt", col.names=NA)
with this function call, the row names get printed but the column names are offset so that they are aligned in the right column. --- Chuck Cleland <[EMAIL PROTECTED]> wrote: > Sergio Della Franca wrote: > > Dear R-Helpers, > > > > I have a problem. > > > > I want to export from R to .txt my data set(y): > > > > YEARS PRODUCTS > > 1990 10 > > 1995 15 > > 1997 26 > > 1998 29 > > 2000 34 > > > > > > I used this code: > > > > write.table(y,"D:/Desktop/export_table.txt"). > > > > This procedure run correctly, but i acquired this result: > > > > YEARS PRODUCTS > > 1 1990 10 > > 2 1995 15 > > 3 1997 26 > > 4 1998 29 > > 5 2000 34 > > > > The prolem is that R add a column in the export procedure, but it doesn't > > give a name at column then this new column get the name of the first > column > > of my data set. > > > > There is a command that a must add to my export procedure to not export > this > > column or to give at this a name? > > write.table(y,"D:/Desktop/export_table.txt", row.names=FALSE) > > The row.names and col.names arguments are described in the help page > for write.table(). > > > Thank you in advance. > > > > > > Sergio. > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@stat.math.ethz.ch 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. > > -- > Chuck Cleland, Ph.D. > NDRI, Inc. > 71 West 23rd Street, 8th floor > New York, NY 10010 > tel: (212) 845-4495 (Tu, Th) > tel: (732) 512-0171 (M, W, F) > fax: (917) 438-0894 > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > ____________________________________________________________________________________ Need Mail bonding? ______________________________________________ R-help@stat.math.ethz.ch 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.