SyntaxFix
Write A Post
Hire A Developer
Questions
In case you use UTF-8 encoding:
path <- rstudioapi::getActiveDocumentContext()$path Encoding(path) <- "UTF-8" setwd(dirname(path))
You need to install the package rstudioapi if you haven't done it yet.