Last data update: 2014.03.03

R: 'trib.CoF' gets file name length and returns coeficient of...
trib.CoFR Documentation

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 values

Set 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
0,100 0 0,00000 0,18478 0,55435

You can check example datasets at package files exdata/tribometer

Examples

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

Results