Error in plot.window(...) : need finite 'xlim' values warning occurs when you create a plot in R. Read the article to find out how you can fix the issue.