Error in windows() function
1
0
Entering edit mode
a • 0
@a-17942
Last seen 6.1 years ago

Hello, 

I just upgraded R 3.5.1 via CRAN and I am trying to use "windows()" function after loading "Biostrings" library like this:

> source("http://www.bioconductor.org/biocLite.R")
> biocLite("Biostrings")
> library(Biostrings)
> windows()

I get the following error messages:

Error in (function (classes, fdef, mtable)  : 
unable to find an inherited method for function ‘windows’ for signature ‘"missing"’

In R 3.4.4, that "windows()" function works well. Do you know how to fix it?

My environment is as follows:

Microsoft Windows [Version 10.0.17134.345]

> R.version
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          5.1                         
year           2018                        
month          07                          
day            02                          
svn rev        74947                       
language       R                           
version.string R version 3.5.1 (2018-07-02)
nickname       Feather Spray

Cheers,

Hiro

software error R windows • 4.2k views
ADD COMMENT
0
Entering edit mode

What exactly are you trying to do?  That error essentially says "this function does not work when you provide no arguments".  It would be more typical to provide a specific variable to the function.

ADD REPLY
0
Entering edit mode

Hi Mike,

Thanks for the prompt response. It seems the description is too short. I would like to display two screens side by side with windows() function.

That error occurs only after loading some specific libraries, "Biostrings" and "AnnotationDbi".

A following link is an example image to display:

https://www.dropbox.com/s/ta4v1tp847g2noo/Screenshot.png?dl=0

ADD REPLY
2
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 20 hours ago
EMBL Heidelberg

This issue is being caused by a property called masking.  There are two methods called windows(), one is available in base R (via a package called grDevices) and the other in Biostrings.  In a fresh new R session only the method that opens a graphical windows is available & so it works.  However, once you load Biostrings the method in that package (which does something completely different) take precedence.  

If you want to ensure you use the other version you can use the package name and :: nomenclature to call the windows function e.g.

grDevices::windows()
ADD COMMENT
0
Entering edit mode

Hi Mike,

Your explanation really helps. That makes total sense. Thank you, Mike!

ADD REPLY

Login before adding your answer.

Traffic: 428 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6