error when knitting to pdf in Rmarkdown

Hi there,

I created a file called "Study 1.rmd." When I try to knit my file to pdf I get this error.

"Error: The name of the input file cannot contain the special shell characters: [ <>()|:&;#?*'] (attempted to copy to a version without those characters 'Study-1.Rmd' however that file already exists)"

It seems it created a file "Study-1.Rmd when I tried to knit before. It didnt used to do this. When I go to delete that study-1.rmd file, it works and creates a pdf. Then when I run it again, sometimes it works but then other times it present the same error.

Hi, and welcome!

It's not really necessary for this question, but in general a reproducible example, called a reprex is very helpful in attracting answers.

The error message is a bit misleading. The problem is the blank in "Study 1.rmd." If you have a name conflict with Study-1.Rmd try Study_1.Rmd.

1 Like

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