Hi, i have an small doubt. How can we remove serial-number column while writing a dataframe in to a csv file ? for eg:- write.csv(MyDataFrame,"c:/MyData.csv") name place ----------- ----------- 1 antony uk 2 john usa 3 arjun ind here, in the csv file, serial number column is coming extra on the left-end side. i want to remove that . How it is possible, while writing into a csv file ? - Thanks in advance Antony -- View this message in context: http://r.789695.n4.nabble.com/Remove-serial-number-column-in-a-Dataframe-into-CSV-tp4642987.html Sent from the R help mailing list archive at Nabble.com.
R. Michael Weylandt
2012-Sep-13 08:28 UTC
[R] Remove serial number column in a Dataframe into CSV
On Thu, Sep 13, 2012 at 8:47 AM, Rantony <antony.akkara at ge.com> wrote:> Hi, > > i have an small doubt. > How can we remove serial-number column while writing a dataframe in to a csv > file ? > > for eg:- > write.csv(MyDataFrame,"c:/MyData.csv") > > name place > ----------- ----------- > 1 antony uk > 2 john usa > 3 arjun ind >> > here, in the csv file, serial number column is coming extra on the left-end > side. > i want to remove that . How it is possible, while writing into a csv file ?Use row.names = FALSE to write.csv() Michael.> > - Thanks in advance > Antony > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Remove-serial-number-column-in-a-Dataframe-into-CSV-tp4642987.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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.
Thanks. From: Pramod [via R] [mailto:ml-node+s789695n4642989h97@n4.nabble.com] Sent: Thursday, September 13, 2012 1:27 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Remove serial number column in a Dataframe into CSV Add another argument to write.csv(MyDataFrame,"c:/MyData.csv",row.names=FALSE). This will work. ________________________________ If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/Remove-serial-number-column-in-a-Dataframe -into-CSV-tp4642987p4642989.html To unsubscribe from Remove serial number column in a Dataframe into CSV, click here <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscrib e_by_code&node=4642987&code=YW50b255LmFra2FyYUBnZS5jb218NDY0Mjk4N3wxNTUx OTQzMDI5> . NAML <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_view er&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.Bas icNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.tem plate.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml -instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemai l.naml> -- View this message in context: http://r.789695.n4.nabble.com/Remove-serial-number-column-in-a-Dataframe-into-CSV-tp4642987p4642994.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]