|  |  |  | @ -36,12 +36,10 @@ Raman2df <- function(datafilename) { | 
		
	
		
			
				|  |  |  |  |    ff <- ff[order(ff$shift), ] | 
		
	
		
			
				|  |  |  |  |    # And fix the row.names | 
		
	
		
			
				|  |  |  |  |    row.names(ff) <- seq(1, dim(ff)[1]) | 
		
	
		
			
				|  |  |  |  |    # Re-calculate the spectrum with evenly spaced points | 
		
	
		
			
				|  |  |  |  |    # (so that the peak-finding algorithms of diffractometry package may be used) | 
		
	
		
			
				|  |  |  |  |    ff$cshift <- approx(x = ff$shift, y = ff$counts,  | 
		
	
		
			
				|  |  |  |  |       method = "linear", n = length(ff$shift))$x | 
		
	
		
			
				|  |  |  |  |    ff$ccounts <- approx(x = ff$shift, y = ff$counts,  | 
		
	
		
			
				|  |  |  |  |       method = "linear", n = length(ff$shift))$y  | 
		
	
		
			
				|  |  |  |  |    # Do not re-calculate the spectrum with evenly spaced points here! | 
		
	
		
			
				|  |  |  |  |    # You must first remove cosmic peaks, and as long as that is done | 
		
	
		
			
				|  |  |  |  |    # manually, re-calculation to evenly spaced shifts must also be | 
		
	
		
			
				|  |  |  |  |    # done manually. | 
		
	
		
			
				|  |  |  |  |    ## | 
		
	
		
			
				|  |  |  |  |    return(ff) | 
		
	
		
			
				|  |  |  |  | } | 
		
	
	
		
			
				
					|  |  |  | 
 |