
Parallel Workers Running MS Windows via Wine
Henrik Bengtsson
Source:vignettes/parallelly-22-wine-workers.md
parallelly-22-wine-workers.RmdIntroduction
This vignette shows how to set up parallel workers running R for MS Windows via Wine (https://www.winehq.org/) on Linux and macOS. This can be useful when we need to run R code or call R packages that work only on MS Windows.
The below instructions assume that you already have Wine installed.
Install R for MS Windows 11
To install R for MS Windows in Wine, first configure Wine to use Windows 11;
Then, install R for Windows in Wine, by:
Finally, verify that R is available in Wine;
Examples
Example: Parallel workers running MS Windows via Wine
This example shows how to launch one worker running in Wine for Linux on the local machine.
cl <- makeClusterPSOCK(
1L,
rscript = c(
## Silence Wine warnings
"WINEDEBUG=fixme-all",
"LC_ALL=en_US.UTF-8",
## Don't pass LC_* and R_LIBS* environments from host to Wine
sprintf("%s=", grep("^(LC_|R_LIBS)", names(Sys.getenv()), value = TRUE)),
"wine",
"C:/Program Files/R/R-4.5.2/bin/x64/Rscript.exe"
)
)
print(cl)
#> Socket cluster with 1 node on host 'localhost'
#> (R version 4.5.2 (2025-10-31 ucrt), platform x86_64-w64-mingw32)Appendix
Wine and R warnings
It might be that Wine produces warnings like:
0128:fixme:font:find_matching_face Untranslated charset 255
and R for Windows produces a warning on:
During startup - Warning message:
Using locale code page other than 65001 ("UTF-8") may cause problems.
These are typically harmless. Environment variable setting
WINEDEBUG=fixme-all should take care of the first one, and
LC_ALL=en_US.UTF-8 the second one.
Windows-only CRAN packages
A small number of the CRAN packages install only on MS Windows. Here is how to see which are:
db <- read.dcf(url("https://cran.r-project.org/src/contrib/PACKAGES"))
db <- as.data.frame(db)
win_only <- subset(db, OS_type == "windows")
print(win_only$Package)As of 2026-01-21, this outputs: