[R] Dataframes - Integer and decimal in same column?

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sat Nov 7 00:45:49 CET 2015

It is a very fundamental fact about data frames that they are COLUMNS of like data. If you have specific row-oriented requirements then you will need to build a data frame or matrix of character strings of formatted data. 
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.

On November 6, 2015 1:26:21 PM PST, Deepthi Theresa <deepthitheresa at gmail.com> wrote:
>Hi all,
>My question is about R dataframes. I am making html reports using R
>datframe tables and RMarkdown.
>I have a dataframe with integer values on it and I had to rbind another
>dataframe with decimal values with the first dataframe.
>After the rbind function all values changed to decimal values.  Can we
>integer and decimal numbers in the same column?  Or at least round some
>the decimal rows to zero decimal point.  anything works.  I just want
>show the integer rows as integer values and decimal rows as decimal
>Deepthi Theresa Thomas Kannanayakal
>Email: deepthitheresa at gmail.com
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list