How do I set the output path from R markdown?

Hello everyone,
Priority, I am not accustomed to English.

---
title: 
author: "Name Surname"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteEngine{knitr::knitr}
  %\VignetteIndexEntry{Title of your vignette}
  %\usepackage[UTF-8]{inputenc}
---
 ```{r setup, include = FALSE}
 library(knitr)
 knitr::opts_chunk$set(
        collapse = TRUE,
        comment = "#>"
 )

 BiocStyle::markdown()
```

I created a markdown in R.
If you knit the created file, the output file should be created in the folder of the created file. However, my situation is created in a file that I do not specify now. What should I do?

I'm not familiar with BiocStyle::markdown() function, but for regular rmarkdown you can specify output_file as a parameter to the function. So, something like this:

rmarkdown::render(output_file = "your_file.html")

In your case you should see the help for the function with, for example, ?BiocStyle::markdown() in R console.

1 Like

thank you for reply!

but i can't solve this problem...ㅠㅠ

" Error in regexpr("\.([[:alnum:]]+)$", x) : argument "input" is missing, with no default Calls: ... -> %in% -> match -> tolower -> -> regexpr Execution halted"

input means, the .Rmd file just created?

Have a look at the documentation for rmarkdown::render (you can type ?rmarkdown::render into your console to open it up)

It says you need an input arguement, the "Input file (R script, Rmd, or plain markdown)."

https://www.rdocumentation.org/packages/rmarkdown/versions/1.8/topics/render

1 Like