RStudio,Matplot Binning函数中的Prospect软件包错误

时间:2019-07-08 16:50:33

标签: r

我想从光谱信号数据中去除噪声。我在RStudio中使用了“ Prospect”软件包。

我是R语言的初学者。我不理解下一个错误(请参见第4点)

我的脚本是:

wav= read.table(file= "LS2017_ suel_SWIR-formJul.csv", header=T, sep=";", dec=",") 

wav <- as.matrix(wav[  , 2:ncol(wav)]) 
str(wav)

clrs <- sample (colors(), 1) 

clrs[c(1)] <- "black"


ejex <-1950 : 2400


matplot(ejex, type="l",xaxt= "n",xlim=c(1950 ,2400), ylim=c(0,1),xlab="longitud de onda (nm)",ylab="Reflectancia")
matlines(ejex,t(wav ), col= clrs,lty=1) 

axis(side= 1, at= seq(0, 2400,50), las= 2)
par(usr=c(0.0, 1.0, 0, 2400),xaxp=c(0,2400,50))


ejex <-1950 : 2400

X <- movav(wav, w = 11) 


clrs <- sample (colors(), 1) 

clrs[c(1)] <- "red2"

plot(as.numeric(colnames(wav)), wav[1 , ], type = "l", xlab = "Wavelength",
     ylab = "Reflectance")

lines(as.numeric(colnames(X)), X[ , ], col = clrs)


 plot(as.numeric(colnames(wav)), wav[1 , ], type = "l", xlab = "Wavelength",
      ylab = "Reflectance")
  

plot.window(...)中的错误:必须在valitos finitos de'xlim'   另外:警告消息:   1:在plot(as.numeric(colnames(wav)),wav [1,]中,类型=“ l”,xlab =“ Wavelength”,:     强制引入的NA   2:在min(x)中:没有min的必填参数;返回Inf   3:在max(x)中:没有max的必输参数;返回-Inf

     

lines(as.numeric(colnames(X)),X [,],col = clrs)   警告信息:   在行中(as.numeric(colnames(X)),X [,],col = clrs):     强制引入的NAs

0 个答案:

没有答案