2
$\begingroup$

Recently I've started using RMarkdown in RStudio, and I don't know how to adapt the output for a useful presentation. The variables in the data set being: Cia, Riesgo, Tipo.Refa, Estado.Poliza, Tipo.Endoso, Asegurado, Moneda, Suma.Asegurada, Prima.Pesos, Premio.Pesos, Puntos, and Pesos. The only thing I want is find a way to present the data in a more understandable format, unlike the images I attached. (dimensions of the R object are 9 rows, 12 variables)

A bit of help would be much appreciated.

```{r setup, echo = FALSE}
knitr::opts_knit$set(root.dir = '/Users/Igna43/Dropbox/Nacho/Nacho 2016/Análisis R')
```


```{r echo = FALSE}
data1<-read.csv(file = "ListadoEnero2016.csv", header = TRUE, sep = ",")
opneg1<-subset(data1, data1$Pesos. < 0, )
opneg1
```

enter image description hereenter image description here

$\endgroup$
1
$\begingroup$

You can use kable() (see manual to create tables that are directly in markdown format.

Your code would become:

```{r,results='asis'}
 knitr::kable(opneg1)
```

See also this great manual on rmarkdown.

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.