Skip to content

Commit

Permalink
Merge pull request PranaGeo#17 from yilmazbrs/dev
Browse files Browse the repository at this point in the history
Pulling Dev from Baris
  • Loading branch information
scizmeli authored Mar 16, 2017
2 parents 0e86b84 + f04bfa6 commit 9c8d612
Show file tree
Hide file tree
Showing 79 changed files with 137 additions and 74 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Collate:
SpcList-Class.R
SpcList-Methods.R
geoSpectral.R
RoxygenNote: 6.0.1
RoxygenNote: 5.0.1
Suggests:
testthat,
xlsx
16 changes: 5 additions & 11 deletions R/SpcList-Methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#'
#'
#' @usage
#' spc.plot.grid(x,FUN, nnrow, nncol, mar=c(4,4.5,1,0.5),oma = c(0,0,0,0), lab_cex, ...)
#' spc.plot.grid(x,FUN, nnrow, nncol, mar,oma, lab_cex, ...)
#' @param x a \code{SpcList} data
#' @param FUN a character string giving the name of the ploting function to be used.
#' Can be either of "spc.plot"
Expand All @@ -55,7 +55,7 @@
#' spc.plot.grid(BL,"spc.plot",3,2)
#'
setGeneric (name= "spc.plot.grid",
def=function(x,FUN, nnrow, nncol,...){standardGeneric("spc.plot.grid")})
def=function(x,FUN, nnrow, nncol,mar, oma, lab_cex,...){standardGeneric("spc.plot.grid")})
setMethod("spc.plot.grid", "SpcList", function (x,FUN, nnrow, nncol, mar=c(4,4.5,1,0.5),
oma = c(0,0,0,0), lab_cex, ...){
nb_spc = length(which(sapply(x, inherits, "Spectra")))
Expand Down Expand Up @@ -105,7 +105,7 @@ setMethod("spc.plot.grid", "SpcList", function (x,FUN, nnrow, nncol, mar=c(4,4.5
#' is plotted with spc.plot() while remaining elements are overlaid with spc.lines().
#'
#' @usage
#' spc.plot.overlay(x,lab_cex=1,leg_idx=T, type="l", lty=1,lwd=1, col, ...)
#' spc.plot.overlay(object,lab_cex,leg_idx, type, lty,lwd, col, ...)
#' @param x a \code{SpcList} data
#' @param lab_cex vector of character expansion sizes, used cyclically
#' @param type character string (length 1 vector) or vector of 1-character strings indicating the type of plot for each column of y,
Expand All @@ -124,7 +124,7 @@ setMethod("spc.plot.grid", "SpcList", function (x,FUN, nnrow, nncol, mar=c(4,4.5
#' spc.plot.overlay(BL, col=c("red","blue","green","yellow","cyan","black"))
#'
setGeneric (name= "spc.plot.overlay",
def=function(object, ...){standardGeneric("spc.plot.overlay")})
def=function(object,lab_cex, leg_idx, type, lty, lwd, col, ...){standardGeneric("spc.plot.overlay")})
setMethod("spc.plot.overlay", "SpcList", function (object, lab_cex=1,leg_idx=T, type="l", lty=1,lwd=1, col, ...){
if(missing(col))
col = 1:length(object)
Expand Down Expand Up @@ -207,7 +207,7 @@ setMethod("spc.plot.overlay", "SpcList", function (object, lab_cex=1,leg_idx=T,
#'
#'
setGeneric (name= "spc.plot.depth.overlay",
def=function(object,X,...){standardGeneric("spc.plot.depth.overlay")})
def=function(object,X,lab_cex,...){standardGeneric("spc.plot.depth.overlay")})
setMethod("spc.plot.depth.overlay", "SpcList", function (object, X, lab_cex, ...){
if(missing(lab_cex))
lab_cex = 1
Expand Down Expand Up @@ -244,8 +244,6 @@ setMethod("spc.plot.depth.overlay", "SpcList", function (object, X, lab_cex, ...
#' Subsetting can be achieved using the implementation of the R function subset() for \code{Spectra} and SpcList classes
#'It is possible to perform a row-wise selection
#'
#' @usage
#' subset(x,y,select,...)
#'
#'
#' @param drop passed on to [ indexing operator. Default is FALSE
Expand Down Expand Up @@ -507,8 +505,6 @@ setMethod("spc.getheader", signature = "list", def = function (object,name){
#' @description
#' Function sets or changes the value of a field in the header slot of \code{spclist} object
#'
#'@usage
#' spc.setheader(x,name,...)<-value
#'
#' @param value Object of class SpcList
#' @param x A \code{SpcList} object
Expand Down Expand Up @@ -544,8 +540,6 @@ setReplaceMethod(f="spc.setheader", signature="list",
#' @description
#' Updates or changes the value of a field in the header slot of \code{spclist} object
#'
#' @usage
#' spc.updateheader(object,name,...)<-value
#' @param ... arguments to be passed to or from other methods
#' @param object A \code{Spectra} objec
#' @param name of the header field to be updated
Expand Down
17 changes: 7 additions & 10 deletions R/Spectra-Methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ setReplaceMethod("spc.colnames", signature = "Spectra", def = function (x,value)
#' spc.plot(x)
#'
#'
setGeneric("spc.plot",function(x,Y,...){standardGeneric("spc.plot")})
setMethod("spc.plot", "Spectra", function (x, Y, maxSp, lab_cex,type="l",pch=19,lwd=2,cex=0.3,...){
setGeneric("spc.plot",function(x,Y,maxSp,lab_cex,xlab,ylab,type,pch,lwd,cex,...){standardGeneric("spc.plot")})
setMethod("spc.plot", "Spectra", function (x, Y, maxSp, lab_cex,xlab,ylab,type="l",pch=19,lwd=2,cex=0.3,...){
if (length(x@InvalidIdx)==0)
x@InvalidIdx = rep(FALSE,nrow(x@Spectra))

Expand Down Expand Up @@ -685,7 +685,7 @@ setMethod("spc.lines",signature = "Spectra",definition = function(x,...){
#'
#compressHeader=T Compress the header (make multiple all-equal header elements as ONE
setGeneric (name= "spc.rbind",def=function(...){standardGeneric("spc.rbind")})
setMethod("spc.rbind", signature = "Spectra", def = function (...,compressHeader=T){
setMethod("spc.rbind", signature = "Spectra", def = function (...,compressHeader=TRUE){
#Check that column names match
DFL=sapply(list(...),function(x) names(x@data),simplify=F)
if(!all(sapply(1:length(DFL),function(x) all(DFL[[x]]==DFL[[1]]))))
Expand Down Expand Up @@ -1234,7 +1234,6 @@ setMethod("spc.getheader", signature = "Spectra",
#'
#'@usage
#' spc.setheader(x,name,...)<-value
#'
#' @seealso \code{\link{spc.getheader}}
#' @param value Object of class SpcHeader
#' @param x A \code{Spectra} object
Expand All @@ -1251,7 +1250,7 @@ setGeneric (name="spc.setheader<-",
setReplaceMethod(f="spc.setheader", signature="Spectra",
definition=function(object,value){
stopifnot(class(value)=="SpcHeader")
object@header<-value
object@header<-value
validObject(object)
return(object)
})
Expand All @@ -1276,7 +1275,7 @@ setReplaceMethod(f="spc.setheader", signature="Spectra",
setGeneric (name="spc.updateheader<-",
def=function(object,Name,value,...){standardGeneric("spc.updateheader<-")})
setReplaceMethod(f="spc.updateheader", signature="Spectra",
definition=function(object,Name,value){
definition=function(object,Name,value,...){
hdr=spc.getheader(object)
hdr[[Name]]=value
spc.setheader(object)<-hdr
Expand Down Expand Up @@ -1462,8 +1461,6 @@ setMethod("spc.data2header", signature = "Spectra",
#' @description
#' Get the header for data of each element with a column
#'
#' @usage
#' spc.header2data(object,headerfield,dataname,...)
#'
#'
#' @param dataname list \code{Spectra} object
Expand All @@ -1488,7 +1485,7 @@ setMethod("spc.data2header", signature = "Spectra",
#its elements will be pasted using paste(...,collapse="|"). If it is another
#type, only the first element will be taken.
setGeneric(name= "spc.header2data",
def=function(object,headerfield,dataname,...){standardGeneric("spc.header2data")})
def=function(object,headerfield,dataname,compress,...){standardGeneric("spc.header2data")})
setMethod("spc.header2data", signature = "Spectra",
def=function(object,headerfield,dataname,compress=TRUE,...){
if(missing(dataname))
Expand Down Expand Up @@ -1716,7 +1713,7 @@ setMethod("rep", signature(x = "Spectra"),
#' spc.interp.spectral(sp[,lbd],c(430,450,500),show.plot=TRUE)
#'
setGeneric (name= "spc.interp.spectral",
def=function(source1,target_lbd,...){standardGeneric("spc.interp.spectral")})
def=function(source1,target_lbd,show.plot,...){standardGeneric("spc.interp.spectral")})
setMethod("spc.interp.spectral", signature = "Spectra",
def = function (source1,target_lbd,show.plot=FALSE){
if(missing(target_lbd))
Expand Down
3 changes: 1 addition & 2 deletions man/Arith.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/SpcHeader-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/SpcHeaderAdd.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/SpcHeaderList-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/SpcList.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions man/Spectra-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/Spectra-coerce.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/Spectra.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/cash-SpcList-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/cash-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/dim-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/geoSpectral.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/head-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/mat_identify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/names-SpcList-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/names-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/ncol-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/nrow-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/show-SpcHeader-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/show-SpcList-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/show-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/sort-SpcList-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/sort-Spectra-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.Read_NOMAD_v2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.STI.stdistance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.bbox2lines.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.cname.construct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.colMeans.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.colnames.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.data2header-list-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.data2header.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.example_spectra.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.export.text.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.export.xlsx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.getheader-list-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.getheader.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.getinvalid.idx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.getselected.idx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.getwavelengths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/spc.header.infos.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9c8d612

Please sign in to comment.