Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RStudio errors: "In .HTMLsearch(query) : Unrecognized search field:"

Tags:

The following errors pop up whenever I use the search box in the Help tab - but notably only when the search does not match any functions in any loaded packages. Furthermore, the errors do not show until I enter something else in the R Console. So for example I type xxxxxx or cbinddd in the Help search box, and press Enter. The search might yield some approximate results or not. But no error. Then I enter anything into the Console, say, print("x") or whatever, and these show up, always all three:

Warning messages: 1: In .HTMLsearch(query) : Unrecognized search field: title 2: In .HTMLsearch(query) : Unrecognized search field: keyword 3: In .HTMLsearch(query) : Unrecognized search field: alias 

It started back when RStudio had a bug where help would open in browser by default (Q&A), but the next update fixed that. The 'Search Results' page would not show initially, but updating R itself fixed that too; but now I have these weird "delayed" errors. I tried reinstalling R and RStudio, changing the help options in .Rprofile.site, tried setting options("help_type" = "text") and to NULL, nothing seems to help. Note that entering ?xxxxx and ??xxxxx do not produce these errors.

Seems like an uncommon problem, since googling the error or parts of it yields no useful results. How do I fix it?

Update: I have R 3.2.2 and RStudio 0.99.486, running on 64bit Windows 8.1, if that helps.

Update 2: The .Rprofile file is not the culprit.

Updade 3: The error is due to a bug in RStudio, which will hopefully be fixed at some point (cf. comments for details). As such, this question does no longer need an answer. -> Answered it, since this page still gets hits.

like image 562
user3554004 Avatar asked Oct 21 '15 15:10

user3554004


2 Answers

Since this QA still comes up as the no. 1 match for the query "In .HTMLsearch(query) : Unrecognized search field:" in Google, I'm just going to leave this here: apparently (as of July 2016, v0.99.902 ), this behaviour, bug or not, still occurs, when you press enter in the Search field to string that does not immediately get an automatic match. Search works, but when you press Enter the next time in the Console, then those warnings appear. According to RStudio support they are working on it (or at least were). So the answer is, there's nothing you can do about it until they fix/change it (but it's really a minor inconvenience that does not affect your code, just the IDE usage).

like image 130
user3554004 Avatar answered Sep 27 '22 21:09

user3554004


This behaviour can be caused by a search you did previously (even in a previous session) that doesn't get a match. In my case, it occurred because I was looking (in RStudio Help) for a function in a library that was loaded in the previous session, but isn't loaded when I started this session. If it annoys you, just click the home button in the search window of RStudio.

like image 25
mclaeysb Avatar answered Sep 27 '22 21:09

mclaeysb