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

DollarNames.R error (in the latest version of RStudio) #34

Closed
rguliev opened this issue Feb 10, 2017 · 5 comments
Closed

DollarNames.R error (in the latest version of RStudio) #34

rguliev opened this issue Feb 10, 2017 · 5 comments
Assignees
Labels
Type: bug 💣 something is not working as it should

Comments

@rguliev
Copy link
Collaborator

rguliev commented Feb 10, 2017

Hi,
Recently, I updated my R Studio to the latest version of R Stutio (1.0.136). And now the following error keeps popping up, when I try to use 'spc$' instead "spc@data$":
Error in grep(pattern, colnames(x@data), value = TRUE) : argument "pattern" is missing, with no default
The message pops up each time a character is typed. I.e. after typing flu$file console looks like this:

Error in grep(pattern, colnames(x@data), value = TRUE) : 
  argument "pattern" is missing, with no default
Error in grep(pattern, colnames(x@data), value = TRUE) : 
  argument "pattern" is missing, with no default
Error in grep(pattern, colnames(x@data), value = TRUE) : 
  argument "pattern" is missing, with no default
Error in grep(pattern, colnames(x@data), value = TRUE) : 
  argument "pattern" is missing, with no default
Error in grep(pattern, colnames(x@data), value = TRUE) : 
  argument "pattern" is missing, with no default
> flu$file

I've checked this on 3 different computers and this orrurs on all of them.

P.S. I also tried to fix it on my own. But the message doesn't occur (neither '$' works) when I load 'hyperSpec' from local ( devtools::load_all(".")). Perhaps, I still doing something wrong with package building..

@cbeleites cbeleites added the Type: bug 💣 something is not working as it should label Feb 10, 2017
@cbeleites cbeleites self-assigned this Feb 10, 2017
@cbeleites
Copy link
Owner

I confirm this in the newest RStudio version.
Console R works for me.

I think the problem is that hyperSpec's .DollarNames-method doesn't have the default pattern ""

@rguliev
Copy link
Collaborator Author

rguliev commented Feb 11, 2017

Yes, I think that too. And I found a way to check it:

f <- function (x, pattern) {grep (pattern, colnames (x@data), value = TRUE)}
> f(flu)
Error in grep(pattern, colnames(x@data), value = TRUE) : 
  argument "pattern" is missing, with no default
> f(flu,"")
[1] "file" "spc"  "c"

So, all we need is to change .DollarNames.hyperSpec <- function (x, pattern) to .DollarNames.hyperSpec <- function (x, pattern="")

P.S. I think it's not that big change for me making a pull request:) I hope you think so too.

@cbeleites
Copy link
Owner

:-) yes I think so, too.
In fact, I pushed the change in branch issue-DollarNames-34 yesterday evening ;-)
just didn't have the time to completely run the tests and then merge it into master.

@ximeg
Copy link
Collaborator

ximeg commented Feb 20, 2017

Hey, I just wanted to file a bug report on this issue here, and you already solved the problem! Great! 👍

@cbeleites
Copy link
Owner

fixed by 3fec03b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug 💣 something is not working as it should
Projects
None yet
Development

No branches or pull requests

3 participants