Learn R Programming

EGRET (version 3.0.9)

removeDuplicates: Remove duplicates values from Sample data frame.

Description

Removes observations from the data frame Sample when the observation has the identical date and value as another observation

Usage

removeDuplicates(Sample)

Value

A data frame 'Sample' with the following columns:

NameTypeDescription
DateDateDate
ConcLownumericLower limit of concentration
ConcHighnumericUpper limit of concentration
UncenintegerUncensored data (1=TRUE, 0=FALSE)
ConcAvenumericAverage concentration
JulianintegerNumber of days since Jan. 1, 1850
MonthintegerMonth of the year [1-12]
DayintegerDay of the year [1-366]
DecYearnumericDecimal year
MonthSeqintegerNumber of months since January 1, 1850
SinDYnumericSine of the DecYear
CosDYnumericCosine of the DecYear

Arguments

Sample

dataframe with at least DecYear and ConcHigh, default name is Sample

Examples

Run this code
DecYear <- c('1985.01', '1985.01', '1985.02', '1985.02', '1985.03')
ConcHigh <- c(1,2,3,3,5)
dataInput <- data.frame(DecYear, ConcHigh, stringsAsFactors=FALSE)
Sample <- removeDuplicates(dataInput)

Run the code above in your browser using DataLab