The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The macro package can be used interactively in RStudio®. First, it requires a basic package install.
You can install the macro package by executing the following command in the R console:
install.packages("macro")
Upon completion of the install, the macro package will be available for use in scripts and programs. To enhance the user experience, it is recommended that you set up the package for interactive use in your IDE. The subsequent instructions explain how.
Setting up keyboard shortcuts may be somewhat different depending what operating system you are using. The instructions and images below are for RStudio on Windows. Please adjust the instructions as appropriate for your operating system.
To connect keyboard shortcuts to the macro package Addin menu, take the following steps:
Go to the Tools -> Modify Keyboard Shortcuts menu.
Type the word “macro” on the search bar.
On the “Macro Source” row, put your cursor in the “Shortcut” column and press the “Ctrl” key and the “m” key. Then on the “Macro Source with Debug” row, put your cursor in the “Shortcut” column and press the “Ctrl” key and the “d” key.
Press the “Apply” button and close the shortcuts dialog.
The macro package shortcuts are now enabled in your IDE.
To test your shortcuts, open a new R script file, and type the following:
Then select the above code, and press Ctrl+m. You should see “Hello World!” appear in your console:
Next, select the above code again, and press Ctrl+d. The debug output should appear in the console:
As a final test, don’t select any code and press Ctrl+m again. The function should run the entire script, and produce the same results as above.
Now your environment is set up to use the macro package interactively. Enjoy!
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.