R markdown error-Please help

I'm trying to create this short document in R markdown and getting errors. Following are the code chunks and the error I'm getting. Any help will be appreciated.

title: "Penguins"
author: "MM"
date: '2022-06-29'
pdf_document: default
html_document: default

Setting up my environment

Notes: Setting up my R environment by loading 'ggplot2' and 'palmerpenguin' packages


I'm getting the following error while trying to knit.
|.......... | 14%
ordinary text without R code

|.................... | 29%
label: loading packages

processing file: Penguins-analysis.Rmd

Quitting from lines 13-19 (Penguins-analysis.Rmd)
Error in .External2(C_dataviewer, x, title) : unable to start data viewer
Calls: ... withVisible -> eval_with_user_handlers -> eval -> eval -> View
Execution halted

The View() command opens your data frame on the data viewer panel, this obviously won't work on a knitted document because there is no view panel on a pdf or html document that is why the process fails. Simply remove the view command from your Rmd file.


This topic was automatically closed 7 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.