setting the home directory in windows R [duplicate] - windows

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Change path.expand location (Win 7)
I would like to change the directory that path.expand("~/") references on a windows system. Currently this goes to "C:/Users/home/Documents/" by default. How does one change this? Note that this is distinct from the working directory that is set with setwd()

You can change this by adding an R_USER variable to your Rprofile.site file.
Sys.setenv(R_USER="/my/desired/path/to/tilde")
This does not work on linux systems. See a related question: How to reset path.expand on tilde

Related

Why does my $PATH show anaconda and other weird things in it? [duplicate]

This question already has an answer here:
What is PATH on a Mac (UNIX) system?
(1 answer)
Closed 2 years ago.
When I go on my Mac's Terminal and type `echo $PATH I get:
/anaconda3/bin:/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
whereas most other people online have something like
usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
or something along those lines.
I did install the anaconda application, but I'm scared I screwed something up on my mac or my installations and that this will interfere with future projects.
Does anyone know why I get what I get, what it means, if I should be concerned, and how to fix it if it needs to be fixed?
First of all, I suggest that you read about what PATH means and how it is used by the shell. The short answer is no, you don't need to be worried. In fact, these are a convenience that allow you to easily use anaconda tools from the command line.

What version is Windows, really? [duplicate]

This question already has answers here:
How to detect true Windows version?
(9 answers)
Closed 7 years ago.
It appears that the version info functions in the Win32 API that I know and love have changed their behavior. GetVersionEx now return what the program's manifest is set for, not the actual version.
The new function IsWindows10OrGreater seems pointless since it is only available on windows 10 or greater, so if the program includes it and successfully links it will always return TRUE.
But, in an installer or similar program, how does it determine whether the current environment really is Windows 10 or greater? It needs this to know what to download or which options to set up for other programs.
Your premise is false. The IsWindows10OrGreater function is a macro, so provided you are using a suitably recent version of the SDK the compiled program will work on all currently supported versions of Windows. (As well as Windows XP and I think even Windows 2000.)
(Of course, this mistake is understandable, since the documentation is wrong.)
Note that the program's manifest must still indicate that it supports Windows 10 in order for the macro to work.

Setting global environment variables in windows programatically [duplicate]

This question already has answers here:
How to set a variable for the current OS session only
(3 answers)
Closed 7 years ago.
As i am frequently moving desktop, I use a lot of portable apps.
I would, however like to alter/add global environment variables programtaically
on startup so that it is available to all consoles and windows in general.
Preferably It should work by running a script.
As the computer may be used later by another person the settings and variables must disappear when rebooted or powerloss occours.
Examples:
I would like to add imagemagick to the PATH on startup
Add to global CLASSPATH on startup.
Any surgestions?
Just set the traditional way. Go to the System Applet, set your user variables.

How does a program know it's launched from xcode? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Detecting if iOS app is run in debugger
I want to add some special handling code when my program is launched from Xcode Debugger (vs. directly launched from simulator or from device). When Xcode launches a program to debug, will it set an enviroment variable?
Simplest approach is to edit your debug scheme to pass a command line type argument, and detect it in main().

How to read and write A FAT in WinXP [duplicate]

This question already has answers here:
int 13h in windows protected mode?
(4 answers)
Closed 8 years ago.
I am trying to read the FAT using Int 13H of but its Failing as I run the program. It flashes a message "Access Denied " though I am working in the Administration Domain Can any one answer me the reason and solution for it
Thanking You
Gaurav
Use the CreateFile API for Win32 as detailed in this article:
http://support.microsoft.com/kb/100027
Note in Windows Vista direct disk access is restricted further:
http://msdn.microsoft.com/en-us/library/aa363858%28VS.85%29.aspx

Resources