Conda R unescaped path problem for source installs

Viewed 11

I have some R source files in C:\Users\Ludvig\path\to\lib. Sure this is not the exact path, but you get the idea. Lets call my little package Lib. The source tree for the package looks as one expects it to, with a NAMESPACE, a DESCRIPTION, a R folder and a man folder. I want to install this as a package in my R environment.

I have R installed via Miniconda, in the base environment. After failing installation via install.packages(...) some times, I tried to get closer to the metal. Consider the following in powershell:

PS> cd C:\Users\Ludvig\path\to\lib
PS> R.exe CMD BUILD .
* checking for file './DESCRIPTION' ... OK
* preparing 'Lib':
* excluding invalid files
Subdirectory 'R' contains invalid file names:
 'Notes.txt'
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building 'Lib.1.0.tar.gz'
PS> R.exe CMD INSTALL Lib.1.0.tar.gz
* installing *source* package 'Lib' ...
** using staged installation
** R
Error : '\U' used without hex digits in character string starting ""C:\U"
ERROR: unable to collate and parse R files for package 'Lib'
* removing 'C:/Users/Ludvig/Miniconda3/Lib/R/library/Lib'

It seems the error stems from an unescaped path, and the fact that I install packages into the miniconda folder under C:\Users. I cannot, for the life of me, understand where this unescaped path comes from.

I have also tried, in the R terminal

> install.packages(
+     "C:/Users/Ludvig/path/to/lib"
+     ,repos = NULL
+     ,type = "source")
* installing *source* package 'Lib' ...
** using staged installation
** R
Error : '\U' used without hex digits in character string starting ""C:\U"
ERROR: unable to collate and parse R files for package 'Lib'
* removing 'C:/Users/Ludvig/Miniconda3/Lib/R/library/Lib'
Warning message:
In install.packages("C:/Users/Ludvig/path/to/lib",  :
  installation of package 'C:/Users/Ludvig/path/to/lib' had non-zero exit status

and this is about the same...

What file should I hunt down and fix the escapes in?

0 Answers
Related