Check Fails - Issue with Path?

I'm trying to do an assignment for a class I'm taking and it asks us to CHECK our package using devtools. When I do this, I get an error as below. I can't seem to work my way around it, it seems like it's related to a path in Windows but I don't know where it's getting the path name - I'm trying to force it to use a path name with no spaces or special characters like apostrophes but the thing keeps showing up and I can't figure out where the setting is coming from

I've tried adding --output=C:/path/path/ to the check options but that only makes it worse. Any assistance is appreciated.

==> devtools::check()

Updating secondproject documentation
Writing NAMESPACE
Loading secondproject
Warning: object 'graphics' is not exported by 'namespace:dplyr'
Warning: object 'maps' is not exported by 'namespace:dplyr'
Warning: object 'tidyr' is not exported by 'namespace:dplyr'
Warning: object 'dplyr' is not exported by 'namespace:readr'
Writing NAMESPACE
-- Building --------------------------------- secondproject --
Setting env vars:

  • CFLAGS : -Wall -pedantic -fdiagnostics-color=always
  • CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
  • CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always

v checking for file 'C:\R_Programming\secondproject/DESCRIPTION' ...

  • preparing 'secondproject':
    v checking DESCRIPTION meta-information ...
  • installing the package to build vignettes
    -----------------------------------
  • installing source package 'secondproject' ...
    ** using staged installation
    ** R
    ** byte-compile and prepare package for lazy loading
    Error: unexpected symbol in "setwd('C:/Users/George L'Heureux"
    Execution halted
    ERROR: lazy loading failed for package 'secondproject'
  • removing 'C:/Users/GEORGE~1/AppData/Local/Temp/Rtmp2fNPNX/Rinst26d033c3d0e/secondproject'
    -----------------------------------
    ERROR: package installation failed
    Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
    System command error
    Calls: ... with_envvar -> force -> do.call -> -> throw
    Execution halted

Exited with status 1.

Looks like the error occurs when the package is being installed. Does the setwd call occur somewhere in an R file in the package? perhaps outside of a function?

1 Like