Joe
Joe

Reputation: 31

Make and Visualise table in R

First I have an input and I want to get an output like this (I want to group the occurrences in the dataset between columns):

enter image description here

Second: Display this table in a good looking way (something that looks like Word or Excel) I can't use Word or Excel as I'm making some calculations in R with this dataset (it contains columns with numbers which aren't displayed here)

Upvotes: 0

Views: 1219

Answers (1)

Gregor de Cillia
Gregor de Cillia

Reputation: 7635

calculating the output table

I don't really see how the output table is calculated. Shouldn't it be output_table["A", "C"] = "e"?

Displaying your data

There are a lot of ways to do that. You might consider using RMarkdown to create a report-style output.

The DT library is also a very handy tool to display tables. It works well with RMarkdown and can be embedded in HTML documents. If you are using RStudio, you can use the following code to display your data

library(DT)
DT::datatable(iris)

Upvotes: 1

Related Questions