Stata directory (18)
Hi folks,
I am having trouble establishing the correct directory for Stata 18.
when I run “cd” for Stata's current working directory
I get:
> /home/dnanexus
However I can't move paths including to my *actual* working directory with csv/dta files. I don't have any map of where my personal folder is in the system. Copying the path from one of my folders in the project doesn't work.
Has anyone gotten around this?
Thank you.
Comments
2 comments
Hello Donald,
Have you worked through the DNAnexus documentation on using STATA on the RAP, which provides examples of accessing data files within your project? (see subheading 'Working with Project Files'):
https://documentation.dnanexus.com/user/jupyter-notebooks/stata-in-dxjupyterlab
For example, if you want to load a .dta file into your Stata notebook use:
use /mnt/project/<path>/data_in.dta
replacing <path> with the path within your project if you use subfolders, and 'data_in' with the name of your .dta file
Or, if you're wanting to read in a .csv file:
import delimited /mnt/project/<path>/data_in.csv
I'm not sure if you can change the working directory when running STATA through JupyterLab, but specifying these pathways each time should work.
I hope that helps.
Hi Catherine,
Thank you for your help - that's great. The DNANexus documentation on Stata was great - apologies for missing that.
Best wishes,
Donald.
Please sign in to leave a comment.