Getting data in and out
Opening a file, saving one, and finding your way around the folders.
What we have
- Opens a data file that is already on your computer and puts it in memory.
- Writes the dataset in memory out to a file.
- Opens one of the four example datasets that come with Virata.
- Reads a spreadsheet or a text file into memory.
- Writes the dataset in memory out as a spreadsheet or a text file.
- Throws away the dataset in memory.
- Opens the data in a spreadsheet-like window so you can scroll through it.
- Opens the data viewer, the same window
browseopens. - Moves you to a different folder.
- Tells you which folder you are currently in.
- Lists the files in the current folder.
- Lists the files in the current folder — the same command as
dir.
Coming later
- SAS files
- Stata's own example datasets, such as
auto.dta .parquetis read only if you installpyarrowyourself — it is not bundled.parquetneedspyarrowinstalled yourselfcompress, choosing smaller storage typesmkdir,erase,copy,typeandshellputexcel, writing into a particular cellsaveold, and choosing which Stata file version to writewebuse- changing values in the window — the viewer is read-only
- changing values, which is what
editis for in Stata; usereplace - clearing the macros on their own —
macro drop _allis the one that does that - exporting a formatted table rather than the data itself
- fixed-format text (
infile,infix) - fixed-format text (
infile,infix) andwebuse - loading part of a file; the whole file comes into memory
- reading only some of the columns or rows
- sorting and filtering inside the viewer
- two repeated groups at once — say which with
expand()
useOpens a data file that is already on your computer and puts it in memory.
saveWrites the dataset in memory out to a file.
sysuseOpens one of the four example datasets that come with Virata.
importReads a spreadsheet or a text file into memory.
exportWrites the dataset in memory out as a spreadsheet or a text file.
clearThrows away the dataset in memory.
browseOpens the data in a spreadsheet-like window so you can scroll through it.
editOpens the data viewer, the same window browse opens.
cdMoves you to a different folder.
pwdTells you which folder you are currently in.
dirLists the files in the current folder.
lsLists the files in the current folder — the same command as dir.