Learn R Programming

trib (version 1.2.0)

trib.CoF: trib.CoF gets file name length and returns coeficient of friction in bar plot generates global var CF

Description

trib.CoF gets file name length and returns coeficient of friction in bar plot generates global var CF

Usage

trib.CoF(x, DATAOUT = FALSE)

Arguments

x
Numeric value length of file name for truncation. Truncated file name is given at output for ease of use.
DATAOUT
logical scalar checking whether give data out or not

Value

Plots a bar plot of Coeficient of Friction generated from all files in working directory and generates a vector called CF that contains Average Coefficient of Friction valuesSet work directory to file containing example data for Tribometer directory should be

Warning

Before using this function please set your working directory to the directory that contains .csv files from tribometer. File structure should be as follows
Time Distance Laps mu
FrictionForce Time Distance Laps
You can check example datasets at package files exdata/tribometer

Examples

Run this code
setwd(paste(path.package("trib"),"/exdata/tribometer",sep=""))
trib.CoF(2)
tribDATA<-trib.CoF(2,DATAOUT = TRUE)

Run the code above in your browser using DataLab