Re: [R] Preserving numeric columns

2019-10-20 Thread Jeff Newmiller
Well, the direct answer is "no", but then again I did not know the answer to the other question until I Googled it either. When I do the same for grid.draw, it appears to be a generic function for drawing graphical objects... data frames are not grobs, so you must be doing something to convert

Re: [R] Preserving numeric columns

2019-10-19 Thread Felipe Carrillo via R-help
Yes, options(knitr.kable.NA = '-')  is The answer for kable. Do you happen to know what are the arguments used for gridExtra grid.draw to acomplish the same thing? Sent from Yahoo Mail on Android On Sat, Oct 19, 2019 at 1:01 PM, Jeff Newmiller wrote: Then the polite next step is for you

Re: [R] Preserving numeric columns

2019-10-19 Thread Jeff Newmiller
Then the polite next step is for you to indicate what that solution was so people searching the archives can learn from your question. Was it to set the kable option? options(knitr.kable.NA = '-')  On October 19, 2019 12:50:20 PM PDT, Felipe Carrillo wrote: >You are correct. I didnt explain

Re: [R] Preserving numeric columns

2019-10-19 Thread Felipe Carrillo via R-help
You are correct. I didnt explain well and failed to mention that this is for knitr::kable. I already figured it out.  Sent from Yahoo Mail on Android On Sat, Oct 19, 2019 at 1:04 AM, Jeff Newmiller wrote: Data frames are NOT spreadsheets. Don't treat them like spreadsheets. All elements

Re: [R] Preserving numeric columns

2019-10-19 Thread Jeff Newmiller
Data frames are NOT spreadsheets. Don't treat them like spreadsheets. All elements in a column are parts of a vector which means they all have the same data type. On the other hand, if you want to generate formatted output in HTML, LaTeX, or Word, there are many tools for generating formatted

[R] Preserving numeric columns

2019-10-19 Thread Felipe Carrillo via R-help
Consider the following dataset:  I need to replace NAs with "-" but I lose my numeric formatting  fall.estimate <- structure(list(`Salmon` = c("salmon River", "Ant Creek", "big Creek", "oso River", "linda Creek"), `baseline` = c(80874.384012, 361.1997, 5012.8311, 638.6912, 402.1044),