简体   繁体   中英

DataFrames not loading in RStudio Viewer

I realize that this isn't really a "coding" question per se, but I'm unsure where to direct this question otherwise. If it violates StackOverflow's rules, I'm happy to move it elsewhere.

Recently, when I View(df), the dataframe pops up as a separate window that looks like this:

弹出数据框

As opposed to displaying in the Viewer portal in the top panel of RStudio. Does anyone have any idea why this might be? I have a vague suspicion that it may be associated with the data.table package, though if so, I am unsure how to avoid this issue.

Thanks

I am not sure if you are aware, but there is a small button that can pop dataframes into and out of the normal panel. This button pops them out of the normal panel.

从图片中弹出 DataFrame

This button pops them back to the normal panel

将 DataFame 弹回正常面板

What may have happened is you popped the dataframe out of the normal panel, and you have the toolbar not visable. Check your View -> show/hide options to see if there is a toolbar hidden that contains this button.

First of all, thanks for the question @elduderino260. I had the same problem for weeks and it was driving me crazy.

I was able to fix this based on Frank's comment above. It appears I had imported the utils package into my namespace, and the View() function in that package overrode the RStudio View() function. The utils package apparently has it's own viewer, which is that red and white thing in your screen shot.

So to fix this I removed the reference to utils (which I didn't need anyway), regenerated the documentation (which cleared it from the namespace), and restarted the project. Then everything worked properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM