0

I have a data frame function whose output is too lengthy which is being used as an output in a r shiny app. I want to spilt this by field fac. How could I do it. So I want tables which has fac= A and so on for the unique fields in fac. Thank you.

prod()
   x  y fac
1  1  1   C
2  1  2   B
3  1  3   B
4  1  4   B
5  1  5   A
6  1  6   B
7  1  7   B
8  1  8   C
9  1  9   C
10 1 10   C
SNT
  • 1,283
  • 3
  • 32
  • 78
  • have you considered using `DT::datatable` to show the full output with pagination? – giocomai Jun 04 '18 at 22:41
  • No I want to output this to a powerpoint where I wont get pagination or scroll. – SNT Jun 04 '18 at 22:42
  • I believe this question has been asked before, you would use the split function i.e. split(df, df$fac) which will give a list of separate data frames. Look at https://stackoverflow.com/questions/18913447/splitting-a-data-frame-by-a-variable – Amanda Jun 05 '18 at 01:09

0 Answers0