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
Taha Ahmed 7 years ago
parent a11f59eb22
commit 678a6ce4b7

@ -1,7 +1,7 @@
Package: common Package: common
Type: Package Type: Package
Title: chepec common Title: chepec common
Version: 0.0.0.9005 Version: 0.0.0.9006
Description: Commonly used functions and scripts. Description: Commonly used functions and scripts.
Authors@R: person("Taha", "Ahmed", email = "taha@chepec.se", role = c("aut", "cre")) Authors@R: person("Taha", "Ahmed", email = "taha@chepec.se", role = c("aut", "cre"))
License: GPL-3 License: GPL-3
@ -9,5 +9,4 @@ LazyData: TRUE
RoxygenNote: 6.0.1 RoxygenNote: 6.0.1
Imports: Imports:
xtable, xtable,
utils, utils
photoec

@ -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…
Cancel
Save