Zidane Ahmed
Zidane Ahmed

Reputation: 101

I can't find "Knit" button in RStudio

I installed RStudio Desktop windows version to study a course on coursera, and i have to knit a certain RMD file. I installed all the packages including "knitr" but i still can't find a knit button in my interface. Screenshot

Upvotes: 10

Views: 24218

Answers (7)

J K
J K

Reputation: 1

Ensure that your rmd file has the output mentioned as pdf. This part of the code needs to be included in the first chunk of your code, the part where you include title and details of the sort:

output: pdf_document editor_options: chunk_output_type: console

Upvotes: 0

jyr
jyr

Reputation: 692

You can always "knit" the file without using Rstudio interface just by

rmarkdown::render("file_name.rmd")

Upvotes: 0

khanhhtt
khanhhtt

Reputation: 11

I know it has been a while since the question has posted. But none of the solutions above work for me unfortunately.

I have found the way works for me and would like to share in case anyone needs it.

In the R viewer -> click button 'Show in new window'. It will show the output table in a html web browser. Then you can copy and paste the table in the browser to Word without losing any formatting.

Upvotes: 1

user2114068
user2114068

Reputation: 69

On the search field "Go to file/function" search for knit. after sometime knit option would be visible.

Upvotes: 1

Lauren Juskelis
Lauren Juskelis

Reputation: 41

I'm taking the same course, so I'll comment in case anyone else runs into the same problem.

On the course page, you right-click the file, then click Save Link As, enter the file name as HomeworkWeek1.RMD, and change Save As Type to All Files. This is very important; if you do not save the file as a .RMD file the knitting will not work. Then in your file explorer, find where you saved the file. Right-click the file and click Open With -> R Studio. Then go to R Studio, and click Knit in the upper left corner. Then another window will automatically pop up with a cleaned-up version of the homework assignment.

That's it!

Upvotes: 4

caromimo
caromimo

Reputation: 101

I also have this problem despite having the correct file extension (.rmd) and the correct type of file at the bottom right of the source code window (RMarkdown).

I gave up searching when I found the keyboard shortcut: Ctrl+Shift+K

Upvotes: 4

Ralf Stubner
Ralf Stubner

Reputation: 26833

You need to have an Rmd file open. Either change the extension of the file to Rmd an reopen it or create a new Rmd file from the “new” menu.

Upvotes: 10

Related Questions