There was an error in amperometry2df(), whereby the timediff calculated
was way too low. Was possibly related to the It2charge() function
used to calculate those values. That function (in common.R) is no longer
used by amperometry2df().
Also updated amperometry2df() so it now includes the data attributes
in the return dataframe itself, as columns (compare cv2df()).
common.R: do not use the It2charge() function in the future.
Do such calculations inline instead.
Be advised: This change will break all old reports that used the cv2df() function.
Experimental information (potential limits, scanspeeds, etc.) are now added to the
return dataframe as columns instead of attributes.
With this information built-in to the dataframe, analysis is simplified using melt
and cast and other grouping functions.
Using a combination of format() and gsub().
The purpose is to simplify looping through many datafiles
in a single report using for-loops.
A way was needed to "convert" the for-loop's counting variable
into a string of set length padded with zeroes.
This function fills that need.
Note: There should be a possibility to supply (as an argument to
Raman2df()) a custom sampleid which should then override the regexp-
based algorithm (only if that argument was supplied).
Function takes a potential and its reference electrode, and converts to a specified reference electrode scale, either another or the same.
I made it to simplify converting between different reference electrode scales in running text.
Celsius2Kelvin()
Kelvin2Celsius()
Including very crude error checks (checks that supplied temperature
is not below absolute zero, if so, sets it to absolute zero).
Idea: would be nice if function returned same number of significant
digits as it received.