readMassFile: Edit the raw mass data files into useful objects.

View source: R/massFunctions.R

readMassFileR Documentation

Edit the raw mass data files into useful objects.

Description

This function reads the raw mass data files created during weighing and edits them into a useful dataframe, with the option of saving them as a csv. The function creates a list of three dataframes, which is returned invisibly. One gives the cleaned-up, edited mass data (good). The other two give bad or strange data that may be useful for investigating mass files. You have the option of saving good records as a csv with the argument writeCsv. The writeCsv argument defaults to not writing csv file.

Usage

readMassFile(file, writeCsv = FALSE)

Arguments

file

character filename or filename with path of raw mass data file

writeCsv

logical indicating whether to print output to csv file (saves automatically to working directory)

Value

list of bad lines, strange lines and good masses, returned invisibly. A csv file is returned if writeCsv is TRUE.

See Also

combineMassFiles and listBadFiles and investigateMassFiles which are other useful functions that deal with mass files

Examples


## Not run: 
setwd("I:\\Departments\\Research\\EchinaceaVolunteers\\Balance\\sampleForEchLab\\CG2009_rawFiles")
yy <- readMassFile("sm 21 oct 1899 batch 9.txt", writeCsv = FALSE)
yy$bad
yy$strange
str(yy$good)
dim(yy$bad)

## End(Not run)


stuartWagenius/echinaceaLab documentation built on April 13, 2025, 5:22 a.m.