yihui / printr

Some (magical) printing methods for knitr
https://yihui.org/printr/
118 stars 24 forks source link

named index of data.frame #24

Closed sulaxd closed 7 years ago

sulaxd commented 8 years ago
---
title: "Untitled"
author: "Andrew Tang"
date: "2016/10/4"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(printr)
iris['Sepal.Length']


In the knit HTML result, Sepal.Length will be a title.
yihui commented 8 years ago

Although I admit this is a real issue, do you really need a one-column table?

sulaxd commented 8 years ago

Dear Yihui,

Only for tutorial, thanks for your reply.

Yihui Xie notifications@github.com 於 2016年10月4日 星期二寫道:

Although I admit this is a real issue, do you really need a one-column table?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yihui/printr/issues/24#issuecomment-251295261, or mute the thread https://github.com/notifications/unsubscribe-auth/AFgZ_rYc0CsakzciOrENodVkItavxtZAks5qwdsjgaJpZM4KNG9K .

Best regards Andrew T.

yihui commented 7 years ago

Actually you can set options(knitr.table.format = 'markdown') to produce the one-column table.

yihui commented 7 years ago

This has been fixed in knitr. You can install the development version via

devtools::install_github('yihui/knitr')