0

consider the following list of numbers in R

list_num<-c(1,10, 100, NA, 0.1)

Can this be printed in this format enter image description here

The printing should be as if they are numbers so that we can sort the same. I request someone to help a bit. I am unable to find a solution

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Raghavan vmvs
  • 1,213
  • 1
  • 10
  • 29
  • note : between 10 raised to 2 and NA there is a comma. – Raghavan vmvs Apr 07 '21 at 15:00
  • Just to clarify: you want this to be displayed inside a “datatables” instance (via the R ‘DT’ package)? Or something else? – Konrad Rudolph Apr 07 '21 at 15:09
  • inside a datatable – Raghavan vmvs Apr 07 '21 at 15:09
  • That’s my point: what do you mean by “datatable”? The word isn’t a widely recognised term in the context of R (“datatables” (plural) is, and so is ‘data.table’ (a package). Please clarify how exactly you’re using this, it matters for the answer. – Konrad Rudolph Apr 07 '21 at 15:10
  • We have a renderdatatable option in R shiny. IT basically renders a dataframe as a datatable with filters. It should work interchangeably I belive as most functions work across both – Raghavan vmvs Apr 07 '21 at 15:11
  • 1
    OK, so what you’re talking about is datatable**s**. That’s the name of the JavaScript package. – Konrad Rudolph Apr 07 '21 at 15:22

0 Answers0