"No such file or directory" error message

Newbie here!
I keep getting an error message when attempting to render an R markdown notebook into an HTML document using the knit function.

A copy of the notebook is below. Here's the Error message in more detail (line 19 is bolded):

Line 19
Error in .External2(C_dataviewer, x, title) : unable to start data viewer
Calls: ...withCallingHandlers -> withVisible -> eval -> eval -> View
Execution halted


title: "Adding code chunks to R Markdown notebooks"
author: "Jenna"
date: '2023-01-06'
output: html_document

knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
library(palmerpenguins)
**data(penguins)**
View(penguins)

ggplot(data = penguins) +
  geom_point(mapping=aes(x = flipper_length_mm, y = body_mass_g))

Appreciate any thoughts/suggestions on how to fix this - thanks!
Jenna

This function opens the viewer panel on the RStudio IDE, but an html file doesn't have a viewer panel, that is why you get an error message. Remove that command from your Rmd file.

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.