Re: [R] numeric format

From: Erik Iverson <iverson_at_biostat.wisc.edu>
Date: Tue, 26 Feb 2008 15:49:51 -0600

Without knowing what your 'x' is, it's hard to see what is happening that you don't like.

Your data.frame function creates a data.frame containing columns scientific and digits, equal to FALSE and 4 for all rows, respectively.   Is that what you want?

cvandy wrote:
> Hi!
> I'm an R newbie and this should be a trivial problem, but I can't make it
> work and cannot find what I'm doing wrong in the literature.
> I entered the the command:
> table<-data.frame(x, scientific=F, digits=4)
> table
> This prints a column of x with 16 useless decimal places after the decimal
> point. Also, it prints an unwanted index number (1-20) in the left column.
> How do I get rid of the index column and how do I control the number of
> decimal places?
> Thanks in advance.
> CHV



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. Received on Tue 26 Feb 2008 - 21:52:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Feb 2008 - 00:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive