Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

treat objects of type data.table and cast_df as data in the workspace view #24

Merged
merged 1 commit into from

2 participants

@krlmlr

This has come up quite a few times:

http://support.rstudio.org/help/discussions/suggestions/2077-1-for-datatable-support
http://support.rstudio.org/help/discussions/suggestions/1619-datatable-as-data-in-workspace-browser
http://support.rstudio.org/help/discussions/suggestions/2373-datatable-in-data-section-of-workspace-window
http://support.rstudio.org/help/discussions/suggestions/3201-default-workspace-datatables-to-view-instead-of-fix
http://support.rstudio.org/help/discussions/suggestions/600-could-you-treat-datatable-like-dataframe-in-the-workspace-browser
http://support.rstudio.org/help/discussions/suggestions/1825-treat-a-data-table-object-the-same-as-a-data-frame-in-the-browser

The hack presented here just cures the symptoms instead of solving the problem. However, please consider merging it, as implementing a real solution might take some time indeed.

I understand that properly deciding if an object is a data frame requires checking all class members, not only the first (cf. getSingleClass()). This in turn would either require passing all inherited classes to the WorkspaceObjectInfo or passing the information "the object inherits from data.frame". This is beyond my understanding of the RStudio infrastructure.

@jjallaire
Owner

Hi there,

This pull request looks fine. As you said it solves the symptom but doesn't quite fully get to the heart of the problem. We plan on doing a brand new implementation of Workspace soon so we'll fix it properly then.

Realize it's a hassle, but in order to take this request we'd need you send us a contributor agreement. This can be individual or corporate depending on what's appropriate:

http://www.rstudio.com/ide/docs/RStudioIndividualContributorAgreement.pdf
http://www.rstudio.com/ide/docs/RStudioCorporateContributorAgreement.pdf

Once we get your agreement I'll merge the pull request.

J.J.

@krlmlr
@jjallaire jjallaire merged commit c06cba1 into from
@krlmlr

Has this been included in the current 0.97 release? I just installed it, but a data.table is still shown as a value.

@jjallaire
Owner

Hi there,

We just put out 0.97.449 yesterday and that should have the change. Have you tried with the very latest version?

J.J.

@krlmlr

Hi J.J.,

I have. Now, when looking at the relevant file, line 366, in the v0.97 branch, I cannot find my change. It is in master, though. When is v0.98 due? Any chance this change is included in v0.97?

Cheers

Kirill

@jjallaire
Owner

Apologies, I thought I had merged that onto v0.97 but hadn't yet. I just added it so it will be included in our next patch release (not currently scheduled but likely within the next 30 days or). In the meantime you can also run the daily build of v0.98:

http://www.rstudio.org/download/daily

@krlmlr

@jjallaire: In the release notes, it reads "Treat objects of type data.frame and cast_df as data" -- data.frame -> data.table

@jjallaire
Owner

Good catch -- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  src/gwt/src/org/rstudio/studio/client/workbench/views/workspace/table/WorkspaceObjectTable.java
@@ -363,7 +363,7 @@ public void setObserver(Observer observer)
private boolean isData(String type)
{
- return "data.frame".equals(type) || "matrix".equals(type);
+ return "data.frame".equals(type) || "matrix".equals(type) || "data.table".equals(type) || "cast_df".equals(type);
}
private RowManager rowManager_ ;
Something went wrong with that request. Please try again.