![]() For example, replace mpg = mpg * 2 would be unwise to set as a watch expression because that would change the column's data after every command. Note that since the watch expression is run after every command, it shouldn't be something that changes the state of the data. This is convenient for viewing regression output, graphs, or the data set after changing a parameter. These are expressions that are automatically re-run after every command sent to the kernel. Code that does not produce any output will show a check mark Output will display directly beside or beneath the block of code that was ![]() They are defined using %% inside comments. A cell is a block of lines to be executed at once. If code following the present line is more indented than the current line, Hydrogen will run the entire indented block. When Hydrogen: Run is called and no code is selected, Hydrogen runs the current line. Manually select/highlight the lines you want to send to Stata and then run Hydrogen: Run, which is usually bound to Ctrl- Enter. There are three main ways to run code using Hydrogen: This brings up a menu, called the Command Palette, where you can find any command that any package provides. The most important thing to know is that you can access every command available to you in Atom by using the keyboard shortcut Ctrl+ Shift+ P ( Cmd+ Shift+ P on macOS). Read here for some basics about how to use Atom. If you've never used Atom before, you're in luck, because it's quite simple and intuitive to use. Once those are installed, open a do-file and run Ctrl- Enter ( Cmd- Enter on macOS) to start the Stata kernel. Then click Install on the menu in the left, and type in Hydrogen, and language-stata, and click Install. ![]() You can get there by clicking Preferences > Settings in the menus or by using the keyboard shortcut Ctrl+, ( Cmd-, on macOS). To install these, go to the Atom Settings. language-stata: this provides syntax highlighting for Stata code and is necessary so that Hydrogen knows that a file with extension.You can use it with Python, R, and Julia, as well as Stata. Hydrogen: this connects to Jupyter kernels and allows you to view results in-line next to your code.Next you'll need to install a couple add-on packages: Go to atom.io, choose the installer for your operating system, then double click the downloaded file. The download and install is free and easy. Installation ¶Ītom and Hydrogen are both free and open source software, just like stata_kernel. For more information on how to use Hydrogen, see Hydrogen's documentation. I'll go over how to install Atom and Hydrogen, and then provide a quick overview of Hydrogen's capabilities. Hydrogen is a package for the Atom text editor that connects with Jupyter kernels, such as stata_kernel, to display results interactively inside the text editor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |