Dear list,
would anybody be able to tell me why the statement
Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN=mean)
seems to work well with TripsData 1 but not with TripsData 2 ?
With TripsData 2 it yields
Error in FUN(X[[1L]], ...) : arguments must have same length
Hi,
Are you trying to get columns 2 and 3 from TripsData in which case you
need to say TripsData[,2:3] ?
Paul
Juliane Struve wrote:
Dear list,
would anybody be able to tell me why the statement
Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN=mean)
seems to work
Hi Juliane,
Try TripsData[, 2:3] instead of TripsData[ 2:3 ] in the aggregate call.
HTH,
Jorge
On Thu, Sep 24, 2009 at 6:52 AM, Juliane Struve wrote:
Dear list,
would anybody be able to tell me why the statement
Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN=mean)
:00
Subject: Re: [R] aggregate() - error message
Hi,
Are you trying to get columns 2 and 3 from TripsData in which case you need to
say TripsData[,2:3] ?
Paul
Juliane Struve wrote:
Dear list,
would anybody be able to tell me why the statement
Tripstatistics=aggregate(TripsData[2:3],by=list
From: Jorge Ivan Velez jorgeivanve...@gmail.com
Cc: R mailing list r-help@r-project.org
Sent: Thursday, 24 September, 2009 13:32:59
Subject: Re: [R] aggregate() - error message
Hi Julien,
Works for me:
# Data sets
TripsData1 - read.table(textConnection(Trip
5 matches
Mail list logo