Search
Question: error in the plot window of rstudio
0
13 months ago by
kaviyajune19960 wrote:

It is showing :

"Error in plot.window(...) : need finite 'xlim' values

In sqrt(detA * pmax(0, yl2 - y^2)) : NaNs produced"

while running my code..what should I do...

modified 13 months ago by James W. MacDonald46k • written 13 months ago by kaviyajune19960
0
13 months ago by
United States
James W. MacDonald46k wrote:

These are just basic R errors, and probably don't have anything to do with Bioconductor, so next time try posting at R-help (r-help@r-project.org) instead.

The first error is saying that you are trying to tell R that you want your X-axis to extend to infinity (and beyond?):

> plot(1:10, xlim = c(0,Inf))
Error in plot.window(...) : need finite 'xlim' values

Needless to say, you cannot really have an infinite axis.

The warning is telling you that a function is generating values that are not numbers. There are any number of ways that can happen, and just saying 'hey this happened' isn't sufficient for anybody to help. A common thing that will generate an NaN is taking the square root of negative values:

> sqrt(-1)
[1] NaN
Warning message:
In sqrt(-1) : NaNs produced

If you are actually using Bioconductor tools and getting these results, you will need to give more information, like what are you doing, with what data, and ideally by providing a self-contained example that people can run. Plus the output of sessionInfo().