Referencing A File In Stata Located On A Usb For Mac

  пятница 28 сентября
      53
Referencing A File In Stata Located On A Usb For Mac Rating: 6,3/10 4825 votes

Doesn't work. The file path in the terminal converts every 'space' into a ' ' which is not valid in Stata. Both windows and unix have very simple way to get the path. Why it has to be so difficulty in mac.

This is a pretty basic question, but I'm a teaching assistant for econometrics right now and a student asked me about it, reminding me that I had never figured it out myself. The students are given specific instructions to save their do-files with a line at the end of the do-file reading something like: save '$datadir saving do-files.do', replace However, on Macs (at least for several people, including me), once this saved do-file is re-opened, it is empty except for one line of gibberish: 117LSF That's an exact quote, and there's nothing else in it. This happens no matter whether I use the $datadir global macro or write in the whole pathway. I've been trying to find instructions or solutions and can't find anything. Any help would be greatly appreciated! Is it possible that this line just doesn't work in Macs? Is there another way to include a save command within the do-file? Skype for mac 10 7 5.

Thanks, Kristen. Code: save '$datadir saving do-files.do', replaceWhat that command line will do is save the current dta file to disk, but with extension.do (or maybe.do.dta -- I don't know, as not a Mac user). So, are you asking about how to get students to save their updated data files, or to save the do-file with which they've been working? It's the latter that's particularly important. It's good practice to ensure students learn to run data management and analysis using do-files -- as you are teaching them.

Remember also to ensure that they maintain a copy of the original data set. Otherwise, once modified and saved, there's no going back.

One way of working is to experiment using menu commands (not saving the data) while, at the same time, building up a do-file, that can then be run at the end and re-do the whole chain of (successful and desired) commands. [Stata's do-file editor is sufficient for most student purposes.] You might want to have a look some old materials of mine presented at a couple of internal presentations: ‘Workshops on ‘Audit trails, reproducibility and output processing’ and ‘Effective use of Stata graphics’’. The first file in the archive is particularly relevant in your case. Kristen, this has nothing to do with the platform. Whether on Mac, or on PC, or on any other platform, Stata's command saves data. One can start do editor programmatically with the command and even supply a filename to be opened for editing. There is no official command to save the do file currently in the doeditor.

This action is only available from the menu/toolbar. It is not automatable (not callable from the do-file itself).

Workaround for this would probably be more complicated than you want your students to get involved. Similarly like a, it can't save itself either. Best, Sergiy Radyakin.

Data Storage From Your Personal Computer Mapping to drives on your device is automatically done every time you open an application in Virtual Lab. If you, you will have access to all of your mapped drives. These drives are used like any other drive. You can read and write files from and to your local drive. If you’ve chosen the wrong security settings, ITS Labs recommends you save all data and information to your home drive, a USB flash drive, or a mapped network drive.

Any data in your virtual application, including files you save to the virtual application “Documents” folder, will be erased 15 minutes after your virtual application is closed. There is no way to retrieve these files after they have been erased. NOTE: When opening or saving a file within your virtual application, the Documents folder listed is NOT the Documents folder on your home drive, but the virtual application Documents folder. ITS Labs recommends not saving any work to this folder, as all files saved in this folder will be erased 15 minutes after the application is closed. To access your home drive Documents folder, see instructions below.

File Access Security Settings Upon opening an application from VL, you should see the following File Security message: Clicking on Permit all access allows read/write access to all files on your home drive, mapped network drives, and USB flash drives. (This option is recommended by ITS Labs.) Clicking on Allow reading only allows you to view but not make changes to the files on your home desktop, mapped network drives, and USB flash drives. If you make changes to a file and try to save it to your home file, a network drive, or a USB flash drive, you will receive a message similar to the following: If you hit Save As, the application will then suggest saving the file to the virtual application Documents folder. If saving to this location, the file will permanently be erased 15 minutes after the application has been closed. Clicking on Block access prevents all access to files on your home drive, mapped network drives, USB flash drives, AND the virtual application Documents folder. You will not be able to view or make changes to any files.