I'm new to R with a background using Stata.
I am wondering if there is a real-time browser to see how data changes after executing codes, much like the Data Browser in Stata.
I've consulted previous threads (e.g. https://stats.stackexchange.com/questions/11551/is-there-a-good-browser-viewer-to-see-an-r-dataset-rda-file) but have not found an answer to this.
Thanks.
RStudio
RStudio Desktop version 0.99.441 now has robust data viewing and filtering options on par with Stata. If you download that version, you will now have the capabilities to filter and sort variables in ascending or descending order (either click on the object in the Environment to open up the Viewer or use the View()
command on the console). From there, click on Filter to filter the variables, click on column names to sort, or click on the Pop-Out button immediately to the right of the Filter button to view the data in a separate windows, which can remain open while you manipulate the data in the console.
Base R
Unfortunately, R doesn't have the Stata equivalent to browse
, which, allows you to view your data in a separate window and updates in real time, as you note. You will have to use RStudio to do this. Your options in base R are to use the edit()
or fix()
commands (with the name of your data frame placed inside the parentheses), which will bring up a browser of your data (that you can edit, if you'd like, or just look at) similar to the edit
command in Stata, with the one caveat that you cannot input any commands in the R Console while the browser is open. If you'd like to have open a browser of your data while you simultaneously input commands in the console, you can use the View()
command, but it is static: it will not update in real-time along with inputted commands.