In the following data.frame there are 6 columns, but 7 are written to
the CSV file.
install.packages("pmlr")
library(pmlr)
data(enzymes)
write.table(enzymes, sep=",",
eol="\n",file="albert.csv")
Hi> In the following data.frame there are 6 columns, but 7 are written to > the CSV file. > > install.packages("pmlr") > library(pmlr) > data(enzymes) > write.table(enzymes, sep=",", eol="\n",file="albert.csv")see row.names option in ?write.table Regards Petr> > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Yup.
Read ?write.csv and note the row.names argument.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
Mike Hunter <tzygmund@gmail.com> wrote:
In the following data.frame there are 6 columns, but 7 are written to
the CSV file.
install.packages("pmlr")
library(pmlr)
data(enzymes)
write.table(enzymes, sep=",",
eol="\n",file="albert.csv")
_____________________________________________
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.
[[alternative HTML version deleted]]
Thanks! On Mon, Aug 15, 2011 at 12:55 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote:> Yup. > > Read ?write.csv and note the row.names argument. > --------------------------------------------------------------------------- > Jeff Newmiller The ..... ..... Go Live... > DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... > Live: OO#.. Dead: OO#.. Playing > Research Engineer (Solar/Batteries O.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --------------------------------------------------------------------------- > Sent from my phone. Please excuse my brevity. > > Mike Hunter <tzygmund at gmail.com> wrote: >> >> In the following data.frame there are 6 columns, but 7 are written to >> the CSV file. >> >> install.packages("pmlr") >> library(pmlr) >> data(enzymes) >> write.table(enzymes, sep=",", eol="\n",file="albert.csv") >> >> ________________________________ >> 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. >