Learn R Programming

trib (version 1.2.0)

trib.profile: trib.profile gets file name length, filterValue and combined graph, single graphs, Wear Track Volume bar plot and full profile for data and generates WTArea global variable

Description

trib.profile gets file name length, filterValue and combined graph, single graphs, Wear Track Volume bar plot and full profile for data and generates WTArea global variable

Usage

trib.profile(x, filterValue, r, CombinedTrack = TRUE, SingleTrack = TRUE, FullProfile = FALSE, WTVBar = TRUE)

Arguments

x
Numeric value length of file name for truncation. Truncated file name is given at output for ease of use.
filterValue
Numeric value for setting for rolling average from package zoo
r
Numeric value for setting radius (in mm) of wear track that will be used for generating Wear Track Volume. This version doesn't support reciprocating tests so to generate Wear Track Volume please use WTArea vector instead and give 1 for r value
CombinedTrack
logical scalar checking whether to plot combined graph of all data or not
SingleTrack
logical scalar checking whether to plot single graphs of all data or not
FullProfile
logical scalar checking whether to plot full profiles of each data in a seperate file or not
WTVBar
logical scalar checking whether to plot bar graph of Wear Track Volume of all data

Value

Plots profile scatter plots with given filter value if CombinedTrack, SingleTrack, FullProfile or a bar plot if WTVBar options are set, else will return nothing. Generates Wear Track Area (WTArea) global variableSet work directory to file containing example data for profilometer directory should be

Warning

Before using this function please set your working directory to the directory that contains .csv files from profilometer File structure should be as follows: Seperation is , and text is ""
"Distance" ,
"Profile" "Distance"
You can check example datasets at package files exdata/profilometer This version doesn't support linear wear tracks. You can still use trib.profile but you have to set r to any numeric value and use WTArea vector to calculate Wear Track Volume

Examples

Run this code
setwd(paste(path.package("trib"),"/exdata/profile",sep=""))

trib.profile(2,100,3)

trib.profile(2, 100, 3, CombinedTrack=FALSE)

trib.profile(2, 100, 3, SingleTrack=FALSE)

trib.profile(2, 100, 3, FullProfile=TRUE )

trib.profile(2, 100, 3, WTVBar=FALSE)

Run the code above in your browser using DataLab