UPDATE ABOUT SOLUTION:
set argument gaps = F in your plot() command
library(spectacles)
spectra(your_data) <- sr_no ~ ... ~ 350:2500 # turn your data frame to Spectra* object with the spectrum range of your interest
plot(your_data, gaps = F) # return plot with no gaps or line discontinuously
I have to work with a Spectra* object and plot with the code as similar as this, just changing buil-in "australia" data frame by my data:
library(spectacles)
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500
s <- cut(australia, wl =c(-1*450:500, -1*1800:2050))
plot(s)
My plot in R returned discontinuously as the attached image below. Data frame's dimension is 150 rows, 3156 columns. The problem remains when I reduced df to 1800 columns.
Has anyone had the same problems? Could you suggest a solution? Thank you so much in advance!
Please bear with me as it is a lot easier to explain my question by visualization than to leave a comment. Do you want to remove this data or are you wanting to cut a portion of the data? See examples below.
Alternatively you could use the example for the help file in R.
Alternative you can take a portion of the analysis.