[R-SIG-Finance] Problem with GroupedData

Brian G. Peterson brian at braverock.com
Tue Jul 14 19:11:33 CEST 2009


Try sending this to r-help. This list is for finance related discussion, 
and while your data may be finance data (even that isn't clear), you're 
asking a novice R question that is unrelated to finance. Please direct 
it to the appropriate forum.

Regards,

    - Brian

FMH wrote:
> 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
>



More information about the R-SIG-Finance mailing list