Hi,
 
I have an original data frame with 8 columns of variables, which are stored in 'data1' frame.
 
data1 <- read.csv("E:\\PHD GLASGOW UNIVERSITY\\Data\\R\\Colin\\Cailness21.csv")
attach(data1)
names(data1)
 
[1] "Date"       "d"          "m"          "y"          "Time"      
[6] "Depth"      "Temp"       "Group_Time"
 
 
Recently, i try two add a column into this data frame, but when i try to use the 'groupedData' function with this new data frame via command below, it reported the problem stated after the command below.
 
library(nlme)
tmp <- groupedData(Temp ~ d | Depth, data2, order.groups = TRUE, labels = list(x = "Month", y = "Temperature"), units = list(y = "0C"))

Error in nfGroupedData(formula = Temp ~ d | Depth, data = data2, order.groups = TRUE,  : 
  second argument to groupedData must inherit from data.frame
 
 
Could someone help me to sort out on this problem, please?
 
Thank you
Fir



      
	[[alternative HTML version deleted]]


