Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for additional features #12

Open
mine-cetinkaya-rundel opened this issue Apr 20, 2019 · 7 comments
Open

Ideas for additional features #12

mine-cetinkaya-rundel opened this issue Apr 20, 2019 · 7 comments

Comments

@mine-cetinkaya-rundel
Copy link

Today I thought I had an original idea, to make a package with very similar functionality to this one, and was pleasantly surprised to find this package! I plan on recommending it in my teaching, it seems so useful!

I wanted to check to see if you would be interested in the following features. If so, I would be happy to work on PRs for them. And if some of it is already implemented and I missed that in the documentation, please let me know.

This is somewhat of a meta-issue. Depending on the conversation here I'm happy to open separate issues for each of the features.

  • Functionality for search in RStudio Community.
  • A TRUE/FALSE tidyverse argument that would append tidyverse to the end of search string for search results (likely) containing tidyverse approaches.
  • A global search option that opens a few search results in separate tables, by default. I'm thinking these tabs by default would be Google, Stack Overflow, and RStudio Community, but one could set options for different defaults.
  • Functionality for searching for the last warning message.
@coatless
Copy link
Collaborator

Hi @mine-cetinkaya-rundel.

Great to hear! The package's main goal was to provide structure so that undergrad students felt confident to search errors that came up in their code and save them from having to wait in queue for a CA.

Regarding the features, please see the comments below. I can also implement them if need be. Though, I might not have a lot of time until after May 2nd, which is when UIUC's semester ends. What kind of time table are you looking for?

Features

Functionality for search in RStudio Community.

Of course! I think RStudio Community was not included since it was just getting started when the searcher was created.

Any preference for the name? search_rstudio_community()/search_rstudio() or search_rco()?

Implementation notes:


A TRUE/FALSE tidyverse argument that would append tidyverse to the end of search string for search results (likely) containing tidyverse approaches.

I'm not sure this is needed for three reasons:

  1. Google trends tends to have tidyverse ranked significantly lower than the tidyverse-specific package.
  2. Errors on StackOverflow are usually tagged with r and the tidyverse-specific package
  3. tidyverse-specific errors have greatly improved and narrowed their focus from 1 year ago

Screen Shot 2019-04-19 at 10 49 32 PM

Google Trends query


A global search option that opens a few search results in separate tables, by default. I'm thinking these tabs by default would be Google, Stack Overflow, and RStudio Community, but one could set options for different defaults.

I can easily see this being very useful. How about something along the lines of:

search_sites(q, rlang = TRUE, sites = getOption('searcher.sites', c('Google', 'StackOverflow')))

Functionality for searching for the last warning message.

I completely agree. Though, I seem to remember this being tricker than I anticipated. As a result, I ended up implementing the feature in errorist, which automatically searches on error or warning, using call backs via addTaskCallback().

If I'm remembering correctly, there wasn't an easy way to retrieve the last warning message as the last.warning symbol isn't guaranteed to be present and sometimes omits the first run of the warning. c.f. https://stackoverflow.com/questions/48071718/warning-expression-prevents-last-warning-from-update

@mine-cetinkaya-rundel
Copy link
Author

My primary audience is also often undergrads. My original idea was to name the package officehour since I often find myself helping students google things in office hours 😄

Re: timeline -- I am not in a rush. I should be able to dedicate some time to it next week. I can try submitting PRs for the first two below. However, if this is stuff you'd rather implement yourself that's perfectly fine with me as well. I didn't want to submit a PR without checking your preferred development process first.

Re: features --

Functionality for search in RStudio Community.

How about search_rstudio_community with an alias search_rsc? I think search_rstudio might potentially be confusing for new learners who might be thinking about the IDE with a function named search_rstudio, and I'm suggesting the alias as search_rstudio_community is too long to type repeatedly.

Few searches at once in separate tabs.

Sounds good! The inspiration for this was how the available package opens a bunch of tabs when investigating a potential package name.

tidyverse = TRUE/FALSE option.

Agreed for error messages. However, for user-defined search queries (like the "ggplot2 fix axis labels" example in the README) this option would be useful. I teach using the tidyverse and initially try to not get into the specifics of the packages and instead recommend students add "tidyverse" to their search queries when they're searching for things like "relevel categorical variable". That being said, remembering to turn this option on might be the same as remembering to add the text string "tidyverse" to the search query.

Search for last warning.

Seems like a good stretch goal to keep in mind? I hadn't done much digging on this prior to suggesting, so I will read on it a bit more once I have a better idea on package internals.

@coatless
Copy link
Collaborator

RE: officehour

After a quick discussion with @daviddalpiaz in coatless-rpkg/errorist#2 and your comments here, I think it might make sense to spin up a third package called officehour that extends searcher/errorist idea by providing a custom html overlay with pre-sets for courses. The pre-sets could be deployed via the Workspace's base template on RStudio Cloud.

The downside to this is the searcher API would then need to be changed a bit more. On the upside, we'll have some dedicate development cycles since UIUC will be funding online course development this summer.

RE: Features

How about search_rstudio_community with an alias search_rsc?

Agreed. Though, does RStudio Community have an official acronym? I thought CRO was the short hand version.

However, for user-defined search queries (like the "ggplot2 fix axis labels" example in the README) this option would be useful

Good point. I'd like to potentially allow for overriding the language parameter in maybe the aforementioned officehour package? I'm not sure adding another parameter to the search functions would be ideal as it wouldn't be on by default.

@mine-cetinkaya-rundel
Copy link
Author

Re: officehour

I like the class specific search idea for officehour, and would be quite interested in collaborating. I'm not teaching a course in the summer, but would love to have it in place for fall.

Re: features

  • RStudio Community -> rscom is probably best. There isn't an official acronym (yet), but this was suggested. RSC is RStudio Connect's acronym so we probably want to avoid that. I like search_rscom.
  • Doing this in officehour sounds good to me!

@coatless
Copy link
Collaborator

RE: officehour

Agreed.

Earlier today, @daviddalpiaz and I chatted briefly about an idea to provide diagnostics messages for the R environment when an officehour package would be loaded. The idea here would be to recreate homebrew's brew doctor command, but for R. It would likely be named the doctor or rhealth package.

The diagnostics we're interested in are:

  • Latest Version of R
  • Latest Version of RStudio
  • Latest Version of Class Packages
  • Installed R Development Tools
  • ...

Some of these checks happen within package development process already; however, they are not available for everyday users. The closest to an out-of-date message is associated with a call to install.packages() mentioning the binary was built on a different version of R. (Many do not realize update.packages() exist.)

Would you have any interest in having the officehour package perform a health check on load? Or do you feel that the health check should be left as a function call?

@coatless
Copy link
Collaborator

@mine-cetinkaya-rundel we've moved a few packages into an r-assist org (better name TBA). The focus will be on providing automatic R help as much as possible within an academic setting. Would you like an invite to the org?

@coatless
Copy link
Collaborator

coatless commented Jul 6, 2019

@mine-cetinkaya-rundel RStudio Community is now available via #17.

Regarding tags, I've opted to avoid attaching any affix as the results are already R-focused.

I'll likely be tweaking more portions in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants