extracting data / creating dummy file
This commit is contained in:
		
							
								
								
									
										18
									
								
								OpusData.R
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								OpusData.R
									
									
									
									
									
								
							@@ -1,13 +1,19 @@
 | 
				
			|||||||
#!/usr/bin/env Rscript
 | 
					#!/usr/bin/env Rscript
 | 
				
			||||||
#if (!require("remotes")) install.packages("remotes")
 | 
					#if (!require("remotes")) install.packages("remotes")
 | 
				
			||||||
#remotes::install_github("philipp-baumann/simplerspec")
 | 
					#remotes::install_github("philipp-baumann/simplerspec")
 | 
				
			||||||
 | 
					source('D:/OpusData/OpusData.R')
 | 
				
			||||||
 | 
					file_path <- "D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\"
 | 
				
			||||||
 | 
					file_name <- "Rng02_Rng2630_01.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
file_path <- "D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\Rng02_Rng2630_01.0"
 | 
					data <- read_opus_univ(paste(file_path, file_name, sep = ""), extract = "spc",
 | 
				
			||||||
 | 
					 | 
				
			||||||
data <- read_opus_univ(file_path, extract = "AB",
 | 
					 | 
				
			||||||
                   atm_comp_minus4offset = FALSE)
 | 
					                   atm_comp_minus4offset = FALSE)
 | 
				
			||||||
 
 | 
					 | 
				
			||||||
print(data[1])
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
print(ls())
 | 
					data_x_values <- data$`D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\Rng02_Rng2630_01.0`$wavenumbers
 | 
				
			||||||
 | 
					data_y_values <- data$`D:\\OpusData\\Spektrometer Anbindung\\Test Daten\\OPUS\\Rng02_Rng2630_01.0`$spc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setwd(paste(file_path, "..\\DPT", sep = ""))
 | 
				
			||||||
 | 
					file.create(paste(substr(file_name, 0, nchar(file_name)-1), "DPT", sep = ""))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user