[R] Package to manipulate timestamp data in format HH:MM:SS:sss

2013-09-12 Thread Alecia M Moser
Hello - I have imported timestamp data (collected in OpenSHAPA) into R as .csv file. Some columns in the data frame have timestamps in the format HH:MM:SS:sss. I have not found a package that will allow simple addition and subtraction of columns with this format, although 'strptime' in 'library(ti

[R] replace.df() function in R

2013-09-18 Thread Alecia M Moser
Hello - I have read about a function, replace.df(), that is available in base R. It seems ideal since it would allow me to replace specific columns in one data frame with columns in another data frame, while keeping all other columns intact. The problem is that replace.df() does not seem to exist

[R] Replacement function using grouping variable

2013-09-18 Thread Alecia M Moser
Hello - I am looking for a function that would allow me to replace specific columns in one data frame with columns in another data frame using a grouping variable. df <- read.csv("data.csv", header=T) df1 <- aggregate(df[, c(8,9,10,11,12,27,28)], by=list(df$ID), FUN=function(x) sub("(.*):", "\\1.