3

This is the first time I try to create something on a Kaggle Kernel. I know Rmd files are special as they have regular text and code on them. I read that I can't use the usual blue arrow to run the code on the Kernel because it will also try to run the regular text, on my case, generating this error:

    Error in parse(text = x, srcfile = src): attempt to use zero-length variable name

How am I supposed to run Rmd files within Kaggle to view the report it generates?

I tried to reload the kernel and search for a special button to run the entire Rmd file but no luck whatsoever.

---
title: "Credit Card Fraud Detection"
author: "Fernando José Velasco Borea"
date: "May 12th 2019"
output: 
  pdf_document:
      toc: true
      number_sections: true
---
x <- 1
print(x)

I'm expecting a behavior like the one I get on RStudio, like being able to run the code chunks and if I want, run everything to generate the report.

1 Answers1

2

You can write a markdown (.md) natively with Kaggle kernels. Check out this example. However I don't think Kaggle kernel will render the same performance as RStudio.

der_radler
  • 549
  • 1
  • 6
  • 17
  • Thanks! I can render the file only when I commit, but if I want to just run the file to see it on the console or without commit it just keep generating the error on the console. Check this link to see a screenshot https://www.kaggle.com/questions-and-answers/100659 – Fernando Velasco Borea Jul 20 '19 at 00:04
  • Unfortunately there's not currently a way to render rmd in the kernel editor. – Rachael Tatman Jul 22 '19 at 19:41