Fixed circ dependency created in last commit
Goofed and declared dependency on photoec in previous commit. Fixed it by removing it and the non-exported function that used it. Note to self: this package should not import any of my other packages.master
parent
a11f59eb22
commit
678a6ce4b7
@ -1,29 +0,0 @@
|
||||
#' AddColumnEnergy
|
||||
#'
|
||||
#' A poorly documented function.
|
||||
#' To be honest I don't remember what it's for. Not exported.
|
||||
#'
|
||||
#' @param path.to.folder full path to folder containing data files
|
||||
#'
|
||||
#' @return Writes to file.
|
||||
AddColumnEnergy <- function(path.to.folder) {
|
||||
txt.files <-
|
||||
list.files(path = path.to.folder, pattern = "\\.txt$",
|
||||
full.names = TRUE)
|
||||
# message(txt.files)
|
||||
for (f in 1:length(txt.files)) {
|
||||
this.file <- txt.files[f]
|
||||
# read the file contents into df
|
||||
this.data <-
|
||||
utils::read.table(this.file, header = T,
|
||||
col.names = c("wavelength", "intensity"))
|
||||
# add energy (eV) as third column
|
||||
this.data$energy <- photoec::wavelength2energy(this.data$wavelength)
|
||||
# message(head(this.data))
|
||||
utils::write.table(this.data,
|
||||
file = this.file,
|
||||
sep = "\t",
|
||||
col.names = c("#Wave", "#Intensity", "#Energy"),
|
||||
row.names = FALSE)
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/AddColumn2Data-nm2eV.R
|
||||
\name{AddColumnEnergy}
|
||||
\alias{AddColumnEnergy}
|
||||
\title{AddColumnEnergy}
|
||||
\usage{
|
||||
AddColumnEnergy(path.to.folder)
|
||||
}
|
||||
\arguments{
|
||||
\item{path.to.folder}{full path to folder containing data files}
|
||||
}
|
||||
\value{
|
||||
Writes to file.
|
||||
}
|
||||
\description{
|
||||
A poorly documented function.
|
||||
To be honest I don't remember what it's for. Not exported.
|
||||
}
|
Loading…
Reference in New Issue