On 8/14/2016 12:57 PM, Itamar José G. Nunes wrote:
Greetings, CRAN supporter. I am Itamar José, a Brazilian programmer and
biotechnology student.
I'm using R from some time ago, most of the time working with it in Windows
7, but since I changed to Windows 10, I'm having some bugs when R platform
particularly in this new operational system. If there's not problem, I
would like some help from you for what I can do about this issue.
I have asked about this problem in StarkOverflow, but no resolution was
suggested until now. As I said there, I'm working with a software project
that requires the portable version of R platform and my intention is to use
R in any version of Windows and in any compatible computer. I'm copying
here my answer, as shown below:



*From
[http://stackoverflow.com/questions/37173431/r-platform-failed-to-start-in-windows-10-when-inside-directory-containing-white
<http://stackoverflow.com/questions/37173431/r-platform-failed-to-start-in-windows-10-when-inside-directory-containing-white>]Problem:*
In Windows 7, R works fine without any worries, even in portable version.
However, in Windows 10 (and probably also in Windows 8), R does not start
when put the entire folder inside a directory containing whitespaces (ex.:
"C:/Users/Main/Documents/My Folder/RVersion").

In Windows 10, with the absence of spaces, R runs fine. In the presence of
spaces, all executable (Rscript.exe, R.exe, etc) except Rgui.exe just open
a console and closes instantly. The problem is: I really need that R works
in any folder (this is a important part of the project).

*Additional information:*

   -

   I found that R does not work well in directories without the 8dot3
   format - and it think that Windows 10 lost this property, which was present
   in Windows 7. Also, the problem is clear when I run Rgui.exe in a
   whitespace-containing directory and try to run system("R.exe", intern=TRUE)
   function: It throws an error indicating that only the part before the first
   space in directory name was taken into account. Here is the message:

   > system("R.exe", intern=TRUE)

   [1] "'C:\\Users\\Main\\DOCUME~1\\My' nÆo ‚ reconhecido como um comando
   interno" [2] "ou externo, um programa oper vel ou um arquivo em lotes."
   attr(,"status") [1] 1 Warning message: running command 'R.exe' had status 1

*Translation of messages [1] and [2]: "'C:\...\My'" not recognized as a
internal or external command, nor a program operation or dataset*

   -

   The same occurs with non-portable version of R, as I already tested.
   -

   When I run with a .bat file with the corrected (quoted) directory as
   input, R.exe runs, but in a disfunctional form and looking like cmd.exe (no
   R command worked).
   -

   I have no ideia how to change variables such as R_HOME to a readable
   version before R prompt starts.

*System/Resources:*

   - Windows 10 Home 64-bit with the last update.
   - Dell Notebook with Intel i7-5500U 2.40 GHz (not so relevant, I think)
   - R and R portable 3.3 (last version until this post), downloaded here: [
   https://sourceforge.net/projects/rportable/]
   <https://sourceforge.net/projects/rportable/%5D>


I believe that, with the popularity of Windows 10, many other users could
face this problem (specially those who depend of R portability). Because no
answers were made, and since it remains as a little known issue, I think
the CRAN support is the only one that knows, most than everyone, how to
reach the resolution.

Thanks in advance!


For this problem, you need to give the EXACT commands you use to start R and run your scripts. In other words, give us a reproducible example, so that if we run your example we will see the same failure that you see.

Now in the absence of the reproducible exampole, I did notice one problem in the example you did give of a directory with spaces. It looks like you were using single quotes (') around the path/filename. Windows requires that there be double quotes (") around any path/filename that contains spaces.

If you provide a reproducible example, then you may get more detailed help.


Dan

--
Daniel Nordlund
Port Townsend, WA  USA

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to