Comparison of function to display a data.frame
in markdown outputs.
Outputs covered:
## # A tibble: 20 x 15
## mfr model year trim bdy_style hp hp_rpm trq trq_rpm mpg_c mpg_h
## <chr> <chr> <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Ford GT 2017 Base… coupe 647 6250 550 5900 11 18
## 2 Ferr… 458 … 2015 Base… coupe 597 9000 398 6000 13 17
## 3 Ferr… 458 … 2015 Base converti… 562 9000 398 6000 13 17
## 4 Ferr… 458 … 2014 Base… coupe 562 9000 398 6000 13 17
## 5 Ferr… 488 … 2016 Base… coupe 661 8000 561 3000 15 22
## 6 Ferr… Cali… 2015 Base… converti… 553 7500 557 4750 16 23
## 7 Ferr… GTC4… 2017 Base… coupe 680 8250 514 5750 12 17
## 8 Ferr… FF 2015 Base… coupe 652 8000 504 6000 11 16
## 9 Ferr… F12B… 2015 Base… coupe 731 8250 509 6000 11 16
## 10 Ferr… LaFe… 2015 Base… coupe 949 9000 664 6750 12 16
## 11 Acura NSX 2017 Base… coupe 573 6500 476 2000 21 22
## 12 Niss… GT-R 2016 Prem… coupe 545 6400 436 3200 16 22
## 13 Lamb… Aven… 2015 LP 7… coupe 700 8250 507 5500 11 18
## 14 Lamb… Hura… 2015 LP 6… coupe 610 8250 413 6500 16 20
## 15 Lamb… Gall… 2014 LP 5… coupe 550 8000 398 6500 12 20
## 16 Bent… Cont… 2016 V8 C… coupe 500 6000 487 1700 15 25
## 17 Mase… Gran… 2016 Spor… coupe 454 7600 384 4750 13 21
## 18 Mase… Quat… 2016 S Se… sedan 404 5500 406 1500 16 23
## 19 Mase… Ghib… 2016 Base… sedan 345 5250 369 1750 17 24
## 20 BMW 6-Se… 2016 640 … coupe 315 5800 330 1400 20 30
## # … with 4 more variables: drivetrain <chr>, trsmn <chr>,
## # ctry_origin <chr>, msrp <dbl>
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ford | GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | United States | 447000 |
Ferrari | 458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 291744 |
Ferrari | 458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 263553 |
Ferrari | 458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 233509 |
Ferrari | 488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | Italy | 245400 |
Ferrari | California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | Italy | 198973 |
Ferrari | GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | Italy | 298000 |
Ferrari | FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | Italy | 295000 |
Ferrari | F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | Italy | 319995 |
Ferrari | LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | Italy | 1416362 |
Acura | NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | Japan | 156000 |
Nissan | GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | Japan | 101770 |
Lamborghini | Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | Italy | 397500 |
Lamborghini | Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | Italy | 237250 |
Lamborghini | Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | Italy | 191900 |
Bentley | Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | United Kingdom | 198500 |
Maserati | Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | Italy | 132825 |
Maserati | Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | Italy | 99900 |
Maserati | Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | Italy | 70600 |
BMW | 6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | Germany | 77300 |
library(kableExtra)
kableExtra::kable(gtcars) %>%
kable_styling(bootstrap_options = c("striped", "hover"))
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ford | GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | United States | 447000 |
Ferrari | 458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 291744 |
Ferrari | 458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 263553 |
Ferrari | 458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 233509 |
Ferrari | 488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | Italy | 245400 |
Ferrari | California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | Italy | 198973 |
Ferrari | GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | Italy | 298000 |
Ferrari | FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | Italy | 295000 |
Ferrari | F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | Italy | 319995 |
Ferrari | LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | Italy | 1416362 |
Acura | NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | Japan | 156000 |
Nissan | GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | Japan | 101770 |
Lamborghini | Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | Italy | 397500 |
Lamborghini | Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | Italy | 237250 |
Lamborghini | Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | Italy | 191900 |
Bentley | Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | United Kingdom | 198500 |
Maserati | Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | Italy | 132825 |
Maserati | Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | Italy | 99900 |
Maserati | Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | Italy | 70600 |
BMW | 6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | Germany | 77300 |
https://davidgohel.github.io/flextable/articles/overview.html
Allow to export as html, pdf or office.
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
flextable
generates a flextable object.
Select only some columns with col_keys
bdy_style | hp | hp_rpm |
coupe | 647.000 | 6250.000 |
coupe | 597.000 | 9000.000 |
convertible | 562.000 | 9000.000 |
coupe | 562.000 | 9000.000 |
coupe | 661.000 | 8000.000 |
convertible | 553.000 | 7500.000 |
coupe | 680.000 | 8250.000 |
coupe | 652.000 | 8000.000 |
coupe | 731.000 | 8250.000 |
coupe | 949.000 | 9000.000 |
coupe | 573.000 | 6500.000 |
coupe | 545.000 | 6400.000 |
coupe | 700.000 | 8250.000 |
coupe | 610.000 | 8250.000 |
coupe | 550.000 | 8000.000 |
coupe | 500.000 | 6000.000 |
coupe | 454.000 | 7600.000 |
sedan | 404.000 | 5500.000 |
sedan | 345.000 | 5250.000 |
coupe | 315.000 | 5800.000 |
Some themes are already available.
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
Merge adjacent cells with equal values, either vertically (merge_v
) or horizontally (merge_h
)
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 | |
458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 | |
488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 | |
California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 | |
GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 | |
FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 | |
F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 | |
LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 | |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 | |
Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 | |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 | |
Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 | |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
Manually cells with merge_at
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | ||||||||||||||
GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 | |
Ferrari | ||||||||||||||
458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 | |
458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 | |
458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 | |
488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 | |
California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 | |
GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 | |
FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 | |
F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 | |
LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 | |
Acura | ||||||||||||||
NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 | |
Nissan | ||||||||||||||
GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 | |
Lamborghini | ||||||||||||||
Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 | |
Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 | |
Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 | |
Bentley | ||||||||||||||
Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 | |
Maserati | ||||||||||||||
Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 | |
Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 | |
Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 | |
BMW | ||||||||||||||
6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
https://davidgohel.github.io/flextable/articles/format.html
font, color
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
Conditional formatting
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 647.000 | 6250.000 | 550.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 |
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 597.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 |
Ferrari | 458 Spider | 2015.000 | Base | convertible | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 |
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 562.000 | 9000.000 | 398.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 |
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 661.000 | 8000.000 | 561.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 |
Ferrari | California | 2015.000 | Base Convertible | convertible | 553.000 | 7500.000 | 557.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 |
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 680.000 | 8250.000 | 514.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 |
Ferrari | FF | 2015.000 | Base Coupe | coupe | 652.000 | 8000.000 | 504.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 |
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 731.000 | 8250.000 | 509.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 |
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 949.000 | 9000.000 | 664.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 |
Acura | NSX | 2017.000 | Base Coupe | coupe | 573.000 | 6500.000 | 476.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 |
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 545.000 | 6400.000 | 436.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 |
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 700.000 | 8250.000 | 507.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 |
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 610.000 | 8250.000 | 413.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 |
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 550.000 | 8000.000 | 398.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 |
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 500.000 | 6000.000 | 487.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 |
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 454.000 | 7600.000 | 384.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 |
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 404.000 | 5500.000 | 406.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 |
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 345.000 | 5250.000 | 369.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 |
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 315.000 | 5800.000 | 330.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
Adds barplots or linerange
flex_gtcars %>%
compose(j = "hp",
value = as_paragraph(minibar(value = hp))) %>%
compose(j = "trq",
value = as_paragraph(linerange(value = trq)))
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
Ford | GT | 2017.000 | Base Coupe | coupe | 6250.000 | 5900.000 | 11.000 | 18.000 | rwd | 7a | United States | 447000.000 | ||
Ferrari | 458 Speciale | 2015.000 | Base Coupe | coupe | 9000.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 291744.000 | ||
Ferrari | 458 Spider | 2015.000 | Base | convertible | 9000.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 263553.000 | ||
Ferrari | 458 Italia | 2014.000 | Base Coupe | coupe | 9000.000 | 6000.000 | 13.000 | 17.000 | rwd | 7a | Italy | 233509.000 | ||
Ferrari | 488 GTB | 2016.000 | Base Coupe | coupe | 8000.000 | 3000.000 | 15.000 | 22.000 | rwd | 7a | Italy | 245400.000 | ||
Ferrari | California | 2015.000 | Base Convertible | convertible | 7500.000 | 4750.000 | 16.000 | 23.000 | rwd | 7a | Italy | 198973.000 | ||
Ferrari | GTC4Lusso | 2017.000 | Base Coupe | coupe | 8250.000 | 5750.000 | 12.000 | 17.000 | awd | 7a | Italy | 298000.000 | ||
Ferrari | FF | 2015.000 | Base Coupe | coupe | 8000.000 | 6000.000 | 11.000 | 16.000 | awd | 7a | Italy | 295000.000 | ||
Ferrari | F12Berlinetta | 2015.000 | Base Coupe | coupe | 8250.000 | 6000.000 | 11.000 | 16.000 | rwd | 7a | Italy | 319995.000 | ||
Ferrari | LaFerrari | 2015.000 | Base Coupe | coupe | 9000.000 | 6750.000 | 12.000 | 16.000 | rwd | 7a | Italy | 1416362.000 | ||
Acura | NSX | 2017.000 | Base Coupe | coupe | 6500.000 | 2000.000 | 21.000 | 22.000 | awd | 9a | Japan | 156000.000 | ||
Nissan | GT-R | 2016.000 | Premium Coupe | coupe | 6400.000 | 3200.000 | 16.000 | 22.000 | awd | 6a | Japan | 101770.000 | ||
Lamborghini | Aventador | 2015.000 | LP 700-4 Coupe | coupe | 8250.000 | 5500.000 | 11.000 | 18.000 | awd | 7a | Italy | 397500.000 | ||
Lamborghini | Huracan | 2015.000 | LP 610-4 Coupe | coupe | 8250.000 | 6500.000 | 16.000 | 20.000 | rwd | 7a | Italy | 237250.000 | ||
Lamborghini | Gallardo | 2014.000 | LP 550-2 Coupe | coupe | 8000.000 | 6500.000 | 12.000 | 20.000 | rwd | 6a | Italy | 191900.000 | ||
Bentley | Continental GT | 2016.000 | V8 Coupe | coupe | 6000.000 | 1700.000 | 15.000 | 25.000 | awd | 8am | United Kingdom | 198500.000 | ||
Maserati | Granturismo | 2016.000 | Sport Coupe | coupe | 7600.000 | 4750.000 | 13.000 | 21.000 | rwd | 6am | Italy | 132825.000 | ||
Maserati | Quattroporte | 2016.000 | S Sedan | sedan | 5500.000 | 1500.000 | 16.000 | 23.000 | rwd | 8am | Italy | 99900.000 | ||
Maserati | Ghibli | 2016.000 | Base Sedan | sedan | 5250.000 | 1750.000 | 17.000 | 24.000 | rwd | 8am | Italy | 70600.000 | ||
BMW | 6-Series | 2016.000 | 640 I Coupe | coupe | 5800.000 | 1400.000 | 20.000 | 30.000 | rwd | 8am | Germany | 77300.000 |
gt()
create a gt_tbl
object.
mfr | model | year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | ctry_origin | msrp |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ford | GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | United States | 447000 |
Ferrari | 458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 291744 |
Ferrari | 458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 263553 |
Ferrari | 458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | Italy | 233509 |
Ferrari | 488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | Italy | 245400 |
Ferrari | California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | Italy | 198973 |
Ferrari | GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | Italy | 298000 |
Ferrari | FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | Italy | 295000 |
Ferrari | F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | Italy | 319995 |
Ferrari | LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | Italy | 1416362 |
Acura | NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | Japan | 156000 |
Nissan | GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | Japan | 101770 |
Lamborghini | Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | Italy | 397500 |
Lamborghini | Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | Italy | 237250 |
Lamborghini | Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | Italy | 191900 |
Bentley | Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | United Kingdom | 198500 |
Maserati | Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | Italy | 132825 |
Maserati | Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | Italy | 99900 |
Maserati | Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | Italy | 70600 |
BMW | 6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | Germany | 77300 |
Group rows according to groups in dataframe
tab <- gtcars %>%
group_by(ctry_origin) %>%
unite(col = car, mfr, model) %>%
gt(rowname_col = "car")
tab
year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | msrp | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
United States | ||||||||||||
Ford_GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | 447000 |
Italy | ||||||||||||
Ferrari_458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 291744 |
Ferrari_458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 263553 |
Ferrari_458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 233509 |
Ferrari_488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | 245400 |
Ferrari_California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | 198973 |
Ferrari_GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | 298000 |
Ferrari_FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | 295000 |
Ferrari_F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | 319995 |
Ferrari_LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | 1416362 |
Lamborghini_Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | 397500 |
Lamborghini_Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | 237250 |
Lamborghini_Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | 191900 |
Maserati_Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | 132825 |
Maserati_Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | 99900 |
Maserati_Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | 70600 |
Japan | ||||||||||||
Acura_NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | 156000 |
Nissan_GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | 101770 |
United Kingdom | ||||||||||||
Bentley_Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | 198500 |
Germany | ||||||||||||
BMW_6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | 77300 |
Group columns with tab_spanner
tab %>%
tab_spanner(label = "Performance",
columns = vars(mpg_c, mpg_h, hp, hp_rpm, trq, trq_rpm)
) %>%
tab_spanner(label = "Type",
columns = vars(trim, bdy_style))
year | Type | Performance | drivetrain | trsmn | msrp | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | |||||
United States | ||||||||||||
Ford_GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | 447000 |
Italy | ||||||||||||
Ferrari_458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 291744 |
Ferrari_458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 263553 |
Ferrari_458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 233509 |
Ferrari_488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | 245400 |
Ferrari_California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | 198973 |
Ferrari_GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | 298000 |
Ferrari_FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | 295000 |
Ferrari_F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | 319995 |
Ferrari_LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | 1416362 |
Lamborghini_Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | 397500 |
Lamborghini_Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | 237250 |
Lamborghini_Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | 191900 |
Maserati_Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | 132825 |
Maserati_Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | 99900 |
Maserati_Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | 70600 |
Japan | ||||||||||||
Acura_NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | 156000 |
Nissan_GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | 101770 |
United Kingdom | ||||||||||||
Bentley_Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | 198500 |
Germany | ||||||||||||
BMW_6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | 77300 |
fmt_
functions to change values formatting (such as scientific, currency, date…)
tab %>%
fmt_currency(columns = vars(msrp), currency = "EUR") %>%
fmt_scientific(columns = vars(hp_rpm))
year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | msrp | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
United States | ||||||||||||
Ford_GT | 2017 | Base Coupe | coupe | 647 | 6.25 × 103 | 550 | 5900 | 11 | 18 | rwd | 7a | €447,000.00 |
Italy | ||||||||||||
Ferrari_458 Speciale | 2015 | Base Coupe | coupe | 597 | 9.00 × 103 | 398 | 6000 | 13 | 17 | rwd | 7a | €291,744.00 |
Ferrari_458 Spider | 2015 | Base | convertible | 562 | 9.00 × 103 | 398 | 6000 | 13 | 17 | rwd | 7a | €263,553.00 |
Ferrari_458 Italia | 2014 | Base Coupe | coupe | 562 | 9.00 × 103 | 398 | 6000 | 13 | 17 | rwd | 7a | €233,509.00 |
Ferrari_488 GTB | 2016 | Base Coupe | coupe | 661 | 8.00 × 103 | 561 | 3000 | 15 | 22 | rwd | 7a | €245,400.00 |
Ferrari_California | 2015 | Base Convertible | convertible | 553 | 7.50 × 103 | 557 | 4750 | 16 | 23 | rwd | 7a | €198,973.00 |
Ferrari_GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8.25 × 103 | 514 | 5750 | 12 | 17 | awd | 7a | €298,000.00 |
Ferrari_FF | 2015 | Base Coupe | coupe | 652 | 8.00 × 103 | 504 | 6000 | 11 | 16 | awd | 7a | €295,000.00 |
Ferrari_F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8.25 × 103 | 509 | 6000 | 11 | 16 | rwd | 7a | €319,995.00 |
Ferrari_LaFerrari | 2015 | Base Coupe | coupe | 949 | 9.00 × 103 | 664 | 6750 | 12 | 16 | rwd | 7a | €1,416,362.00 |
Lamborghini_Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8.25 × 103 | 507 | 5500 | 11 | 18 | awd | 7a | €397,500.00 |
Lamborghini_Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8.25 × 103 | 413 | 6500 | 16 | 20 | rwd | 7a | €237,250.00 |
Lamborghini_Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8.00 × 103 | 398 | 6500 | 12 | 20 | rwd | 6a | €191,900.00 |
Maserati_Granturismo | 2016 | Sport Coupe | coupe | 454 | 7.60 × 103 | 384 | 4750 | 13 | 21 | rwd | 6am | €132,825.00 |
Maserati_Quattroporte | 2016 | S Sedan | sedan | 404 | 5.50 × 103 | 406 | 1500 | 16 | 23 | rwd | 8am | €99,900.00 |
Maserati_Ghibli | 2016 | Base Sedan | sedan | 345 | 5.25 × 103 | 369 | 1750 | 17 | 24 | rwd | 8am | €70,600.00 |
Japan | ||||||||||||
Acura_NSX | 2017 | Base Coupe | coupe | 573 | 6.50 × 103 | 476 | 2000 | 21 | 22 | awd | 9a | €156,000.00 |
Nissan_GT-R | 2016 | Premium Coupe | coupe | 545 | 6.40 × 103 | 436 | 3200 | 16 | 22 | awd | 6a | €101,770.00 |
United Kingdom | ||||||||||||
Bentley_Continental GT | 2016 | V8 Coupe | coupe | 500 | 6.00 × 103 | 487 | 1700 | 15 | 25 | awd | 8am | €198,500.00 |
Germany | ||||||||||||
BMW_6-Series | 2016 | 640 I Coupe | coupe | 315 | 5.80 × 103 | 330 | 1400 | 20 | 30 | rwd | 8am | €77,300.00 |
Change style for some cells/columns/rows.
tab %>%
cols_align(
align = "center",
columns = vars(mpg_c, hp, trq)
) %>%
tab_style(
style = cell_text(size = px(12), color = "red"),
locations = cells_data(
columns = vars(trim, trsmn, mpg_c, hp, trq))
)
year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | msrp | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
United States | ||||||||||||
Ford_GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | 447000 |
Italy | ||||||||||||
Ferrari_458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 291744 |
Ferrari_458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 263553 |
Ferrari_458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 233509 |
Ferrari_488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | 245400 |
Ferrari_California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | 198973 |
Ferrari_GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | 298000 |
Ferrari_FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | 295000 |
Ferrari_F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | 319995 |
Ferrari_LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | 1416362 |
Lamborghini_Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | 397500 |
Lamborghini_Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | 237250 |
Lamborghini_Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | 191900 |
Maserati_Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | 132825 |
Maserati_Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | 99900 |
Maserati_Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | 70600 |
Japan | ||||||||||||
Acura_NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | 156000 |
Nissan_GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | 101770 |
United Kingdom | ||||||||||||
Bentley_Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | 198500 |
Germany | ||||||||||||
BMW_6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | 77300 |
Adds summaries of rows
tab %>%
summary_rows(groups = TRUE,
columns = vars(hp, hp_rpm),
fns = list(
average = "mean",
total = "sum",
SD = "sd"))
year | trim | bdy_style | hp | hp_rpm | trq | trq_rpm | mpg_c | mpg_h | drivetrain | trsmn | msrp | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
United States | ||||||||||||
Ford_GT | 2017 | Base Coupe | coupe | 647 | 6250 | 550 | 5900 | 11 | 18 | rwd | 7a | 447000 |
average | — | — | — | 647.00 | 6,250.00 | — | — | — | — | — | — | — |
total | — | — | — | 647.00 | 6,250.00 | — | — | — | — | — | — | — |
SD | — | — | — | — | — | — | — | — | — | — | — | — |
Italy | ||||||||||||
Ferrari_458 Speciale | 2015 | Base Coupe | coupe | 597 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 291744 |
Ferrari_458 Spider | 2015 | Base | convertible | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 263553 |
Ferrari_458 Italia | 2014 | Base Coupe | coupe | 562 | 9000 | 398 | 6000 | 13 | 17 | rwd | 7a | 233509 |
Ferrari_488 GTB | 2016 | Base Coupe | coupe | 661 | 8000 | 561 | 3000 | 15 | 22 | rwd | 7a | 245400 |
Ferrari_California | 2015 | Base Convertible | convertible | 553 | 7500 | 557 | 4750 | 16 | 23 | rwd | 7a | 198973 |
Ferrari_GTC4Lusso | 2017 | Base Coupe | coupe | 680 | 8250 | 514 | 5750 | 12 | 17 | awd | 7a | 298000 |
Ferrari_FF | 2015 | Base Coupe | coupe | 652 | 8000 | 504 | 6000 | 11 | 16 | awd | 7a | 295000 |
Ferrari_F12Berlinetta | 2015 | Base Coupe | coupe | 731 | 8250 | 509 | 6000 | 11 | 16 | rwd | 7a | 319995 |
Ferrari_LaFerrari | 2015 | Base Coupe | coupe | 949 | 9000 | 664 | 6750 | 12 | 16 | rwd | 7a | 1416362 |
Lamborghini_Aventador | 2015 | LP 700-4 Coupe | coupe | 700 | 8250 | 507 | 5500 | 11 | 18 | awd | 7a | 397500 |
Lamborghini_Huracan | 2015 | LP 610-4 Coupe | coupe | 610 | 8250 | 413 | 6500 | 16 | 20 | rwd | 7a | 237250 |
Lamborghini_Gallardo | 2014 | LP 550-2 Coupe | coupe | 550 | 8000 | 398 | 6500 | 12 | 20 | rwd | 6a | 191900 |
Maserati_Granturismo | 2016 | Sport Coupe | coupe | 454 | 7600 | 384 | 4750 | 13 | 21 | rwd | 6am | 132825 |
Maserati_Quattroporte | 2016 | S Sedan | sedan | 404 | 5500 | 406 | 1500 | 16 | 23 | rwd | 8am | 99900 |
Maserati_Ghibli | 2016 | Base Sedan | sedan | 345 | 5250 | 369 | 1750 | 17 | 24 | rwd | 8am | 70600 |
average | — | — | — | 600.67 | 7,923.33 | — | — | — | — | — | — | — |
total | — | — | — | 9,010.00 | 118,850.00 | — | — | — | — | — | — | — |
SD | — | — | — | 144.97 | 1,145.93 | — | — | — | — | — | — | — |
Japan | ||||||||||||
Acura_NSX | 2017 | Base Coupe | coupe | 573 | 6500 | 476 | 2000 | 21 | 22 | awd | 9a | 156000 |
Nissan_GT-R | 2016 | Premium Coupe | coupe | 545 | 6400 | 436 | 3200 | 16 | 22 | awd | 6a | 101770 |
average | — | — | — | 559.00 | 6,450.00 | — | — | — | — | — | — | — |
total | — | — | — | 1,118.00 | 12,900.00 | — | — | — | — | — | — | — |
SD | — | — | — | 19.80 | 70.71 | — | — | — | — | — | — | — |
United Kingdom | ||||||||||||
Bentley_Continental GT | 2016 | V8 Coupe | coupe | 500 | 6000 | 487 | 1700 | 15 | 25 | awd | 8am | 198500 |
average | — | — | — | 500.00 | 6,000.00 | — | — | — | — | — | — | — |
total | — | — | — | 500.00 | 6,000.00 | — | — | — | — | — | — | — |
SD | — | — | — | — | — | — | — | — | — | — | — | — |
Germany | ||||||||||||
BMW_6-Series | 2016 | 640 I Coupe | coupe | 315 | 5800 | 330 | 1400 | 20 | 30 | rwd | 8am | 77300 |
average | — | — | — | 315.00 | 5,800.00 | — | — | — | — | — | — | — |
total | — | — | — | 315.00 | 5,800.00 | — | — | — | — | — | — | — |
SD | — | — | — | — | — | — | — | — | — | — | — | — |
flextable
allows export to office, gt
doesn’t.gt
is from rstudio, more support/dev? flextable
is french!